Merge "Integrating RandomMusicPlayer sample into tree." into honeycomb-mr2
diff --git a/Android.mk b/Android.mk
index 76ae25e..ca72a12 100644
--- a/Android.mk
+++ b/Android.mk
@@ -372,6 +372,7 @@
     -since ./frameworks/base/api/10.xml 10 \
     -since ./frameworks/base/api/11.xml 11 \
     -since ./frameworks/base/api/12.xml 12 \
+    -since ./frameworks/base/api/13.xml 13 \
 		-werror -hide 113 \
 		-overview $(LOCAL_PATH)/core/java/overview.html
 
@@ -390,8 +391,12 @@
 		            resources/samples/AccessibilityService "Accessibility Service" \
 		-samplecode $(sample_dir)/AccelerometerPlay \
 		            resources/samples/AccelerometerPlay "Accelerometer Play" \
-	  -samplecode $(sample_dir)/ApiDemos \
+		-samplecode $(sample_dir)/ApiDemos \
 		            resources/samples/ApiDemos "API Demos" \
+		-samplecode $(sample_dir)/Support4Demos \
+		            resources/samples/Support4Demos "API 4+ Support Demos" \
+		-samplecode $(sample_dir)/Support13Demos \
+		            resources/samples/Support13Demos "API 13+ Support Demos" \
 		-samplecode $(sample_dir)/BackupRestore \
 		            resources/samples/BackupRestore "Backup and Restore" \
 		-samplecode $(sample_dir)/BluetoothChat \
diff --git a/api/13.xml b/api/13.xml
index b8b11fe..6581042 100644
--- a/api/13.xml
+++ b/api/13.xml
@@ -1024,6 +1024,17 @@
  visibility="public"
 >
 </field>
+<field name="SET_POINTER_SPEED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_POINTER_SPEED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="SET_PREFERRED_APPLICATIONS"
  type="java.lang.String"
  transient="false"
@@ -3128,6 +3139,17 @@
  visibility="public"
 >
 </field>
+<field name="compatibleWidthLimitDp"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843621"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="completionHint"
  type="int"
  transient="false"
@@ -5878,6 +5900,17 @@
  visibility="public"
 >
 </field>
+<field name="largestWidthLimitDp"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843622"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="launchMode"
  type="int"
  transient="false"
@@ -7913,6 +7946,17 @@
  visibility="public"
 >
 </field>
+<field name="requiresSmallestWidthDp"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843620"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="resizeMode"
  type="int"
  transient="false"
@@ -15164,6 +15208,325 @@
  visibility="public"
 >
 </field>
+<field name="TextAppearance_Holo"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974075"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_DialogWindowTitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974103"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974076"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Large"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974077"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Large_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974078"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Medium"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974079"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Medium_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974080"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_SearchResult_Subtitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974084"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_SearchResult_Title"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974083"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Small"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974081"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Small_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974082"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974085"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_ActionBar_Subtitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974099"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_ActionBar_Title"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974098"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_ActionMode_Subtitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974101"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_ActionMode_Title"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974100"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_Button"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974086"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_DropDownHint"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974091"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_DropDownItem"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974092"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_EditText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974094"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_IconMenu_Item"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974087"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_PopupMenu"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974095"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_PopupMenu_Large"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_PopupMenu_Small"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974097"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_TabWidget"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974088"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_TextView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974089"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_TextView_PopupMenu"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974090"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_TextView_SpinnerItem"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974093"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_WindowTitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974102"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="TextAppearance_Inverse"
  type="int"
  transient="false"
@@ -15670,6 +16033,28 @@
  visibility="public"
 >
 </field>
+<field name="Theme_Holo_Light_NoActionBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Holo_Light_NoActionBar_Fullscreen"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974065"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="Theme_Holo_Light_Panel"
  type="int"
  transient="false"
@@ -15978,6 +16363,39 @@
  visibility="public"
 >
 </field>
+<field name="Widget_ActionBar_TabBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974068"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ActionBar_TabText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974067"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ActionBar_TabView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974066"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="Widget_ActionButton"
  type="int"
  transient="false"
@@ -16231,6 +16649,39 @@
  visibility="public"
 >
 </field>
+<field name="Widget_Holo_ActionBar_TabBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974071"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Holo_ActionBar_TabText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974070"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Holo_ActionBar_TabView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974069"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="Widget_Holo_ActionButton"
  type="int"
  transient="false"
@@ -16506,6 +16957,39 @@
  visibility="public"
 >
 </field>
+<field name="Widget_Holo_Light_ActionBar_TabBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974074"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Holo_Light_ActionBar_TabText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974073"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Holo_Light_ActionBar_TabView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="Widget_Holo_Light_ActionButton"
  type="int"
  transient="false"
@@ -22707,7 +23191,7 @@
  synchronized="false"
  static="false"
  final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="id" type="int">
@@ -22981,7 +23465,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -23434,7 +23918,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="protected"
 >
 <parameter name="id" type="int">
@@ -23798,7 +24282,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="protected"
 >
 <parameter name="id" type="int">
@@ -23880,7 +24364,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -24102,7 +24586,7 @@
  synchronized="false"
  static="false"
  final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="id" type="int">
@@ -24452,7 +24936,7 @@
  synchronized="false"
  static="false"
  final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="id" type="int">
@@ -24465,7 +24949,7 @@
  synchronized="false"
  static="false"
  final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="id" type="int">
@@ -30529,6 +31013,21 @@
  visibility="public"
 >
 </method>
+<method name="onViewCreated"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="view" type="android.view.View">
+</parameter>
+<parameter name="savedInstanceState" type="android.os.Bundle">
+</parameter>
+</method>
 <method name="registerForContextMenu"
  return="void"
  abstract="false"
@@ -30568,6 +31067,19 @@
 <parameter name="hasMenu" type="boolean">
 </parameter>
 </method>
+<method name="setInitialSavedState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="android.app.Fragment.SavedState">
+</parameter>
+</method>
 <method name="setRetainInstance"
  return="void"
  abstract="false"
@@ -30659,6 +31171,53 @@
 </parameter>
 </constructor>
 </class>
+<class name="Fragment.SavedState"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.ClassLoaderCreator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
 <class name="FragmentBreadCrumbs"
  extends="android.view.ViewGroup"
  abstract="false"
@@ -31092,6 +31651,19 @@
 <parameter name="listener" type="android.app.FragmentManager.OnBackStackChangedListener">
 </parameter>
 </method>
+<method name="saveFragmentInstanceState"
+ return="android.app.Fragment.SavedState"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="android.app.Fragment">
+</parameter>
+</method>
 <field name="POP_BACK_STACK_INCLUSIVE"
  type="int"
  transient="false"
@@ -31262,6 +31834,19 @@
 <parameter name="name" type="java.lang.String">
 </parameter>
 </method>
+<method name="attach"
+ return="android.app.FragmentTransaction"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fragment" type="android.app.Fragment">
+</parameter>
+</method>
 <method name="commit"
  return="int"
  abstract="true"
@@ -31284,6 +31869,19 @@
  visibility="public"
 >
 </method>
+<method name="detach"
+ return="android.app.FragmentTransaction"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fragment" type="android.app.Fragment">
+</parameter>
+</method>
 <method name="disallowAddToBackStack"
  return="android.app.FragmentTransaction"
  abstract="true"
@@ -31442,6 +32040,25 @@
 <parameter name="exit" type="int">
 </parameter>
 </method>
+<method name="setCustomAnimations"
+ return="android.app.FragmentTransaction"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="enter" type="int">
+</parameter>
+<parameter name="exit" type="int">
+</parameter>
+<parameter name="popEnter" type="int">
+</parameter>
+<parameter name="popExit" type="int">
+</parameter>
+</method>
 <method name="setTransition"
  return="android.app.FragmentTransaction"
  abstract="true"
@@ -32623,7 +33240,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="callback" type="android.app.KeyguardManager.OnKeyguardExitResult">
@@ -32647,7 +33264,7 @@
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <parameter name="tag" type="java.lang.String">
@@ -32659,7 +33276,7 @@
  abstract="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <method name="disableKeyguard"
@@ -57840,6 +58457,28 @@
  visibility="public"
 >
 </field>
+<field name="CONFIG_SCREEN_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1024"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CONFIG_SMALLEST_SCREEN_SIZE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2048"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="CONFIG_TOUCHSCREEN"
  type="int"
  transient="false"
@@ -58588,6 +59227,16 @@
  visibility="public"
 >
 </field>
+<field name="compatibleWidthLimitDp"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="dataDir"
  type="java.lang.String"
  transient="false"
@@ -58628,6 +59277,16 @@
  visibility="public"
 >
 </field>
+<field name="largestWidthLimitDp"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="manageSpaceActivityName"
  type="java.lang.String"
  transient="false"
@@ -58678,6 +59337,16 @@
  visibility="public"
 >
 </field>
+<field name="requiresSmallestWidthDp"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="sharedLibraryFiles"
  type="java.lang.String[]"
  transient="false"
@@ -61053,6 +61722,28 @@
  visibility="public"
 >
 </field>
+<field name="FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.faketouch.multitouch.distinct&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.faketouch.multitouch.jazzhand&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="FEATURE_LIVE_WALLPAPER"
  type="java.lang.String"
  transient="false"
@@ -63902,6 +64593,39 @@
  visibility="public"
 >
 </field>
+<field name="SCREEN_HEIGHT_DP_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SCREEN_WIDTH_DP_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="SMALLEST_SCREEN_WIDTH_DP_UNDEFINED"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="TOUCHSCREEN_FINGER"
  type="int"
  transient="false"
@@ -64034,6 +64758,17 @@
  visibility="public"
 >
 </field>
+<field name="UI_MODE_TYPE_TELEVISION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="4"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="UI_MODE_TYPE_UNDEFINED"
  type="int"
  transient="false"
@@ -64145,6 +64880,16 @@
  visibility="public"
 >
 </field>
+<field name="screenHeightDp"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="screenLayout"
  type="int"
  transient="false"
@@ -64155,6 +64900,26 @@
  visibility="public"
 >
 </field>
+<field name="screenWidthDp"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="smallestScreenWidthDp"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="touchscreen"
  type="int"
  transient="false"
@@ -84584,6 +85349,8 @@
  deprecated="not deprecated"
  visibility="public"
 >
+<implements name="android.os.Parcelable">
+</implements>
 <constructor name="Point"
  type="android.graphics.Point"
  static="false"
@@ -84614,6 +85381,17 @@
 <parameter name="src" type="android.graphics.Point">
 </parameter>
 </constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="equals"
  return="boolean"
  abstract="false"
@@ -84655,6 +85433,19 @@
 <parameter name="dy" type="int">
 </parameter>
 </method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</method>
 <method name="set"
  return="void"
  abstract="false"
@@ -84670,6 +85461,31 @@
 <parameter name="y" type="int">
 </parameter>
 </method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="x"
  type="int"
  transient="false"
@@ -84699,6 +85515,8 @@
  deprecated="not deprecated"
  visibility="public"
 >
+<implements name="android.os.Parcelable">
+</implements>
 <constructor name="PointF"
  type="android.graphics.PointF"
  static="false"
@@ -84729,6 +85547,17 @@
 <parameter name="p" type="android.graphics.Point">
 </parameter>
 </constructor>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="equals"
  return="boolean"
  abstract="false"
@@ -84796,6 +85625,19 @@
 <parameter name="dy" type="float">
 </parameter>
 </method>
+<method name="readFromParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="in" type="android.os.Parcel">
+</parameter>
+</method>
 <method name="set"
  return="void"
  abstract="false"
@@ -84824,6 +85666,31 @@
 <parameter name="p" type="android.graphics.PointF">
 </parameter>
 </method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="out" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.Creator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="x"
  type="float"
  transient="false"
@@ -95253,6 +96120,17 @@
  visibility="public"
 >
 </method>
+<method name="getRawDescriptors"
+ return="byte[]"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="getSerial"
  return="java.lang.String"
  abstract="false"
@@ -114060,6 +114938,28 @@
  visibility="public"
 >
 </field>
+<field name="TYPE_BLUETOOTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_ETHERNET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="TYPE_MOBILE"
  type="int"
  transient="false"
@@ -143235,6 +144135,21 @@
 <parameter name="args" type="java.lang.String[]">
 </parameter>
 </method>
+<method name="dumpAsync"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<parameter name="args" type="java.lang.String[]">
+</parameter>
+</method>
 <method name="flushPendingCommands"
  return="void"
  abstract="false"
@@ -143865,6 +144780,17 @@
  visibility="public"
 >
 </field>
+<field name="HONEYCOMB_MR2"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="13"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 </class>
 <class name="Bundle"
  extends="java.lang.Object"
@@ -147696,6 +148622,23 @@
 <exception name="RemoteException" type="android.os.RemoteException">
 </exception>
 </method>
+<method name="dumpAsync"
+ return="void"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="java.io.FileDescriptor">
+</parameter>
+<parameter name="args" type="java.lang.String[]">
+</parameter>
+<exception name="RemoteException" type="android.os.RemoteException">
+</exception>
+</method>
 <method name="getInterfaceDescriptor"
  return="java.lang.String"
  abstract="true"
@@ -150002,6 +150945,19 @@
 <parameter name="descriptor" type="android.os.ParcelFileDescriptor">
 </parameter>
 </constructor>
+<method name="adoptFd"
+ return="android.os.ParcelFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="int">
+</parameter>
+</method>
 <method name="close"
  return="void"
  abstract="false"
@@ -150050,6 +151006,36 @@
  visibility="public"
 >
 </method>
+<method name="dup"
+ return="android.os.ParcelFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="orig" type="java.io.FileDescriptor">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
+<method name="fromFd"
+ return="android.os.ParcelFileDescriptor"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="fd" type="int">
+</parameter>
+<exception name="IOException" type="java.io.IOException">
+</exception>
+</method>
 <method name="fromSocket"
  return="android.os.ParcelFileDescriptor"
  abstract="false"
@@ -150429,6 +151415,31 @@
 >
 </field>
 </interface>
+<interface name="Parcelable.ClassLoaderCreator"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable.Creator">
+</implements>
+<method name="createFromParcel"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+</interface>
 <interface name="Parcelable.Creator"
  abstract="true"
  static="true"
@@ -150726,7 +151737,7 @@
  value="10"
  static="true"
  final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </field>
@@ -183988,6 +184999,17 @@
  visibility="public"
 >
 </field>
+<field name="NETWORK_TYPE_HSPAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="NETWORK_TYPE_HSUPA"
  type="int"
  transient="false"
@@ -205622,6 +206644,17 @@
  visibility="public"
 >
 </field>
+<field name="DENSITY_TV"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="213"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="DENSITY_XHIGH"
  type="int"
  transient="false"
@@ -209783,11 +210816,11 @@
 <method name="getHeight"
  return="int"
  abstract="false"
- native="true"
+ native="false"
  synchronized="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 </method>
@@ -209826,6 +210859,19 @@
  visibility="public"
 >
 </method>
+<method name="getRectSize"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="outSize" type="android.graphics.Rect">
+</parameter>
+</method>
 <method name="getRefreshRate"
  return="float"
  abstract="false"
@@ -209848,16 +210894,29 @@
  visibility="public"
 >
 </method>
-<method name="getWidth"
- return="int"
+<method name="getSize"
+ return="void"
  abstract="false"
- native="true"
+ native="false"
  synchronized="false"
  static="false"
  final="false"
  deprecated="not deprecated"
  visibility="public"
 >
+<parameter name="outSize" type="android.graphics.Point">
+</parameter>
+</method>
+<method name="getWidth"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="deprecated"
+ visibility="public"
+>
 </method>
 <field name="DEFAULT_DISPLAY"
  type="int"
@@ -212575,6 +213634,17 @@
  visibility="public"
 >
 </method>
+<method name="getModifiers"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="getNumber"
  return="char"
  abstract="false"
@@ -220799,7 +221869,7 @@
  deprecated="not deprecated"
  visibility="public"
 >
-<parameter name="ev" type="android.view.MotionEvent">
+<parameter name="event" type="android.view.MotionEvent">
 </parameter>
 </method>
 <method name="clear"
diff --git a/api/current.xml b/api/current.xml
index efcde72..8a924ab 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -1024,6 +1024,17 @@
  visibility="public"
 >
 </field>
+<field name="SET_POINTER_SPEED"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.permission.SET_POINTER_SPEED&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="SET_PREFERRED_APPLICATIONS"
  type="java.lang.String"
  transient="false"
@@ -5889,6 +5900,17 @@
  visibility="public"
 >
 </field>
+<field name="largestWidthLimitDp"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16843622"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="launchMode"
  type="int"
  transient="false"
@@ -15186,6 +15208,325 @@
  visibility="public"
 >
 </field>
+<field name="TextAppearance_Holo"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974075"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_DialogWindowTitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974103"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974076"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Large"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974077"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Large_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974078"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Medium"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974079"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Medium_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974080"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_SearchResult_Subtitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974084"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_SearchResult_Title"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974083"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Small"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974081"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Small_Inverse"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974082"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974085"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_ActionBar_Subtitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974099"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_ActionBar_Title"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974098"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_ActionMode_Subtitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974101"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_ActionMode_Title"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974100"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_Button"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974086"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_DropDownHint"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974091"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_DropDownItem"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974092"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_EditText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974094"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_IconMenu_Item"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974087"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_PopupMenu"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974095"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_PopupMenu_Large"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974096"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_PopupMenu_Small"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974097"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_TabWidget"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974088"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_TextView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974089"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_TextView_PopupMenu"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974090"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_Widget_TextView_SpinnerItem"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974093"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TextAppearance_Holo_WindowTitle"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974102"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="TextAppearance_Inverse"
  type="int"
  transient="false"
@@ -15692,6 +16033,28 @@
  visibility="public"
 >
 </field>
+<field name="Theme_Holo_Light_NoActionBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974064"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Theme_Holo_Light_NoActionBar_Fullscreen"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974065"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="Theme_Holo_Light_Panel"
  type="int"
  transient="false"
@@ -16000,6 +16363,39 @@
  visibility="public"
 >
 </field>
+<field name="Widget_ActionBar_TabBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974068"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ActionBar_TabText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974067"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_ActionBar_TabView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974066"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="Widget_ActionButton"
  type="int"
  transient="false"
@@ -16253,6 +16649,39 @@
  visibility="public"
 >
 </field>
+<field name="Widget_Holo_ActionBar_TabBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974071"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Holo_ActionBar_TabText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974070"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Holo_ActionBar_TabView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974069"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="Widget_Holo_ActionButton"
  type="int"
  transient="false"
@@ -16528,6 +16957,39 @@
  visibility="public"
 >
 </field>
+<field name="Widget_Holo_Light_ActionBar_TabBar"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974074"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Holo_Light_ActionBar_TabText"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974073"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="Widget_Holo_Light_ActionBar_TabView"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="16974072"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="Widget_Holo_Light_ActionButton"
  type="int"
  transient="false"
@@ -24828,7 +25290,7 @@
  abstract="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <constructor name="ActivityGroup"
@@ -30152,6 +30614,17 @@
  visibility="public"
 >
 </method>
+<method name="isDetached"
+ return="boolean"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="isHidden"
  return="boolean"
  abstract="false"
@@ -30605,6 +31078,19 @@
 <parameter name="hasMenu" type="boolean">
 </parameter>
 </method>
+<method name="setInitialSavedState"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="state" type="android.app.Fragment.SavedState">
+</parameter>
+</method>
 <method name="setRetainInstance"
  return="void"
  abstract="false"
@@ -30696,6 +31182,53 @@
 </parameter>
 </constructor>
 </class>
+<class name="Fragment.SavedState"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable">
+</implements>
+<method name="describeContents"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
+<method name="writeToParcel"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="dest" type="android.os.Parcel">
+</parameter>
+<parameter name="flags" type="int">
+</parameter>
+</method>
+<field name="CREATOR"
+ type="android.os.Parcelable.ClassLoaderCreator"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
 <class name="FragmentBreadCrumbs"
  extends="android.view.ViewGroup"
  abstract="false"
@@ -31129,6 +31662,19 @@
 <parameter name="listener" type="android.app.FragmentManager.OnBackStackChangedListener">
 </parameter>
 </method>
+<method name="saveFragmentInstanceState"
+ return="android.app.Fragment.SavedState"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="f" type="android.app.Fragment">
+</parameter>
+</method>
 <field name="POP_BACK_STACK_INCLUSIVE"
  type="int"
  transient="false"
@@ -33400,7 +33946,7 @@
  abstract="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <constructor name="LocalActivityManager"
@@ -36474,7 +37020,7 @@
  abstract="false"
  static="false"
  final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
  visibility="public"
 >
 <constructor name="TabActivity"
@@ -58742,6 +59288,16 @@
  visibility="public"
 >
 </field>
+<field name="largestWidthLimitDp"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="manageSpaceActivityName"
  type="java.lang.String"
  transient="false"
@@ -61177,6 +61733,28 @@
  visibility="public"
 >
 </field>
+<field name="FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.faketouch.multitouch.distinct&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.faketouch.multitouch.jazzhand&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="FEATURE_LIVE_WALLPAPER"
  type="java.lang.String"
  transient="false"
@@ -61243,6 +61821,28 @@
  visibility="public"
 >
 </field>
+<field name="FEATURE_SCREEN_LANDSCAPE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.screen.landscape&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_SCREEN_PORTRAIT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.screen.portrait&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="FEATURE_SENSOR_ACCELEROMETER"
  type="java.lang.String"
  transient="false"
@@ -114371,6 +114971,28 @@
  visibility="public"
 >
 </field>
+<field name="TYPE_BLUETOOTH"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="7"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="TYPE_ETHERNET"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="9"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="TYPE_MOBILE"
  type="int"
  transient="false"
@@ -144195,7 +144817,7 @@
  type="int"
  transient="false"
  volatile="false"
- value="10000"
+ value="13"
  static="true"
  final="true"
  deprecated="not deprecated"
@@ -148217,6 +148839,17 @@
  visibility="public"
 >
 </field>
+<field name="TWEET_TRANSACTION"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1599362900"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 </interface>
 <interface name="IBinder.DeathRecipient"
  abstract="true"
@@ -150826,6 +151459,31 @@
 >
 </field>
 </interface>
+<interface name="Parcelable.ClassLoaderCreator"
+ abstract="true"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<implements name="android.os.Parcelable.Creator">
+</implements>
+<method name="createFromParcel"
+ return="T"
+ abstract="true"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="source" type="android.os.Parcel">
+</parameter>
+<parameter name="loader" type="java.lang.ClassLoader">
+</parameter>
+</method>
+</interface>
 <interface name="Parcelable.Creator"
  abstract="true"
  static="true"
@@ -184385,6 +185043,17 @@
  visibility="public"
 >
 </field>
+<field name="NETWORK_TYPE_HSPAP"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="15"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="NETWORK_TYPE_HSUPA"
  type="int"
  transient="false"
@@ -206019,6 +206688,17 @@
  visibility="public"
 >
 </field>
+<field name="DENSITY_TV"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="213"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="DENSITY_XHIGH"
  type="int"
  transient="false"
diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c
index 4d49c30..ada712d 100644
--- a/cmds/installd/commands.c
+++ b/cmds/installd/commands.c
@@ -213,7 +213,7 @@
     if (create_cache_path(src_dex, src)) return -1;
     if (create_cache_path(dst_dex, dst)) return -1;
 
-    LOGI("move %s -> %s\n", src_dex, dst_dex);
+    LOGV("move %s -> %s\n", src_dex, dst_dex);
     if (rename(src_dex, dst_dex) < 0) {
         LOGE("Couldn't move %s: %s\n", src_dex, strerror(errno));
         return -1;
@@ -229,7 +229,7 @@
     if (!is_valid_apk_path(path)) return -1;
     if (create_cache_path(dex_path, path)) return -1;
 
-    LOGI("unlink %s\n", dex_path);
+    LOGV("unlink %s\n", dex_path);
     if (unlink(dex_path) < 0) {
         LOGE("Couldn't unlink %s: %s\n", dex_path, strerror(errno));
         return -1;
@@ -428,7 +428,7 @@
     }
 
     if (WIFEXITED(status) && WEXITSTATUS(status) == 0) {
-        LOGD("DexInv: --- END '%s' (success) ---\n", apk_path);
+        LOGV("DexInv: --- END '%s' (success) ---\n", apk_path);
         return 0;
     } else {
         LOGW("DexInv: --- END '%s' --- status=0x%04x, process failed\n",
@@ -495,7 +495,7 @@
         goto fail;
     }
 
-    LOGD("DexInv: --- BEGIN '%s' ---\n", apk_path);
+    LOGV("DexInv: --- BEGIN '%s' ---\n", apk_path);
 
     pid_t pid;
     pid = fork();
@@ -563,7 +563,7 @@
         if (path[basepos] == '/') {
             path[basepos] = 0;
             if (lstat(path, statbuf) < 0) {
-                LOGI("Making directory: %s\n", path);
+                LOGV("Making directory: %s\n", path);
                 if (mkdir(path, mode) == 0) {
                     chown(path, uid, gid);
                 } else {
@@ -595,7 +595,7 @@
     if ((statbuf->st_mode&S_IFDIR) == 0) {
         mkinnerdirs(dstpath, dstbasepos, S_IRWXU|S_IRWXG|S_IXOTH,
                 dstuid, dstgid, statbuf);
-        LOGI("Renaming %s to %s (uid %d)\n", srcpath, dstpath, dstuid);
+        LOGV("Renaming %s to %s (uid %d)\n", srcpath, dstpath, dstuid);
         if (rename(srcpath, dstpath) >= 0) {
             if (chown(dstpath, dstuid, dstgid) < 0) {
                 LOGE("cannot chown %s: %s\n", dstpath, strerror(errno));
diff --git a/core/java/android/app/ActionBar.java b/core/java/android/app/ActionBar.java
index fc5fac6..9473e9b 100644
--- a/core/java/android/app/ActionBar.java
+++ b/core/java/android/app/ActionBar.java
@@ -400,6 +400,12 @@
      * Create and return a new {@link Tab}.
      * This tab will not be included in the action bar until it is added.
      *
+     * <p>Very often tabs will be used to switch between {@link Fragment}
+     * objects.  Here is a typical implementation of such tabs:</p>
+     *
+     * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/FragmentTabs.java
+     *      complete}
+     *
      * @return A new Tab
      *
      * @see #addTab(Tab)
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index e3fb358..e0a2ce8 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -4413,7 +4413,9 @@
         mFragments.dispatchStart();
         if (mAllLoaderManagers != null) {
             for (int i=mAllLoaderManagers.size()-1; i>=0; i--) {
-                mAllLoaderManagers.valueAt(i).finishRetain();
+                LoaderManagerImpl lm = mAllLoaderManagers.valueAt(i);
+                lm.finishRetain();
+                lm.doReportStart();
             }
         }
     }
@@ -4421,27 +4423,29 @@
     final void performRestart() {
         mFragments.noteStateNotSaved();
 
-        synchronized (mManagedCursors) {
-            final int N = mManagedCursors.size();
-            for (int i=0; i<N; i++) {
-                ManagedCursor mc = mManagedCursors.get(i);
-                if (mc.mReleased || mc.mUpdated) {
-                    if (!mc.mCursor.requery()) {
-                        throw new IllegalStateException(
-                                "trying to requery an already closed cursor");
-                    }
-                    mc.mReleased = false;
-                    mc.mUpdated = false;
-                }
-            }
-        }
-
         if (mStopped) {
             mStopped = false;
-            mCalled = false;
             if (mToken != null && mParent == null) {
                 WindowManagerImpl.getDefault().setStoppedState(mToken, false);
             }
+
+            synchronized (mManagedCursors) {
+                final int N = mManagedCursors.size();
+                for (int i=0; i<N; i++) {
+                    ManagedCursor mc = mManagedCursors.get(i);
+                    if (mc.mReleased || mc.mUpdated) {
+                        if (!mc.mCursor.requery()) {
+                            throw new IllegalStateException(
+                                    "trying to requery an already closed cursor  "
+                                    + mc.mCursor);
+                        }
+                        mc.mReleased = false;
+                        mc.mUpdated = false;
+                    }
+                }
+            }
+
+            mCalled = false;
             mInstrumentation.callActivityOnRestart(this);
             if (!mCalled) {
                 throw new SuperNotCalledException(
diff --git a/core/java/android/app/ActivityGroup.java b/core/java/android/app/ActivityGroup.java
index f1216f9..9444113 100644
--- a/core/java/android/app/ActivityGroup.java
+++ b/core/java/android/app/ActivityGroup.java
@@ -23,8 +23,13 @@
 import android.util.Log;
 
 /**
+ * @deprecated Use the new {@link Fragment} and {@link FragmentManager} APIs
+ * instead; these are also
+ * available on older platforms through the Android compatibility package.
+ *
  * A screen that contains and runs multiple embedded activities.
  */
+@Deprecated
 public class ActivityGroup extends Activity {
     private static final String TAG = "ActivityGroup";
     private static final String STATES_KEY = "android:states";
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index d30010a..6c63c2a 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -155,7 +155,9 @@
             = new HashMap<IBinder, Service>();
     AppBindData mBoundApplication;
     Configuration mConfiguration;
+    Configuration mCompatConfiguration;
     Configuration mResConfiguration;
+    CompatibilityInfo mResCompatibilityInfo;
     Application mInitialApplication;
     final ArrayList<Application> mAllApplications
             = new ArrayList<Application>();
@@ -172,12 +174,17 @@
     // These can be accessed by multiple threads; mPackages is the lock.
     // XXX For now we keep around information about all packages we have
     // seen, not removing entries from this map.
+    // NOTE: The activity manager in its process needs to call in to
+    // ActivityThread to do things like update resource configurations,
+    // which means this lock gets held while the activity manager holds its
+    // own lock.  Thus you MUST NEVER call back into the activity manager
+    // or anything that depends on it while holding this lock.
     final HashMap<String, WeakReference<LoadedApk>> mPackages
             = new HashMap<String, WeakReference<LoadedApk>>();
     final HashMap<String, WeakReference<LoadedApk>> mResourcePackages
             = new HashMap<String, WeakReference<LoadedApk>>();
-    Display mDisplay = null;
-    DisplayMetrics mDisplayMetrics = null;
+    final HashMap<CompatibilityInfo, DisplayMetrics> mDisplayMetrics
+            = new HashMap<CompatibilityInfo, DisplayMetrics>();
     final HashMap<ResourcesKey, WeakReference<Resources> > mActiveResources
             = new HashMap<ResourcesKey, WeakReference<Resources> >();
     final ArrayList<ActivityClientRecord> mRelaunchingActivities
@@ -1262,20 +1269,45 @@
         return sPackageManager;
     }
 
-    DisplayMetrics getDisplayMetricsLocked(boolean forceUpdate) {
-        if (mDisplayMetrics != null && !forceUpdate) {
-            return mDisplayMetrics;
+    DisplayMetrics getDisplayMetricsLocked(CompatibilityInfo ci, boolean forceUpdate) {
+        DisplayMetrics dm = mDisplayMetrics.get(ci);
+        if (dm != null && !forceUpdate) {
+            return dm;
         }
-        if (mDisplay == null) {
-            WindowManager wm = WindowManagerImpl.getDefault();
-            mDisplay = wm.getDefaultDisplay();
+        if (dm == null) {
+            dm = new DisplayMetrics();
+            mDisplayMetrics.put(ci, dm);
         }
-        DisplayMetrics metrics = mDisplayMetrics = new DisplayMetrics();
-        mDisplay.getMetrics(metrics);
+        Display d = WindowManagerImpl.getDefault(ci).getDefaultDisplay();
+        d.getMetrics(dm);
         //Slog.i("foo", "New metrics: w=" + metrics.widthPixels + " h="
         //        + metrics.heightPixels + " den=" + metrics.density
         //        + " xdpi=" + metrics.xdpi + " ydpi=" + metrics.ydpi);
-        return metrics;
+        return dm;
+    }
+
+    static Configuration applyConfigCompat(Configuration config, CompatibilityInfo compat) {
+        if (config == null) {
+            return null;
+        }
+        if (compat != null && !compat.supportsScreen()) {
+            config = new Configuration(config);
+            compat.applyToConfiguration(config);
+        }
+        return config;
+    }
+
+    private final Configuration mMainThreadConfig = new Configuration();
+    Configuration applyConfigCompatMainThread(Configuration config, CompatibilityInfo compat) {
+        if (config == null) {
+            return null;
+        }
+        if (compat != null && !compat.supportsScreen()) {
+            mMainThreadConfig.setTo(config);
+            config = mMainThreadConfig;
+            compat.applyToConfiguration(config);
+        }
+        return config;
     }
 
     /**
@@ -1317,7 +1349,7 @@
         }
 
         //Slog.i(TAG, "Resource: key=" + key + ", display metrics=" + metrics);
-        DisplayMetrics metrics = getDisplayMetricsLocked(false);
+        DisplayMetrics metrics = getDisplayMetricsLocked(compInfo, false);
         r = new Resources(assets, metrics, getConfiguration(), compInfo);
         if (false) {
             Slog.i(TAG, "Created app resources " + resDir + " " + r + ": "
@@ -1345,7 +1377,7 @@
      * Creates the top level resources for the given package.
      */
     Resources getTopLevelResources(String resDir, LoadedApk pkgInfo) {
-        return getTopLevelResources(resDir, pkgInfo.mCompatibilityInfo);
+        return getTopLevelResources(resDir, pkgInfo.mCompatibilityInfo.get());
     }
 
     final Handler getHandler() {
@@ -1480,7 +1512,7 @@
     }
 
     public Configuration getConfiguration() {
-        return mConfiguration;
+        return mResConfiguration;
     }
 
     public boolean isProfiling() {
@@ -1512,7 +1544,8 @@
                         CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO);
                 context.init(info, null, this);
                 context.getResources().updateConfiguration(
-                        getConfiguration(), getDisplayMetricsLocked(false));
+                        getConfiguration(), getDisplayMetricsLocked(
+                                CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO, false));
                 mSystemContext = context;
                 //Slog.i(TAG, "Created system resources " + context.getResources()
                 //        + ": " + context.getResources().getConfiguration());
@@ -1525,7 +1558,7 @@
         synchronized (this) {
             ContextImpl context = getSystemContext();
             context.init(new LoadedApk(this, "android", context, info,
-                    new CompatibilityInfo(info, 0, 0, false)), null, this);
+                    CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO), null, this);
         }
     }
 
@@ -1725,7 +1758,7 @@
                 appContext.init(r.packageInfo, r.token, this);
                 appContext.setOuterContext(activity);
                 CharSequence title = r.activityInfo.loadLabel(appContext.getPackageManager());
-                Configuration config = new Configuration(mConfiguration);
+                Configuration config = new Configuration(mCompatConfiguration);
                 if (DEBUG_CONFIGURATION) Slog.v(TAG, "Launching activity "
                         + r.activityInfo.name + " with config " + config);
                 activity.attach(appContext, this, getInstrumentation(), r.token,
@@ -1870,7 +1903,7 @@
             }
             deliverNewIntents(r, intents);
             if (resumed) {
-                mInstrumentation.callActivityOnResume(r.activity);
+                r.activity.performResume();
                 r.activity.mTemporaryPause = false;
             }
         }
@@ -2758,13 +2791,14 @@
     private void handleUpdatePackageCompatibilityInfo(UpdateCompatibilityData data) {
         LoadedApk apk = peekPackageInfo(data.pkg, false);
         if (apk != null) {
-            apk.mCompatibilityInfo = data.info;
+            apk.mCompatibilityInfo.set(data.info);
         }
         apk = peekPackageInfo(data.pkg, true);
         if (apk != null) {
-            apk.mCompatibilityInfo = data.info;
+            apk.mCompatibilityInfo.set(data.info);
         }
         handleConfigurationChanged(mConfiguration, data.info);
+        WindowManagerImpl.getDefault().reportNewConfiguration(mConfiguration);
     }
 
     private final void deliverResults(ActivityClientRecord r, List<ResultInfo> results) {
@@ -2826,7 +2860,7 @@
             }
             deliverResults(r, res.results);
             if (resumed) {
-                mInstrumentation.callActivityOnResume(r.activity);
+                r.activity.performResume();
                 r.activity.mTemporaryPause = false;
             }
         }
@@ -3187,20 +3221,22 @@
                 ActivityClientRecord ar = it.next();
                 Activity a = ar.activity;
                 if (a != null) {
+                    Configuration thisConfig = applyConfigCompatMainThread(newConfig,
+                            ar.packageInfo.mCompatibilityInfo.getIfNeeded());
                     if (!ar.activity.mFinished && (allActivities ||
                             (a != null && !ar.paused))) {
                         // If the activity is currently resumed, its configuration
                         // needs to change right now.
                         callbacks.add(a);
-                    } else if (newConfig != null) {
+                    } else if (thisConfig != null) {
                         // Otherwise, we will tell it about the change
                         // the next time it is resumed or shown.  Note that
                         // the activity manager may, before then, decide the
                         // activity needs to be destroyed to handle its new
                         // configuration.
                         if (DEBUG_CONFIGURATION) Slog.v(TAG, "Setting activity "
-                                + ar.activityInfo.name + " newConfig=" + newConfig);
-                        ar.newConfig = newConfig;
+                                + ar.activityInfo.name + " newConfig=" + thisConfig);
+                        ar.newConfig = thisConfig;
                     }
                 }
             }
@@ -3247,11 +3283,10 @@
             // onConfigurationChanged
             int diff = activity.mCurrentConfig.diff(config);
             if (diff != 0) {
-
                 // If this activity doesn't handle any of the config changes
                 // then don't bother calling onConfigurationChanged as we're
                 // going to destroy it.
-                if ((~activity.mActivityInfo.configChanges & diff) == 0) {
+                if ((~activity.mActivityInfo.getRealConfigChanged() & diff) == 0) {
                     shouldChangeConfig = true;
                 }
             }
@@ -3274,6 +3309,12 @@
         }
     }
 
+    public final void applyConfigurationToResources(Configuration config) {
+        synchronized (mPackages) {
+            applyConfigurationToResourcesLocked(config, null);
+        }
+    }
+
     final boolean applyConfigurationToResourcesLocked(Configuration config,
             CompatibilityInfo compat) {
         if (mResConfiguration == null) {
@@ -3285,7 +3326,15 @@
             return false;
         }
         int changes = mResConfiguration.updateFrom(config);
-        DisplayMetrics dm = getDisplayMetricsLocked(true);
+        DisplayMetrics dm = getDisplayMetricsLocked(compat, true);
+
+        if (compat != null && (mResCompatibilityInfo == null ||
+                !mResCompatibilityInfo.equals(compat))) {
+            mResCompatibilityInfo = compat;
+            changes |= ActivityInfo.CONFIG_SCREEN_LAYOUT
+                    | ActivityInfo.CONFIG_SCREEN_SIZE
+                    | ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE;
+        }
 
         // set it for java, this also affects newly created Resources
         if (config.locale != null) {
@@ -3347,13 +3396,14 @@
                 return;
             }
             mConfiguration.updateFrom(config);
-            if (compat != null) {
-                // Can't do this here, because it causes us to report the
-                // comatible config back to the am as the current config
-                // of the activity, and much unhappiness results.
-                //compat.applyToConfiguration(mConfiguration);
+            if (mCompatConfiguration == null) {
+                mCompatConfiguration = new Configuration();
             }
-
+            mCompatConfiguration.setTo(mConfiguration);
+            if (mResCompatibilityInfo != null && !mResCompatibilityInfo.supportsScreen()) {
+                mResCompatibilityInfo.applyToConfiguration(mCompatConfiguration);
+                config = mCompatConfiguration;
+            }
             callbacks = collectComponentCallbacksLocked(false, config);
         }
 
@@ -3374,7 +3424,7 @@
         if (DEBUG_CONFIGURATION) Slog.v(TAG, "Handle activity config changed: "
                 + r.activityInfo.name);
         
-        performConfigurationChanged(r.activity, mConfiguration);
+        performConfigurationChanged(r.activity, mCompatConfiguration);
     }
 
     final void handleProfilerControl(boolean start, ProfilerControlData pcd) {
@@ -3469,6 +3519,7 @@
     private final void handleBindApplication(AppBindData data) {
         mBoundApplication = data;
         mConfiguration = new Configuration(data.config);
+        mCompatConfiguration = new Configuration(data.config);
 
         // send up app name; do this *before* waiting for debugger
         Process.setArgV0(data.processName);
@@ -3492,8 +3543,7 @@
          * reflect configuration changes. The configuration object passed
          * in AppBindData can be safely assumed to be up to date
          */
-        Resources.getSystem().updateConfiguration(mConfiguration,
-                Resources.getSystem().getDisplayMetrics(), data.compatInfo);
+        applyConfigurationToResourcesLocked(data.config, data.compatInfo);
 
         data.info = getPackageInfoNoCheck(data.appInfo, data.compatInfo);
 
diff --git a/core/java/android/app/Application.java b/core/java/android/app/Application.java
index b9ac848..10cc9f8 100644
--- a/core/java/android/app/Application.java
+++ b/core/java/android/app/Application.java
@@ -37,6 +37,8 @@
  * when first constructing the singleton.</p>
  */
 public class Application extends ContextWrapper implements ComponentCallbacks {
+    /** @hide */
+    public LoadedApk mLoadedApk;
     
     public Application() {
         super(null);
@@ -75,6 +77,6 @@
      */
     /* package */ final void attach(Context context) {
         attachBaseContext(context);
+        mLoadedApk = ContextImpl.getImpl(context).mPackageInfo;
     }
-
 }
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 73170bb..20dc792 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -425,11 +425,19 @@
 
         registerService(WINDOW_SERVICE, new ServiceFetcher() {
                 public Object getService(ContextImpl ctx) {
-                    CompatibilityInfo ci = ctx.mResources.getCompatibilityInfo();
-                    return WindowManagerImpl.getDefault(ci);
+                    return WindowManagerImpl.getDefault(ctx.mPackageInfo.mCompatibilityInfo);
                 }});
     }
 
+    static ContextImpl getImpl(Context context) {
+        Context nextContext;
+        while ((context instanceof ContextWrapper) &&
+                (nextContext=((ContextWrapper)context).getBaseContext()) != null) {
+            context = nextContext;
+        }
+        return (ContextImpl)context;
+    }
+
     // The system service cache for the system services that are
     // cached per-ContextImpl.  Package-scoped to avoid accessor
     // methods.
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java
index 6f0bbd7..26b3ceb 100644
--- a/core/java/android/app/Fragment.java
+++ b/core/java/android/app/Fragment.java
@@ -367,6 +367,9 @@
     // Target fragment.
     Fragment mTarget;
 
+    // For use when retaining a fragment: this is the index of the last mTarget.
+    int mTargetIndex = -1;
+
     // Target request code.
     int mTargetRequestCode;
 
@@ -450,6 +453,51 @@
     boolean mCheckedForLoaderManager;
     
     /**
+     * State information that has been retrieved from a fragment instance
+     * through {@link FragmentManager#saveFragmentInstanceState(Fragment)
+     * FragmentManager.saveFragmentInstanceState}.
+     */
+    public static class SavedState implements Parcelable {
+        final Bundle mState;
+
+        SavedState(Bundle state) {
+            mState = state;
+        }
+
+        SavedState(Parcel in, ClassLoader loader) {
+            mState = in.readBundle();
+            if (loader != null && mState != null) {
+                mState.setClassLoader(loader);
+            }
+        }
+
+        @Override
+        public int describeContents() {
+            return 0;
+        }
+
+        @Override
+        public void writeToParcel(Parcel dest, int flags) {
+            dest.writeBundle(mState);
+        }
+
+        public static final Parcelable.ClassLoaderCreator<SavedState> CREATOR
+                = new Parcelable.ClassLoaderCreator<SavedState>() {
+            public SavedState createFromParcel(Parcel in) {
+                return new SavedState(in, null);
+            }
+
+            public SavedState createFromParcel(Parcel in, ClassLoader loader) {
+                return new SavedState(in, loader);
+            }
+
+            public SavedState[] newArray(int size) {
+                return new SavedState[size];
+            }
+        };
+    }
+
+    /**
      * Thrown by {@link Fragment#instantiate(Context, String, Bundle)} when
      * there is an instantiation failure.
      */
@@ -542,11 +590,6 @@
         mWho = "android:fragment:" + mIndex;
    }
     
-    final void clearIndex() {
-        mIndex = -1;
-        mWho = null;
-    }
-    
     final boolean isInBackStack() {
         return mBackStackNesting > 0;
     }
@@ -624,6 +667,22 @@
     }
 
     /**
+     * Set the initial saved state that this Fragment should restore itself
+     * from when first being constructed, as returned by
+     * {@link FragmentManager#saveFragmentInstanceState(Fragment)
+     * FragmentManager.saveFragmentInstanceState}.
+     *
+     * @param state The state the fragment should be restored from.
+     */
+    public void setInitialSavedState(SavedState state) {
+        if (mIndex >= 0) {
+            throw new IllegalStateException("Fragment already active");
+        }
+        mSavedFragmentState = state != null && state.mState != null
+                ? state.mState : null;
+    }
+
+    /**
      * Optional target for this fragment.  This may be used, for example,
      * if this fragment is being started by another, and when done wants to
      * give a result back to the first.  The target set here is retained
@@ -722,6 +781,15 @@
     }
 
     /**
+     * Return true if the fragment has been explicitly detached from the UI.
+     * That is, {@link FragmentTransaction#detach(Fragment)
+     * FragmentTransaction.detach(Fragment)} has been used on it.
+     */
+    final public boolean isDetached() {
+        return mDetached;
+    }
+
+    /**
      * Return true if this fragment is currently being removed from its
      * activity.  This is  <em>not</em> whether its activity is finishing, but
      * rather whether it is in the process of being removed from its activity.
@@ -1142,6 +1210,35 @@
     }
 
     /**
+     * Called by the fragment manager once this fragment has been removed,
+     * so that we don't have any left-over state if the application decides
+     * to re-use the instance.  This only clears state that the framework
+     * internally manages, not things the application sets.
+     */
+    void initState() {
+        mIndex = -1;
+        mWho = null;
+        mAdded = false;
+        mRemoving = false;
+        mResumed = false;
+        mFromLayout = false;
+        mInLayout = false;
+        mRestored = false;
+        mBackStackNesting = 0;
+        mFragmentManager = null;
+        mActivity = mImmediateActivity = null;
+        mFragmentId = 0;
+        mContainerId = 0;
+        mTag = null;
+        mHidden = false;
+        mDetached = false;
+        mRetaining = false;
+        mLoaderManager = null;
+        mLoadersStarted = false;
+        mCheckedForLoaderManager = false;
+    }
+
+    /**
      * Called when the fragment is no longer attached to its activity.  This
      * is called after {@link #onDestroy()}.
      */
@@ -1368,6 +1465,13 @@
         }
     }
 
+    void performStart() {
+        onStart();
+        if (mLoaderManager != null) {
+            mLoaderManager.doReportStart();
+        }
+    }
+
     void performStop() {
         onStop();
         
@@ -1386,4 +1490,11 @@
             }
         }
     }
+
+    void performDestroyView() {
+        onDestroyView();
+        if (mLoaderManager != null) {
+            mLoaderManager.doReportNextStart();
+        }
+    }
 }
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index 0da656f..285f1c1 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -274,6 +274,30 @@
     public abstract Fragment getFragment(Bundle bundle, String key);
 
     /**
+     * Save the current instance state of the given Fragment.  This can be
+     * used later when creating a new instance of the Fragment and adding
+     * it to the fragment manager, to have it create itself to match the
+     * current state returned here.  Note that there are limits on how
+     * this can be used:
+     *
+     * <ul>
+     * <li>The Fragment must currently be attached to the FragmentManager.
+     * <li>A new Fragment created using this saved state must be the same class
+     * type as the Fragment it was created from.
+     * <li>The saved state can not contain dependencies on other fragments --
+     * that is it can't use {@link #putFragment(Bundle, String, Fragment)} to
+     * store a fragment reference because that reference may not be valid when
+     * this saved state is later used.  Likewise the Fragment's target and
+     * result code are not included in this state.
+     * </ul>
+     *
+     * @param f The Fragment whose state is to be saved.
+     * @return The generated state.  This will be null if there was no
+     * interesting state created by the fragment.
+     */
+    public abstract Fragment.SavedState saveFragmentInstanceState(Fragment f);
+
+    /**
      * Print the FragmentManager's state into the given stream.
      *
      * @param prefix Text to print at the front of each line.
@@ -492,6 +516,19 @@
     }
 
     @Override
+    public Fragment.SavedState saveFragmentInstanceState(Fragment fragment) {
+        if (fragment.mIndex < 0) {
+            throw new IllegalStateException("Fragment " + fragment
+                    + " is not currently in the FragmentManager");
+        }
+        if (fragment.mState > Fragment.INITIALIZING) {
+            Bundle result = saveFragmentBasicState(fragment);
+            return result != null ? new Fragment.SavedState(result) : null;
+        }
+        return null;
+    }
+
+    @Override
     public String toString() {
         StringBuilder sb = new StringBuilder(128);
         sb.append("FragmentManager{");
@@ -658,6 +695,10 @@
         if (!f.mAdded && newState > Fragment.CREATED) {
             newState = Fragment.CREATED;
         }
+        if (f.mRemoving && newState > f.mState) {
+            // While removing a fragment, we can't change it to a higher state.
+            newState = f.mState;
+        }
         
         if (f.mState < newState) {
             // For fragments that are created from a layout, when restoring from
@@ -715,7 +756,6 @@
                         if (f.mView != null) {
                             f.mView.setSaveFromParentEnabled(false);
                             if (f.mHidden) f.mView.setVisibility(View.GONE);
-                            f.restoreViewState();
                             f.onViewCreated(f.mView, f.mSavedFragmentState);
                         }
                     }
@@ -747,7 +787,6 @@
                                     container.addView(f.mView);
                                 }
                                 if (f.mHidden) f.mView.setVisibility(View.GONE);
-                                f.restoreViewState();
                                 f.onViewCreated(f.mView, f.mSavedFragmentState);
                             }
                         }
@@ -759,6 +798,7 @@
                                     + " did not call through to super.onActivityCreated()");
                         }
                         if (f.mView != null) {
+                            f.restoreViewState();
                         }
                         f.mSavedFragmentState = null;
                     }
@@ -767,7 +807,7 @@
                     if (newState > Fragment.STOPPED) {
                         if (DEBUG) Log.v(TAG, "moveto STARTED: " + f);
                         f.mCalled = false;
-                        f.onStart();
+                        f.performStart();
                         if (!f.mCalled) {
                             throw new SuperNotCalledException("Fragment " + f
                                     + " did not call through to super.onStart()");
@@ -820,7 +860,7 @@
                             }
                         }
                         f.mCalled = false;
-                        f.onDestroyView();
+                        f.performDestroyView();
                         if (!f.mCalled) {
                             throw new SuperNotCalledException("Fragment " + f
                                     + " did not call through to super.onDestroyView()");
@@ -879,6 +919,7 @@
                             // the fragment now should move to once the animation
                             // is done.
                             f.mStateAfterAnimating = newState;
+                            newState = Fragment.CREATED;
                         } else {
                             if (DEBUG) Log.v(TAG, "movefrom CREATED: " + f);
                             if (!f.mRetaining) {
@@ -896,9 +937,13 @@
                                 throw new SuperNotCalledException("Fragment " + f
                                         + " did not call through to super.onDetach()");
                             }
-                            f.mImmediateActivity = null;
-                            f.mActivity = null;
-                            f.mFragmentManager = null;
+                            if (!f.mRetaining) {
+                                makeInactive(f);
+                            } else {
+                                f.mImmediateActivity = null;
+                                f.mActivity = null;
+                                f.mFragmentManager = null;
+                            }
                         }
                     }
             }
@@ -970,7 +1015,7 @@
         }
         mAvailIndices.add(f.mIndex);
         mActivity.invalidateFragmentIndex(f.mIndex);
-        f.clearIndex();
+        f.initState();
     }
     
     public void addFragment(Fragment fragment, boolean moveToStateNow) {
@@ -1004,9 +1049,6 @@
             fragment.mRemoving = true;
             moveToState(fragment, inactive ? Fragment.INITIALIZING : Fragment.CREATED,
                     transition, transitionStyle);
-            if (inactive) {
-                makeInactive(fragment);
-            }
         }
     }
     
@@ -1073,7 +1115,6 @@
                     mNeedMenuInvalidate = true;
                 }
                 fragment.mAdded = false;
-                fragment.mRemoving = true;
                 moveToState(fragment, Fragment.CREATED, transition, transitionStyle);
             }
         }
@@ -1086,7 +1127,6 @@
             if (!fragment.mAdded) {
                 mAdded.add(fragment);
                 fragment.mAdded = true;
-                fragment.mRemoving = false;
                 if (fragment.mHasMenu) {
                     mNeedMenuInvalidate = true;
                 }
@@ -1363,6 +1403,7 @@
                     }
                     fragments.add(f);
                     f.mRetaining = true;
+                    f.mTargetIndex = f.mTarget != null ? f.mTarget.mIndex : -1;
                 }
             }
         }
@@ -1375,6 +1416,8 @@
         }
         if (mStateArray == null) {
             mStateArray = new SparseArray<Parcelable>();
+        } else {
+            mStateArray.clear();
         }
         f.mView.saveHierarchyState(mStateArray);
         if (mStateArray.size() > 0) {
@@ -1383,6 +1426,32 @@
         }
     }
     
+    Bundle saveFragmentBasicState(Fragment f) {
+        Bundle result = null;
+
+        if (mStateBundle == null) {
+            mStateBundle = new Bundle();
+        }
+        f.onSaveInstanceState(mStateBundle);
+        if (!mStateBundle.isEmpty()) {
+            result = mStateBundle;
+            mStateBundle = null;
+        }
+
+        if (f.mView != null) {
+            saveFragmentViewState(f);
+        }
+        if (f.mSavedViewState != null) {
+            if (result == null) {
+                result = new Bundle();
+            }
+            result.putSparseParcelableArray(
+                    FragmentManagerImpl.VIEW_STATE_TAG, f.mSavedViewState);
+        }
+
+        return result;
+    }
+
     Parcelable saveAllState() {
         // Make sure all pending operations have now been executed to get
         // our state update-to-date.
@@ -1407,25 +1476,7 @@
                 active[i] = fs;
                 
                 if (f.mState > Fragment.INITIALIZING && fs.mSavedFragmentState == null) {
-                    if (mStateBundle == null) {
-                        mStateBundle = new Bundle();
-                    }
-                    f.onSaveInstanceState(mStateBundle);
-                    if (!mStateBundle.isEmpty()) {
-                        fs.mSavedFragmentState = mStateBundle;
-                        mStateBundle = null;
-                    }
-
-                    if (f.mView != null) {
-                        saveFragmentViewState(f);
-                        if (f.mSavedViewState != null) {
-                            if (fs.mSavedFragmentState == null) {
-                                fs.mSavedFragmentState = new Bundle();
-                            }
-                            fs.mSavedFragmentState.putSparseParcelableArray(
-                                    FragmentManagerImpl.VIEW_STATE_TAG, f.mSavedViewState);
-                        }
-                    }
+                    fs.mSavedFragmentState = saveFragmentBasicState(f);
 
                     if (f.mTarget != null) {
                         if (f.mTarget.mIndex < 0) {
@@ -1517,6 +1568,7 @@
                 f.mBackStackNesting = 0;
                 f.mInLayout = false;
                 f.mAdded = false;
+                f.mTarget = null;
                 if (fs.mSavedFragmentState != null) {
                     fs.mSavedFragmentState.setClassLoader(mActivity.getClassLoader());
                     f.mSavedViewState = fs.mSavedFragmentState.getSparseParcelableArray(
@@ -1556,12 +1608,12 @@
         if (nonConfig != null) {
             for (int i=0; i<nonConfig.size(); i++) {
                 Fragment f = nonConfig.get(i);
-                if (f.mTarget != null) {
-                    if (f.mTarget.mIndex < mActive.size()) {
-                        f.mTarget = mActive.get(f.mTarget.mIndex);
+                if (f.mTargetIndex >= 0) {
+                    if (f.mTargetIndex < mActive.size()) {
+                        f.mTarget = mActive.get(f.mTargetIndex);
                     } else {
                         Log.w(TAG, "Re-attaching retained fragment " + f
-                                + " target no longer exists: " + f.mTarget);
+                                + " target no longer exists: " + f.mTargetIndex);
                         f.mTarget = null;
                     }
                 }
diff --git a/core/java/android/app/ListFragment.java b/core/java/android/app/ListFragment.java
index a5ee26c..dc8420e 100644
--- a/core/java/android/app/ListFragment.java
+++ b/core/java/android/app/ListFragment.java
@@ -167,7 +167,7 @@
     TextView mStandardEmptyView;
     View mProgressContainer;
     View mListContainer;
-    boolean mSetEmptyText;
+    CharSequence mEmptyText;
     boolean mListShown;
 
     public ListFragment() {
@@ -210,6 +210,9 @@
     public void onDestroyView() {
         mHandler.removeCallbacks(mRequestFocus);
         mList = null;
+        mListShown = false;
+        mEmptyView = mProgressContainer = mListContainer = null;
+        mStandardEmptyView = null;
         super.onDestroyView();
     }
 
@@ -289,10 +292,10 @@
             throw new IllegalStateException("Can't be used with a custom content view");
         }
         mStandardEmptyView.setText(text);
-        if (!mSetEmptyText) {
+        if (mEmptyText == null) {
             mList.setEmptyView(mStandardEmptyView);
-            mSetEmptyText = true;
         }
+        mEmptyText = text;
     }
     
     /**
@@ -346,6 +349,9 @@
                         getActivity(), android.R.anim.fade_out));
                 mListContainer.startAnimation(AnimationUtils.loadAnimation(
                         getActivity(), android.R.anim.fade_in));
+            } else {
+                mProgressContainer.clearAnimation();
+                mListContainer.clearAnimation();
             }
             mProgressContainer.setVisibility(View.GONE);
             mListContainer.setVisibility(View.VISIBLE);
@@ -355,6 +361,9 @@
                         getActivity(), android.R.anim.fade_in));
                 mListContainer.startAnimation(AnimationUtils.loadAnimation(
                         getActivity(), android.R.anim.fade_out));
+            } else {
+                mProgressContainer.clearAnimation();
+                mListContainer.clearAnimation();
             }
             mProgressContainer.setVisibility(View.VISIBLE);
             mListContainer.setVisibility(View.GONE);
@@ -383,6 +392,8 @@
                     com.android.internal.R.id.internalEmpty);
             if (mStandardEmptyView == null) {
                 mEmptyView = root.findViewById(android.R.id.empty);
+            } else {
+                mStandardEmptyView.setVisibility(View.GONE);
             }
             mProgressContainer = root.findViewById(com.android.internal.R.id.progressContainer);
             mListContainer = root.findViewById(com.android.internal.R.id.listContainer);
@@ -400,12 +411,17 @@
             }
             if (mEmptyView != null) {
                 mList.setEmptyView(mEmptyView);
+            } else if (mEmptyText != null) {
+                mStandardEmptyView.setText(mEmptyText);
+                mList.setEmptyView(mStandardEmptyView);
             }
         }
         mListShown = true;
         mList.setOnItemClickListener(mOnClickListener);
         if (mAdapter != null) {
-            setListAdapter(mAdapter);
+            ListAdapter adapter = mAdapter;
+            mAdapter = null;
+            setListAdapter(adapter);
         } else {
             // We are starting without an adapter, so assume we won't
             // have our data right away and start with the progress indicator.
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java
index 5307696..2549c84 100644
--- a/core/java/android/app/LoadedApk.java
+++ b/core/java/android/app/LoadedApk.java
@@ -38,6 +38,7 @@
 import android.os.StrictMode;
 import android.util.AndroidRuntimeException;
 import android.util.Slog;
+import android.view.CompatibilityInfoHolder;
 
 import java.io.File;
 import java.io.IOException;
@@ -64,7 +65,7 @@
  * Local state maintained about a currently loaded .apk.
  * @hide
  */
-final class LoadedApk {
+public final class LoadedApk {
 
     private final ActivityThread mActivityThread;
     private final ApplicationInfo mApplicationInfo;
@@ -78,10 +79,10 @@
     private final ClassLoader mBaseClassLoader;
     private final boolean mSecurityViolation;
     private final boolean mIncludeCode;
+    public final CompatibilityInfoHolder mCompatibilityInfo = new CompatibilityInfoHolder();
     Resources mResources;
     private ClassLoader mClassLoader;
     private Application mApplication;
-    CompatibilityInfo mCompatibilityInfo;
 
     private final HashMap<Context, HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher>> mReceivers
         = new HashMap<Context, HashMap<BroadcastReceiver, LoadedApk.ReceiverDispatcher>>();
@@ -98,6 +99,12 @@
         return mApplication;
     }
 
+    /**
+     * Create information about a new .apk
+     *
+     * NOTE: This constructor is called with ActivityThread's lock held,
+     * so MUST NOT call back out to the activity manager.
+     */
     public LoadedApk(ActivityThread activityThread, ApplicationInfo aInfo,
             CompatibilityInfo compatInfo,
             ActivityThread mainThread, ClassLoader baseLoader,
@@ -115,7 +122,7 @@
         mBaseClassLoader = baseLoader;
         mSecurityViolation = securityViolation;
         mIncludeCode = includeCode;
-        mCompatibilityInfo = compatInfo;
+        mCompatibilityInfo.set(compatInfo);
 
         if (mAppDir == null) {
             if (ActivityThread.mSystemContext == null) {
@@ -123,7 +130,7 @@
                     ContextImpl.createSystemContext(mainThread);
                 ActivityThread.mSystemContext.getResources().updateConfiguration(
                          mainThread.getConfiguration(),
-                         mainThread.getDisplayMetricsLocked(false),
+                         mainThread.getDisplayMetricsLocked(compatInfo, false),
                          compatInfo);
                 //Slog.i(TAG, "Created system resources "
                 //        + mSystemContext.getResources() + ": "
@@ -151,7 +158,7 @@
         mIncludeCode = true;
         mClassLoader = systemContext.getClassLoader();
         mResources = systemContext.getResources();
-        mCompatibilityInfo = compatInfo;
+        mCompatibilityInfo.set(compatInfo);
     }
 
     public String getPackageName() {
diff --git a/core/java/android/app/LoaderManager.java b/core/java/android/app/LoaderManager.java
index 164141c..46a008d 100644
--- a/core/java/android/app/LoaderManager.java
+++ b/core/java/android/app/LoaderManager.java
@@ -223,6 +223,7 @@
         boolean mStarted;
         boolean mRetaining;
         boolean mRetainingStarted;
+        boolean mReportNextStart;
         boolean mDestroyed;
         boolean mListenerRegistered;
 
@@ -291,7 +292,7 @@
                 }
             }
 
-            if (mStarted && mHaveData) {
+            if (mStarted && mHaveData && !mReportNextStart) {
                 // This loader has retained its data, either completely across
                 // a configuration change or just whatever the last data set
                 // was after being restarted from a stop, and now at the point of
@@ -302,6 +303,17 @@
             }
         }
         
+        void reportStart() {
+            if (mStarted) {
+                if (mReportNextStart) {
+                    mReportNextStart = false;
+                    if (mHaveData) {
+                        callOnLoadFinished(mLoader, mData);
+                    }
+                }
+            }
+        }
+
         void stop() {
             if (DEBUG) Log.v(TAG, "  Stopping: " + this);
             mStarted = false;
@@ -449,10 +461,11 @@
                 writer.print(prefix); writer.print("mData="); writer.println(mData);
             }
             writer.print(prefix); writer.print("mStarted="); writer.print(mStarted);
-                    writer.print(" mRetaining="); writer.print(mRetaining);
+                    writer.print(" mReportNextStart="); writer.print(mReportNextStart);
                     writer.print(" mDestroyed="); writer.println(mDestroyed);
-            writer.print(prefix); writer.print("mListenerRegistered=");
-                    writer.println(mListenerRegistered);
+            writer.print(prefix); writer.print("mRetaining="); writer.print(mRetaining);
+                    writer.print(" mRetainingStarted="); writer.print(mRetainingStarted);
+                    writer.print(" mListenerRegistered="); writer.println(mListenerRegistered);
             if (mPendingLoader != null) {
                 writer.print(prefix); writer.println("Pending Loader ");
                         writer.print(mPendingLoader); writer.println(":");
@@ -740,6 +753,18 @@
         }
     }
     
+    void doReportNextStart() {
+        for (int i = mLoaders.size()-1; i >= 0; i--) {
+            mLoaders.valueAt(i).mReportNextStart = true;
+        }
+    }
+
+    void doReportStart() {
+        for (int i = mLoaders.size()-1; i >= 0; i--) {
+            mLoaders.valueAt(i).reportStart();
+        }
+    }
+
     void doDestroy() {
         if (!mRetaining) {
             if (DEBUG) Log.v(TAG, "Destroying Active in " + this);
diff --git a/core/java/android/app/LocalActivityManager.java b/core/java/android/app/LocalActivityManager.java
index c958e1b..0a6b804 100644
--- a/core/java/android/app/LocalActivityManager.java
+++ b/core/java/android/app/LocalActivityManager.java
@@ -28,12 +28,17 @@
 import java.util.Map;
 
 /**
- * Helper class for managing multiple running embedded activities in the same
+ * @deprecated Use the new {@link Fragment} and {@link FragmentManager} APIs
+ * instead; these are also
+ * available on older platforms through the Android compatibility package.
+ *
+ * <p>Helper class for managing multiple running embedded activities in the same
  * process. This class is not normally used directly, but rather created for
  * you as part of the {@link android.app.ActivityGroup} implementation.
  *
  * @see ActivityGroup
  */
+@Deprecated
 public class LocalActivityManager {
     private static final String TAG = "LocalActivityManager";
     private static final boolean localLOGV = false;
diff --git a/core/java/android/app/TabActivity.java b/core/java/android/app/TabActivity.java
index 033fa0c..0fd0c2c 100644
--- a/core/java/android/app/TabActivity.java
+++ b/core/java/android/app/TabActivity.java
@@ -23,8 +23,34 @@
 import android.widget.TextView;
 
 /**
- * An activity that contains and runs multiple embedded activities or views.
+ * @deprecated New applications should use Fragments instead of this class;
+ * to continue to run on older devices, you can use the v4 support library
+ * which provides a version of the Fragment API that is compatible down to
+ * {@link android.os.Build.VERSION_CODES#DONUT}.
+ *
+ * <p>For apps developing against {@link android.os.Build.VERSION_CODES#HONEYCOMB}
+ * or later, tabs are typically presented in the UI using the new
+ * {@link ActionBar#newTab() ActionBar.newTab()} and
+ * related APIs for placing tabs within their action bar area.</p>
+ *
+ * <p>A replacement for TabActivity can also be implemented by directly using
+ * TabHost.  You will need to define a layout that correctly uses a TabHost
+ * with a TabWidget as well as an area in which to display your tab content.
+ * A typical example would be:</p>
+ *
+ * {@sample development/samples/Support4Demos/res/layout/fragment_tabs.xml complete}
+ *
+ * <p>The implementation needs to take over responsibility for switching
+ * the shown content when the user switches between tabs.
+ *
+ * {@sample development/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabs.java
+ *      complete}
+ *
+ * <p>Also see the <a href="{@docRoot}resources/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabsPager.html">
+ * Fragment Tabs Pager</a> sample for an example of using the support library's ViewPager to
+ * allow the user to swipe the content to switch between tabs.</p>
  */
+@Deprecated
 public class TabActivity extends ActivityGroup {
     private TabHost mTabHost;
     private String mDefaultTab = null;
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index 4285388..4858f14 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -335,13 +335,25 @@
     /**
      * Bit in {@link #configChanges} that indicates that the activity
      * can itself handle the screen size. Set from the
-     * {@link android.R.attr#configChanges} attribute.
+     * {@link android.R.attr#configChanges} attribute.  This will be
+     * set by default for applications that target an earlier version
+     * than {@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}...
+     * <b>however</b>, you will not see the bit set here becomes some
+     * applications incorrectly compare {@link #configChanges} against
+     * an absolute value rather than correctly masking out the bits
+     * they are interested in.  Please don't do that, thanks.
      */
     public static final int CONFIG_SCREEN_SIZE = 0x0400;
     /**
      * Bit in {@link #configChanges} that indicates that the activity
      * can itself handle the smallest screen size. Set from the
-     * {@link android.R.attr#configChanges} attribute.
+     * {@link android.R.attr#configChanges} attribute.  This will be
+     * set by default for applications that target an earlier version
+     * than {@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2}...
+     * <b>however</b>, you will not see the bit set here becomes some
+     * applications incorrectly compare {@link #configChanges} against
+     * an absolute value rather than correctly masking out the bits
+     * they are interested in.  Please don't do that, thanks.
      */
     public static final int CONFIG_SMALLEST_SCREEN_SIZE = 0x0800;
     /**
@@ -386,6 +398,21 @@
     }
 
     /**
+     * @hide
+     * Unfortunately some developers (OpenFeint I am looking at you) have
+     * compared the configChanges bit field against absolute values, so if we
+     * introduce a new bit they break.  To deal with that, we will make sure
+     * the public field will not have a value that breaks them, and let the
+     * framework call here to get the real value.
+     */
+    public int getRealConfigChanged() {
+        return applicationInfo.targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB_MR2
+                ? (configChanges | ActivityInfo.CONFIG_SCREEN_SIZE
+                        | ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE)
+                : configChanges;
+    }
+
+    /**
      * Bit mask of kinds of configuration changes that this activity
      * can handle itself (without being restarted by the system).
      * Contains any combination of {@link #CONFIG_FONT_SCALE},
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index ab31865..2bd632d 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -337,6 +337,14 @@
     public int compatibleWidthLimitDp = 0;
 
     /**
+     * The maximum smallest screen width the application will work on.  If 0,
+     * nothing has been specified.  Comes from
+     * {@link android.R.styleable#AndroidManifestSupportsScreens_largestWidthLimitDp
+     * android:largestWidthLimitDp} attribute of the &lt;supports-screens&gt; tag.
+     */
+    public int largestWidthLimitDp = 0;
+
+    /**
      * Full path to the location of this package.
      */
     public String sourceDir;
@@ -418,7 +426,8 @@
         pw.println(prefix + "uid=" + uid + " flags=0x" + Integer.toHexString(flags)
                 + " theme=0x" + Integer.toHexString(theme));
         pw.println(prefix + "requiresSmallestWidthDp=" + requiresSmallestWidthDp
-                + " compatibleWidthLimitDp=" + compatibleWidthLimitDp);
+                + " compatibleWidthLimitDp=" + compatibleWidthLimitDp
+                + " largestWidthLimitDp=" + largestWidthLimitDp);
         pw.println(prefix + "sourceDir=" + sourceDir);
         if (sourceDir == null) {
             if (publicSourceDir != null) {
@@ -480,6 +489,7 @@
         flags = orig.flags;
         requiresSmallestWidthDp = orig.requiresSmallestWidthDp;
         compatibleWidthLimitDp = orig.compatibleWidthLimitDp;
+        largestWidthLimitDp = orig.largestWidthLimitDp;
         sourceDir = orig.sourceDir;
         publicSourceDir = orig.publicSourceDir;
         nativeLibraryDir = orig.nativeLibraryDir;
@@ -515,6 +525,7 @@
         dest.writeInt(flags);
         dest.writeInt(requiresSmallestWidthDp);
         dest.writeInt(compatibleWidthLimitDp);
+        dest.writeInt(largestWidthLimitDp);
         dest.writeString(sourceDir);
         dest.writeString(publicSourceDir);
         dest.writeString(nativeLibraryDir);
@@ -550,6 +561,7 @@
         flags = source.readInt();
         requiresSmallestWidthDp = source.readInt();
         compatibleWidthLimitDp = source.readInt();
+        largestWidthLimitDp = source.readInt();
         sourceDir = source.readString();
         publicSourceDir = source.readString();
         nativeLibraryDir = source.readString();
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 80bed0d..64dea4c 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -888,6 +888,58 @@
 
     /**
      * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device does not have a touch screen, but
+     * does support touch emulation for basic events that supports distinct
+     * tracking of two or more fingers.  This is an extension of
+     * {@link #FEATURE_FAKETOUCH} for input devices with this capability.  Note
+     * that unlike a distinct multitouch screen as defined by
+     * {@link #FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT}, these kinds of input
+     * devices will not actually provide full two-finger gestures since the
+     * input is being transformed to cursor movement on the screen.  That is,
+     * single finger gestures will move a cursor; two-finger swipes will
+     * result in single-finger touch events; other two-finger gestures will
+     * result in the corresponding two-finger touch event.
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT = "android.hardware.faketouch.multitouch.distinct";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device does not have a touch screen, but
+     * does support touch emulation for basic events that supports tracking
+     * a hand of fingers (5 or more fingers) fully independently.
+     * This is an extension of
+     * {@link #FEATURE_FAKETOUCH} for input devices with this capability.  Note
+     * that unlike a multitouch screen as defined by
+     * {@link #FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND}, not all two finger
+     * gestures can be detected due to the limitations described for
+     * {@link #FEATURE_FAKETOUCH_MULTITOUCH_DISTINCT}.
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_FAKETOUCH_MULTITOUCH_JAZZHAND = "android.hardware.faketouch.multitouch.jazzhand";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device supports portrait orientation
+     * screens.  For backwards compatibility, you can assume that if neither
+     * this nor {@link #FEATURE_SCREEN_LANDSCAPE} is set then the device supports
+     * both portrait and landscape.
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_SCREEN_PORTRAIT = "android.hardware.screen.portrait";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device supports landscape orientation
+     * screens.  For backwards compatibility, you can assume that if neither
+     * this nor {@link #FEATURE_SCREEN_PORTRAIT} is set then the device supports
+     * both portrait and landscape.
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_SCREEN_LANDSCAPE = "android.hardware.screen.landscape";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
      * {@link #hasSystemFeature}: The device supports live wallpapers.
      */
     @SdkConstant(SdkConstantType.FEATURE)
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 42e24f9..98ce8aa 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -999,6 +999,9 @@
                 pkg.applicationInfo.compatibleWidthLimitDp = sa.getInteger(
                         com.android.internal.R.styleable.AndroidManifestSupportsScreens_compatibleWidthLimitDp,
                         0);
+                pkg.applicationInfo.largestWidthLimitDp = sa.getInteger(
+                        com.android.internal.R.styleable.AndroidManifestSupportsScreens_largestWidthLimitDp,
+                        0);
 
                 // This is a trick to get a boolean and still able to detect
                 // if a value was actually set.
@@ -1938,11 +1941,6 @@
             a.info.configChanges = sa.getInt(
                     com.android.internal.R.styleable.AndroidManifestActivity_configChanges,
                     0);
-            if (owner.applicationInfo.targetSdkVersion
-                        < android.os.Build.VERSION_CODES.HONEYCOMB_MR2) {
-                a.info.configChanges |= ActivityInfo.CONFIG_SCREEN_SIZE
-                        | ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE;
-            }
             a.info.softInputMode = sa.getInt(
                     com.android.internal.R.styleable.AndroidManifestActivity_windowSoftInputMode,
                     0);
diff --git a/core/java/android/content/res/CompatibilityInfo.aidl b/core/java/android/content/res/CompatibilityInfo.aidl
new file mode 100644
index 0000000..cde3d7b
--- /dev/null
+++ b/core/java/android/content/res/CompatibilityInfo.aidl
@@ -0,0 +1,20 @@
+/*
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+
+package android.content.res;
+
+parcelable CompatibilityInfo;
+
diff --git a/core/java/android/content/res/CompatibilityInfo.java b/core/java/android/content/res/CompatibilityInfo.java
index c151e32..acf2f2f1 100644
--- a/core/java/android/content/res/CompatibilityInfo.java
+++ b/core/java/android/content/res/CompatibilityInfo.java
@@ -63,37 +63,19 @@
     private static final int SCALING_REQUIRED = 1; 
 
     /**
-     * Has the application said that its UI is expandable?  Based on the
-     * <supports-screen> android:expandible in the manifest.
-     */
-    private static final int EXPANDABLE = 2;
-    
-    /**
-     * Has the application said that its UI supports large screens?  Based on the
-     * <supports-screen> android:largeScreens in the manifest.
-     */
-    private static final int LARGE_SCREENS = 8;
-    
-    /**
-     * Has the application said that its UI supports xlarge screens?  Based on the
-     * <supports-screen> android:xlargeScreens in the manifest.
-     */
-    private static final int XLARGE_SCREENS = 32;
-    
-    /**
      * Application must always run in compatibility mode?
      */
-    private static final int ALWAYS_COMPAT = 64;
+    private static final int ALWAYS_NEEDS_COMPAT = 2;
 
     /**
      * Application never should run in compatibility mode?
      */
-    private static final int NEVER_COMPAT = 128;
+    private static final int NEVER_NEEDS_COMPAT = 4;
 
     /**
      * Set if the application needs to run in screen size compatibility mode.
      */
-    private static final int NEEDS_SCREEN_COMPAT = 256;
+    private static final int NEEDS_SCREEN_COMPAT = 8;
 
     /**
      * The effective screen density we have selected for this application.
@@ -114,21 +96,42 @@
             boolean forceCompat) {
         int compatFlags = 0;
 
-        if (appInfo.requiresSmallestWidthDp != 0 || appInfo.compatibleWidthLimitDp != 0) {
+        if (appInfo.requiresSmallestWidthDp != 0 || appInfo.compatibleWidthLimitDp != 0
+                || appInfo.largestWidthLimitDp != 0) {
             // New style screen requirements spec.
             int required = appInfo.requiresSmallestWidthDp != 0
                     ? appInfo.requiresSmallestWidthDp
                     : appInfo.compatibleWidthLimitDp;
+            if (required == 0) {
+                required = appInfo.largestWidthLimitDp;
+            }
             int compat = appInfo.compatibleWidthLimitDp != 0
-                    ? appInfo.compatibleWidthLimitDp
-                    : appInfo.requiresSmallestWidthDp;
+                    ? appInfo.compatibleWidthLimitDp : required;
             if (compat < required)  {
                 compat = required;
             }
+            int largest = appInfo.largestWidthLimitDp;
 
-            if (compat >= sw) {
-                compatFlags |= NEVER_COMPAT;
+            if (required > DEFAULT_NORMAL_SHORT_DIMENSION) {
+                // For now -- if they require a size larger than the only
+                // size we can do in compatibility mode, then don't ever
+                // allow the app to go in to compat mode.  Trying to run
+                // it at a smaller size it can handle will make it far more
+                // broken than running at a larger size than it wants or
+                // thinks it can handle.
+                compatFlags |= NEVER_NEEDS_COMPAT;
+            } else if (largest != 0 && sw > largest) {
+                // If the screen size is larger than the largest size the
+                // app thinks it can work with, then always force it in to
+                // compatibility mode.
+                compatFlags |= NEEDS_SCREEN_COMPAT | ALWAYS_NEEDS_COMPAT;
+            } else if (compat >= sw) {
+                // The screen size is something the app says it was designed
+                // for, so never do compatibility mode.
+                compatFlags |= NEVER_NEEDS_COMPAT;
             } else if (forceCompat) {
+                // The app may work better with or without compatibility mode.
+                // Let the user decide.
                 compatFlags |= NEEDS_SCREEN_COMPAT;
             }
 
@@ -138,29 +141,49 @@
             applicationInvertedScale = 1.0f;
 
         } else {
+            /**
+             * Has the application said that its UI is expandable?  Based on the
+             * <supports-screen> android:expandible in the manifest.
+             */
+            final int EXPANDABLE = 2;
+
+            /**
+             * Has the application said that its UI supports large screens?  Based on the
+             * <supports-screen> android:largeScreens in the manifest.
+             */
+            final int LARGE_SCREENS = 8;
+
+            /**
+             * Has the application said that its UI supports xlarge screens?  Based on the
+             * <supports-screen> android:xlargeScreens in the manifest.
+             */
+            final int XLARGE_SCREENS = 32;
+
+            int sizeInfo = 0;
+
             // We can't rely on the application always setting
             // FLAG_RESIZEABLE_FOR_SCREENS so will compute it based on various input.
             boolean anyResizeable = false;
 
             if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS) != 0) {
-                compatFlags |= LARGE_SCREENS;
+                sizeInfo |= LARGE_SCREENS;
                 anyResizeable = true;
                 if (!forceCompat) {
                     // If we aren't forcing the app into compatibility mode, then
                     // assume if it supports large screens that we should allow it
                     // to use the full space of an xlarge screen as well.
-                    compatFlags |= XLARGE_SCREENS | EXPANDABLE;
+                    sizeInfo |= XLARGE_SCREENS | EXPANDABLE;
                 }
             }
             if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_XLARGE_SCREENS) != 0) {
                 anyResizeable = true;
                 if (!forceCompat) {
-                    compatFlags |= XLARGE_SCREENS | EXPANDABLE;
+                    sizeInfo |= XLARGE_SCREENS | EXPANDABLE;
                 }
             }
             if ((appInfo.flags & ApplicationInfo.FLAG_RESIZEABLE_FOR_SCREENS) != 0) {
                 anyResizeable = true;
-                compatFlags |= EXPANDABLE;
+                sizeInfo |= EXPANDABLE;
             }
 
             if (forceCompat) {
@@ -168,41 +191,38 @@
                 // just says it is resizable for screens.  We'll only have it fill
                 // the screen if it explicitly says it supports the screen size we
                 // are running in.
-                compatFlags &= ~EXPANDABLE;
+                sizeInfo &= ~EXPANDABLE;
             }
 
-            boolean supportsScreen = false;
+            compatFlags |= NEEDS_SCREEN_COMPAT;
             switch (screenLayout&Configuration.SCREENLAYOUT_SIZE_MASK) {
                 case Configuration.SCREENLAYOUT_SIZE_XLARGE:
-                    if ((compatFlags&XLARGE_SCREENS) != 0) {
-                        supportsScreen = true;
+                    if ((sizeInfo&XLARGE_SCREENS) != 0) {
+                        compatFlags &= ~NEEDS_SCREEN_COMPAT;
                     }
                     if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_XLARGE_SCREENS) != 0) {
-                        compatFlags |= NEVER_COMPAT;
+                        compatFlags |= NEVER_NEEDS_COMPAT;
                     }
                     break;
                 case Configuration.SCREENLAYOUT_SIZE_LARGE:
-                    if ((compatFlags&LARGE_SCREENS) != 0) {
-                        supportsScreen = true;
+                    if ((sizeInfo&LARGE_SCREENS) != 0) {
+                        compatFlags &= ~NEEDS_SCREEN_COMPAT;
                     }
                     if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_LARGE_SCREENS) != 0) {
-                        compatFlags |= NEVER_COMPAT;
+                        compatFlags |= NEVER_NEEDS_COMPAT;
                     }
                     break;
             }
 
             if ((screenLayout&Configuration.SCREENLAYOUT_COMPAT_NEEDED) != 0) {
-                if ((compatFlags&EXPANDABLE) != 0) {
-                    supportsScreen = true;
+                if ((sizeInfo&EXPANDABLE) != 0) {
+                    compatFlags &= ~NEEDS_SCREEN_COMPAT;
                 } else if (!anyResizeable) {
-                    compatFlags |= ALWAYS_COMPAT;
+                    compatFlags |= ALWAYS_NEEDS_COMPAT;
                 }
-            }
-
-            if (supportsScreen) {
-                compatFlags &= ~NEEDS_SCREEN_COMPAT;
             } else {
-                compatFlags |= NEEDS_SCREEN_COMPAT;
+                compatFlags &= ~NEEDS_SCREEN_COMPAT;
+                compatFlags |= NEVER_NEEDS_COMPAT;
             }
 
             if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) != 0) {
@@ -230,8 +250,7 @@
     }
 
     private CompatibilityInfo() {
-        this(XLARGE_SCREENS | LARGE_SCREENS | EXPANDABLE,
-                DisplayMetrics.DENSITY_DEVICE,
+        this(NEVER_NEEDS_COMPAT, DisplayMetrics.DENSITY_DEVICE,
                 1.0f,
                 1.0f);
     }
@@ -240,7 +259,7 @@
      * @return true if the scaling is required
      */
     public boolean isScalingRequired() {
-        return (mCompatibilityFlags & SCALING_REQUIRED) != 0;
+        return (mCompatibilityFlags&SCALING_REQUIRED) != 0;
     }
     
     public boolean supportsScreen() {
@@ -248,16 +267,11 @@
     }
     
     public boolean neverSupportsScreen() {
-        return (mCompatibilityFlags&NEVER_COMPAT) != 0;
+        return (mCompatibilityFlags&ALWAYS_NEEDS_COMPAT) != 0;
     }
 
     public boolean alwaysSupportsScreen() {
-        return (mCompatibilityFlags&ALWAYS_COMPAT) != 0;
-    }
-
-    @Override
-    public String toString() {
-        return "CompatibilityInfo{scale=" + applicationScale + "}";
+        return (mCompatibilityFlags&NEVER_NEEDS_COMPAT) != 0;
     }
 
     /**
@@ -416,7 +430,7 @@
         if (!supportsScreen()) {
             // This is a larger screen device and the app is not
             // compatible with large screens, so diddle it.
-            CompatibilityInfo.updateCompatibleScreenFrame(inoutDm, null, inoutDm);
+            CompatibilityInfo.computeCompatibleScaling(inoutDm, inoutDm);
         } else {
             inoutDm.widthPixels = inoutDm.unscaledWidthPixels;
             inoutDm.heightPixels = inoutDm.unscaledHeightPixels;
@@ -442,6 +456,9 @@
             inoutConfig.screenLayout =
                     (inoutConfig.screenLayout&~Configuration.SCREENLAYOUT_SIZE_MASK)
                     | Configuration.SCREENLAYOUT_SIZE_NORMAL;
+            inoutConfig.screenWidthDp = inoutConfig.compatScreenWidthDp;
+            inoutConfig.screenHeightDp = inoutConfig.compatScreenHeightDp;
+            inoutConfig.smallestScreenWidthDp = inoutConfig.compatSmallestScreenWidthDp;
         }
     }
 
@@ -453,8 +470,7 @@
      * @param outRect the output parameter which will contain the result.
      * @return Returns the scaling factor for the window.
      */
-    public static float updateCompatibleScreenFrame(DisplayMetrics dm,
-            Rect outRect, DisplayMetrics outDm) {
+    public static float computeCompatibleScaling(DisplayMetrics dm, DisplayMetrics outDm) {
         final int width = dm.unscaledWidthPixels;
         final int height = dm.unscaledHeightPixels;
         int shortSize, longSize;
@@ -487,12 +503,6 @@
             scale = 1;
         }
 
-        if (outRect != null) {
-            final int left = (int)((width-(newWidth*scale))/2);
-            final int top = (int)((height-(newHeight*scale))/2);
-            outRect.set(left, top, left+newWidth, top+newHeight);
-        }
-
         if (outDm != null) {
             outDm.widthPixels = newWidth;
             outDm.heightPixels = newHeight;
@@ -516,6 +526,28 @@
     }
 
     @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder(128);
+        sb.append("{");
+        sb.append(applicationDensity);
+        sb.append("dpi");
+        if (isScalingRequired()) {
+            sb.append(" scaling");
+        }
+        if (!supportsScreen()) {
+            sb.append(" resizing");
+        }
+        if (neverSupportsScreen()) {
+            sb.append(" never-compat");
+        }
+        if (alwaysSupportsScreen()) {
+            sb.append(" always-compat");
+        }
+        sb.append("}");
+        return sb.toString();
+    }
+
+    @Override
     public int hashCode() {
         int result = 17;
         result = 31 * result + mCompatibilityFlags;
diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
index d476997..e2c6483 100644
--- a/core/java/android/content/res/Configuration.java
+++ b/core/java/android/content/res/Configuration.java
@@ -269,6 +269,13 @@
      */
     public int smallestScreenWidthDp;
 
+    /** @hide Hack to get this information from WM to app running in compat mode. */
+    public int compatScreenWidthDp;
+    /** @hide Hack to get this information from WM to app running in compat mode. */
+    public int compatScreenHeightDp;
+    /** @hide Hack to get this information from WM to app running in compat mode. */
+    public int compatSmallestScreenWidthDp;
+
     /**
      * @hide Internal book-keeping.
      */
@@ -309,6 +316,9 @@
         screenWidthDp = o.screenWidthDp;
         screenHeightDp = o.screenHeightDp;
         smallestScreenWidthDp = o.smallestScreenWidthDp;
+        compatScreenWidthDp = o.compatScreenWidthDp;
+        compatScreenHeightDp = o.compatScreenHeightDp;
+        compatSmallestScreenWidthDp = o.compatSmallestScreenWidthDp;
         seq = o.seq;
     }
     
@@ -330,17 +340,17 @@
         if (smallestScreenWidthDp != SMALLEST_SCREEN_WIDTH_DP_UNDEFINED) {
             sb.append(" sw"); sb.append(smallestScreenWidthDp); sb.append("dp");
         } else {
-            sb.append("?swdp");
+            sb.append(" ?swdp");
         }
         if (screenWidthDp != SCREEN_WIDTH_DP_UNDEFINED) {
             sb.append(" w"); sb.append(screenWidthDp); sb.append("dp");
         } else {
-            sb.append("?wdp");
+            sb.append(" ?wdp");
         }
         if (screenHeightDp != SCREEN_HEIGHT_DP_UNDEFINED) {
             sb.append(" h"); sb.append(screenHeightDp); sb.append("dp");
         } else {
-            sb.append("?hdp");
+            sb.append(" ?hdp");
         }
         switch ((screenLayout&SCREENLAYOUT_SIZE_MASK)) {
             case SCREENLAYOUT_SIZE_UNDEFINED: sb.append(" ?lsize"); break;
@@ -444,9 +454,9 @@
         orientation = ORIENTATION_UNDEFINED;
         screenLayout = SCREENLAYOUT_SIZE_UNDEFINED;
         uiMode = UI_MODE_TYPE_UNDEFINED;
-        screenWidthDp = SCREEN_WIDTH_DP_UNDEFINED;
-        screenHeightDp = SCREEN_HEIGHT_DP_UNDEFINED;
-        smallestScreenWidthDp = SMALLEST_SCREEN_WIDTH_DP_UNDEFINED;
+        screenWidthDp = compatScreenWidthDp = SCREEN_WIDTH_DP_UNDEFINED;
+        screenHeightDp = compatScreenHeightDp = SCREEN_HEIGHT_DP_UNDEFINED;
+        smallestScreenWidthDp = compatSmallestScreenWidthDp = SMALLEST_SCREEN_WIDTH_DP_UNDEFINED;
         seq = 0;
     }
 
@@ -550,11 +560,18 @@
             changed |= ActivityInfo.CONFIG_SCREEN_SIZE;
             screenHeightDp = delta.screenHeightDp;
         }
-        if (delta.smallestScreenWidthDp != SMALLEST_SCREEN_WIDTH_DP_UNDEFINED
-                && smallestScreenWidthDp != delta.smallestScreenWidthDp) {
-            changed |= ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE;
+        if (delta.smallestScreenWidthDp != SMALLEST_SCREEN_WIDTH_DP_UNDEFINED) {
             smallestScreenWidthDp = delta.smallestScreenWidthDp;
         }
+        if (delta.compatScreenWidthDp != SCREEN_WIDTH_DP_UNDEFINED) {
+            compatScreenWidthDp = delta.compatScreenWidthDp;
+        }
+        if (delta.compatScreenHeightDp != SCREEN_HEIGHT_DP_UNDEFINED) {
+            compatScreenHeightDp = delta.compatScreenHeightDp;
+        }
+        if (delta.compatSmallestScreenWidthDp != SMALLEST_SCREEN_WIDTH_DP_UNDEFINED) {
+            compatSmallestScreenWidthDp = delta.compatSmallestScreenWidthDp;
+        }
         
         if (delta.seq != 0) {
             seq = delta.seq;
@@ -739,6 +756,9 @@
         dest.writeInt(screenWidthDp);
         dest.writeInt(screenHeightDp);
         dest.writeInt(smallestScreenWidthDp);
+        dest.writeInt(compatScreenWidthDp);
+        dest.writeInt(compatScreenHeightDp);
+        dest.writeInt(compatSmallestScreenWidthDp);
         dest.writeInt(seq);
     }
 
@@ -763,6 +783,9 @@
         screenWidthDp = source.readInt();
         screenHeightDp = source.readInt();
         smallestScreenWidthDp = source.readInt();
+        compatScreenWidthDp = source.readInt();
+        compatScreenHeightDp = source.readInt();
+        compatSmallestScreenWidthDp = source.readInt();
         seq = source.readInt();
     }
     
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java
index e63e7eb..bd8b1a4 100755
--- a/core/java/android/content/res/Resources.java
+++ b/core/java/android/content/res/Resources.java
@@ -28,14 +28,13 @@
 import android.graphics.drawable.Drawable.ConstantState;
 import android.os.Build;
 import android.os.Bundle;
-import android.os.SystemProperties;
 import android.util.AttributeSet;
 import android.util.DisplayMetrics;
 import android.util.Log;
+import android.util.Slog;
 import android.util.SparseArray;
 import android.util.TypedValue;
 import android.util.LongSparseArray;
-import android.view.Display;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -193,11 +192,7 @@
             Configuration config, CompatibilityInfo compInfo) {
         mAssets = assets;
         mMetrics.setToDefaults();
-        if (compInfo == null) {
-            mCompatibilityInfo = CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO;
-        } else {
-            mCompatibilityInfo = compInfo;
-        }
+        mCompatibilityInfo = compInfo;
         updateConfiguration(config, metrics);
         assets.ensureStringBlocks();
     }
@@ -1410,19 +1405,15 @@
     public void updateConfiguration(Configuration config,
             DisplayMetrics metrics, CompatibilityInfo compat) {
         synchronized (mTmpValue) {
+            if (false) {
+                Slog.i(TAG, "**** Updating config of " + this + ": old config is "
+                        + mConfiguration + " old compat is " + mCompatibilityInfo);
+                Slog.i(TAG, "**** Updating config of " + this + ": new config is "
+                        + config + " new compat is " + compat);
+            }
             if (compat != null) {
                 mCompatibilityInfo = compat;
             }
-            int configChanges = 0xfffffff;
-            if (config != null) {
-                mTmpConfig.setTo(config);
-                mCompatibilityInfo.applyToConfiguration(mTmpConfig);
-                configChanges = mConfiguration.updateFrom(mTmpConfig);
-                configChanges = ActivityInfo.activityInfoConfigToNative(configChanges);
-            }
-            if (mConfiguration.locale == null) {
-                mConfiguration.locale = Locale.getDefault();
-            }
             if (metrics != null) {
                 mMetrics.setTo(metrics);
                 // NOTE: We should re-arrange this code to create a Display
@@ -1434,9 +1425,29 @@
                 // it would be cleaner and more maintainble to just be
                 // consistently dealing with a compatible display everywhere in
                 // the framework.
+                if (mCompatibilityInfo != null) {
+                    mCompatibilityInfo.applyToDisplayMetrics(mMetrics);
+                }
+            }
+            if (mCompatibilityInfo != null) {
                 mCompatibilityInfo.applyToDisplayMetrics(mMetrics);
             }
             mMetrics.scaledDensity = mMetrics.density * mConfiguration.fontScale;
+            int configChanges = 0xfffffff;
+            if (config != null) {
+                mTmpConfig.setTo(config);
+                if (mCompatibilityInfo != null) {
+                    mCompatibilityInfo.applyToConfiguration(mTmpConfig);
+                }
+                if (mTmpConfig.locale == null) {
+                    mTmpConfig.locale = Locale.getDefault();
+                }
+                configChanges = mConfiguration.updateFrom(mTmpConfig);
+                configChanges = ActivityInfo.activityInfoConfigToNative(configChanges);
+            }
+            if (mConfiguration.locale == null) {
+                mConfiguration.locale = Locale.getDefault();
+            }
 
             String locale = null;
             if (mConfiguration.locale != null) {
@@ -1471,6 +1482,11 @@
                     mConfiguration.screenLayout, mConfiguration.uiMode,
                     Build.VERSION.RESOURCES_SDK_INT);
 
+            if (DEBUG_CONFIG) {
+                Slog.i(TAG, "**** Updating config of " + this + ": final config is " + mConfiguration
+                        + " final compat is " + mCompatibilityInfo);
+            }
+
             clearDrawableCache(mDrawableCache, configChanges);
             clearDrawableCache(mColorDrawableCache, configChanges);
 
@@ -1548,6 +1564,8 @@
      * @return The resource's current display metrics. 
      */
     public DisplayMetrics getDisplayMetrics() {
+        if (DEBUG_CONFIG) Slog.v(TAG, "Returning DisplayMetrics: " + mMetrics.widthPixels
+                + "x" + mMetrics.heightPixels + " " + mMetrics.density);
         return mMetrics;
     }
 
@@ -1565,11 +1583,12 @@
      * Return the compatibility mode information for the application.
      * The returned object should be treated as read-only.
      * 
-     * @return compatibility info. null if the app does not require compatibility mode.
+     * @return compatibility info.
      * @hide
      */
     public CompatibilityInfo getCompatibilityInfo() {
-        return mCompatibilityInfo;
+        return mCompatibilityInfo != null ? mCompatibilityInfo
+                : CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO;
     }
 
     /**
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 491c73a..b305e02 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -165,14 +165,12 @@
 
     /**
      * The Default Mobile data connection.  When active, all data traffic
-     * will use this connection by default.  Should not coexist with other
-     * default connections.
+     * will use this connection by default.
      */
     public static final int TYPE_MOBILE      = 0;
     /**
      * The Default WIFI data connection.  When active, all data traffic
-     * will use this connection by default.  Should not coexist with other
-     * default connections.
+     * will use this connection by default.
      */
     public static final int TYPE_WIFI        = 1;
     /**
@@ -208,20 +206,22 @@
     public static final int TYPE_MOBILE_HIPRI = 5;
     /**
      * The Default WiMAX data connection.  When active, all data traffic
-     * will use this connection by default.  Should not coexist with other
-     * default connections.
+     * will use this connection by default.
      */
     public static final int TYPE_WIMAX       = 6;
 
     /**
-     * Bluetooth data connection. This is used for Bluetooth reverse tethering.
-     * @hide
+     * The Default Bluetooth data connection. When active, all data traffic
+     * will use this connection by default.
      */
     public static final int TYPE_BLUETOOTH   = 7;
 
     /** {@hide} */
     public static final int TYPE_DUMMY       = 8;
-    /** {@hide} */
+    /**
+     * The Default Ethernet data connection.  When active, all data traffic
+     * will use this connection by default.
+     */
     public static final int TYPE_ETHERNET    = 9;
     /** {@hide} TODO: Need to adjust this for WiMAX. */
     public static final int MAX_RADIO_TYPE   = TYPE_ETHERNET;
diff --git a/core/java/android/net/DhcpStateMachine.java b/core/java/android/net/DhcpStateMachine.java
index f5cf14b..e2230c9 100644
--- a/core/java/android/net/DhcpStateMachine.java
+++ b/core/java/android/net/DhcpStateMachine.java
@@ -66,6 +66,9 @@
     private static final int DHCP_RENEW = 0;
     private static final String ACTION_DHCP_RENEW = "android.net.wifi.DHCP_RENEW";
 
+    //Used for sanity check on setting up renewal
+    private static final int MIN_RENEWAL_TIME_SECS = 5 * 60;  // 5 minutes
+
     private enum DhcpAction {
         START,
         RENEW
@@ -331,13 +334,21 @@
 
         if (success) {
             Log.d(TAG, "DHCP succeeded on " + mInterfaceName);
-            //Do it a bit earlier than half the lease duration time
-            //to beat the native DHCP client and avoid extra packets
-            //48% for one hour lease time = 29 minutes
-            mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
-                    SystemClock.elapsedRealtime() +
-                    dhcpInfoInternal.leaseDuration * 480, //in milliseconds
-                    mDhcpRenewalIntent);
+           long leaseDuration = dhcpInfoInternal.leaseDuration; //int to long conversion
+
+           //Sanity check for renewal
+           //TODO: would be good to notify the user that his network configuration is
+           //bad and that the device cannot renew below MIN_RENEWAL_TIME_SECS
+           if (leaseDuration < MIN_RENEWAL_TIME_SECS) {
+               leaseDuration = MIN_RENEWAL_TIME_SECS;
+           }
+           //Do it a bit earlier than half the lease duration time
+           //to beat the native DHCP client and avoid extra packets
+           //48% for one hour lease time = 29 minutes
+           mAlarmManager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,
+                   SystemClock.elapsedRealtime() +
+                   leaseDuration * 480, //in milliseconds
+                   mDhcpRenewalIntent);
 
             mController.obtainMessage(CMD_POST_DHCP_ACTION, DHCP_SUCCESS, 0, dhcpInfoInternal)
                 .sendToTarget();
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 8735019..93c8715 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -232,9 +232,39 @@
         public static final int HONEYCOMB_MR1 = 12;
         
         /**
-         * Current development version.
+         * June 2011: Android 3.2.
+         *
+         * <p>Update to Honeycomb MR1 to support 7 inch tablets, improve
+         * screen compatibility mode, etc.</p>
+         *
+         * <p>As of this version, applications that don't say whether they
+         * support XLARGE screens will be assumed to do so only if they target
+         * {@link #HONEYCOMB} or later; it had been {@link #GINGERBREAD} or
+         * later.  Applications that don't support a screen size at least as
+         * large as the current screen will provide the user with a UI to
+         * switch them in to screen size compatibility mode.</p>
+         *
+         * <p>This version introduces new screen size resource qualifiers
+         * based on the screen size in dp: see
+         * {@link android.content.res.Configuration#screenWidthDp},
+         * {@link android.content.res.Configuration#screenHeightDp}, and
+         * {@link android.content.res.Configuration#smallestScreenWidthDp}.
+         * Supplying these in &lt;supports-screens&gt; as per
+         * {@link android.content.pm.ApplicationInfo#requiresSmallestWidthDp},
+         * {@link android.content.pm.ApplicationInfo#compatibleWidthLimitDp}, and
+         * {@link android.content.pm.ApplicationInfo#largestWidthLimitDp} is
+         * preferred over the older screen size buckets and for older devices
+         * the appropriate buckets will be inferred from them.</p>
+         *
+         * <p>New {@link android.content.pm.PackageManager#FEATURE_SCREEN_PORTRAIT}
+         * and {@link android.content.pm.PackageManager#FEATURE_SCREEN_LANDSCAPE}
+         * features are introduced in this release.  Applications that target
+         * previous platform versions are assumed to require both portrait and
+         * landscape support in the device; when targeting Honeycomb MR1 or
+         * greater the application is responsible for specifying any specific
+         * orientation it requires.</p>
          */
-        public static final int HONEYCOMB_MR2 = CUR_DEVELOPMENT;
+        public static final int HONEYCOMB_MR2 = 13;
     }
     
     /** The type of build, like "user" or "eng". */
diff --git a/core/java/android/os/IBinder.java b/core/java/android/os/IBinder.java
index 8876354..81defd6 100644
--- a/core/java/android/os/IBinder.java
+++ b/core/java/android/os/IBinder.java
@@ -110,6 +110,24 @@
     int INTERFACE_TRANSACTION   = ('_'<<24)|('N'<<16)|('T'<<8)|'F';
 
     /**
+     * IBinder protocol transaction code: send a tweet to the target
+     * object.  The data in the parcel is intended to be delivered to
+     * a shared messaging service associated with the object; it can be
+     * anything, as long as it is not more than 130 UTF-8 characters to
+     * conservatively fit within common messaging services.  As part of
+     * {@link Build.VERSION_CODES#HONEYCOMB_MR2}, all Binder objects are
+     * expected to support this protocol for fully integrated tweeting
+     * across the platform.  To support older code, the default implementation
+     * logs the tweet to the main log as a simple emulation of broadcasting
+     * it publicly over the Internet.
+     * 
+     * <p>Also, upon completing the dispatch, the object must make a cup
+     * of tea, return it to the caller, and exclaim "jolly good message
+     * old boy!".
+     */
+    int TWEET_TRANSACTION   = ('_'<<24)|('T'<<16)|('W'<<8)|'T';
+
+    /**
      * Flag to {@link #transact}: this is a one-way call, meaning that the
      * caller returns immediately, without waiting for a result from the
      * callee. Applies only if the caller and callee are in different
diff --git a/core/java/android/os/Parcel.java b/core/java/android/os/Parcel.java
index 6b35215..e9ed676 100644
--- a/core/java/android/os/Parcel.java
+++ b/core/java/android/os/Parcel.java
@@ -1980,6 +1980,9 @@
             }
         }
 
+        if (creator instanceof Parcelable.ClassLoaderCreator<?>) {
+            return ((Parcelable.ClassLoaderCreator<T>)creator).createFromParcel(this, loader);
+        }
         return creator.createFromParcel(this);
     }
 
diff --git a/core/java/android/os/Parcelable.java b/core/java/android/os/Parcelable.java
index 0a4b60f..594fbb2 100644
--- a/core/java/android/os/Parcelable.java
+++ b/core/java/android/os/Parcelable.java
@@ -113,4 +113,22 @@
          */
         public T[] newArray(int size);
     }
+
+    /**
+     * Specialization of {@link Creator} that allows you to receive the
+     * ClassLoader the object is being created in.
+     */
+    public interface ClassLoaderCreator<T> extends Creator<T> {
+        /**
+         * Create a new instance of the Parcelable class, instantiating it
+         * from the given Parcel whose data had previously been written by
+         * {@link Parcelable#writeToParcel Parcelable.writeToParcel()} and
+         * using the given ClassLoader.
+         *
+         * @param source The Parcel to read the object's data from.
+         * @param loader The ClassLoader that this object is being created in.
+         * @return Returns a new instance of the Parcelable class.
+         */
+        public T createFromParcel(Parcel source, ClassLoader loader);
+    }
 }
diff --git a/core/java/android/preference/PreferenceFragment.java b/core/java/android/preference/PreferenceFragment.java
index 4e22ba0..7766b54 100644
--- a/core/java/android/preference/PreferenceFragment.java
+++ b/core/java/android/preference/PreferenceFragment.java
@@ -145,7 +145,6 @@
         super.onCreate(savedInstanceState);
         mPreferenceManager = new PreferenceManager(getActivity(), FIRST_REQUEST_CODE);
         mPreferenceManager.setFragment(this);
-        mPreferenceManager.setOnPreferenceTreeClickListener(this);
     }
 
     @Override
@@ -178,9 +177,16 @@
     }
 
     @Override
+    public void onStart() {
+        super.onStart();
+        mPreferenceManager.setOnPreferenceTreeClickListener(this);
+    }
+
+    @Override
     public void onStop() {
         super.onStop();
         mPreferenceManager.dispatchActivityStop();
+        mPreferenceManager.setOnPreferenceTreeClickListener(null);
     }
 
     @Override
@@ -195,7 +201,6 @@
     public void onDestroy() {
         super.onDestroy();
         mPreferenceManager.dispatchActivityDestroy();
-        mPreferenceManager.setOnPreferenceTreeClickListener(null);
     }
 
     @Override
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index fbdc0ba..58d9952 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1791,6 +1791,16 @@
         public static final String SIP_ASK_ME_EACH_TIME = "SIP_ASK_ME_EACH_TIME";
 
         /**
+         * Pointer speed setting.
+         * This is an integer value in a range between -7 and +7, so there are 15 possible values.
+         *   -7 = slowest
+         *    0 = default speed
+         *   +7 = fastest
+         * @hide
+         */
+        public static final String POINTER_SPEED = "pointer_speed";
+
+        /**
          * Settings to backup. This is here so that it's in the same place as the settings
          * keys and easy to update.
          * @hide
@@ -1854,6 +1864,7 @@
             USE_PTP_INTERFACE,
             SIP_CALL_OPTIONS,
             SIP_RECEIVE_CALLS,
+            POINTER_SPEED,
         };
 
         // Settings moved to Settings.Secure
diff --git a/core/java/android/text/TextLine.java b/core/java/android/text/TextLine.java
index 90279d1..155870a 100644
--- a/core/java/android/text/TextLine.java
+++ b/core/java/android/text/TextLine.java
@@ -75,7 +75,6 @@
             }
         }
         tl = new TextLine();
-        Log.v("TLINE", "new: " + tl);
         return tl;
     }
 
diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java
index 60a4ef2..d594567 100644
--- a/core/java/android/util/DisplayMetrics.java
+++ b/core/java/android/util/DisplayMetrics.java
@@ -38,6 +38,15 @@
     public static final int DENSITY_MEDIUM = 160;
 
     /**
+     * Standard quantized DPI for 720p TV screens.  Applications should
+     * generally not worry about this density, instead targeting
+     * {@link #DENSITY_XHIGH} for 1080p TV screens.  For situations where
+     * output is needed for a 720p screen, the UI elements can be scaled
+     * automatically by the platform.
+     */
+    public static final int DENSITY_TV = 213;
+
+    /**
      * Standard quantized DPI for high-density screens.
      */
     public static final int DENSITY_HIGH = 240;
diff --git a/core/java/android/view/CompatibilityInfoHolder.java b/core/java/android/view/CompatibilityInfoHolder.java
new file mode 100644
index 0000000..fc8d684
--- /dev/null
+++ b/core/java/android/view/CompatibilityInfoHolder.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.view;
+
+import android.content.res.CompatibilityInfo;
+
+/** @hide */
+public class CompatibilityInfoHolder {
+    private volatile CompatibilityInfo mCompatInfo = CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO;
+
+    public void set(CompatibilityInfo compatInfo) {
+        if (compatInfo != null && (compatInfo.isScalingRequired()
+                || !compatInfo.supportsScreen())) {
+            mCompatInfo = compatInfo;
+        } else {
+            mCompatInfo = CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO;
+        }
+    }
+
+    public CompatibilityInfo get() {
+        return mCompatInfo;
+    }
+
+    public CompatibilityInfo getIfNeeded() {
+        CompatibilityInfo ci = mCompatInfo;
+        if (ci == null || ci  == CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO) {
+            return null;
+        }
+        return ci;
+    }
+}
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index 8032546..3fa8dfd 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -26,6 +26,9 @@
 import android.util.Slog;
 
 public class Display {
+    static final String TAG = "Display";
+    static final boolean DEBUG_COMPAT = false;
+
     /**
      * Specify the default Display
      */
@@ -38,7 +41,7 @@
      * Display gives you access to some information about a particular display
      * connected to the device.
      */
-    Display(int display, CompatibilityInfo compatInfo) {
+    Display(int display, CompatibilityInfoHolder compatInfo) {
         // initalize the statics when this class is first instansiated. This is
         // done here instead of in the static block because Zygote
         synchronized (sStaticInit) {
@@ -47,15 +50,20 @@
                 sInitialized = true;
             }
         }
-        if (compatInfo != null && (compatInfo.isScalingRequired()
-                || !compatInfo.supportsScreen())) {
-            mCompatibilityInfo = compatInfo;
-        } else {
-            mCompatibilityInfo = null;
-        }
+        mCompatibilityInfo = compatInfo != null ? compatInfo : new CompatibilityInfoHolder();
         mDisplay = display;
         init(display);
     }
+
+    /** @hide */
+    public static void setCompatibilityInfo(CompatibilityInfo compatInfo) {
+        if (compatInfo != null && (compatInfo.isScalingRequired()
+                || !compatInfo.supportsScreen())) {
+            sCompatibilityInfo = compatInfo;
+        } else {
+            sCompatibilityInfo = null;
+        }
+    }
     
     /**
      * Returns the index of this display.  This is currently undefined; do
@@ -96,12 +104,13 @@
             IWindowManager wm = getWindowManager();
             if (wm != null) {
                 wm.getDisplaySize(outSize);
-                if (doCompat && mCompatibilityInfo != null) {
+                CompatibilityInfo ci;
+                if (doCompat && (ci=mCompatibilityInfo.getIfNeeded()) != null) {
                     synchronized (mTmpMetrics) {
                         mTmpMetrics.unscaledWidthPixels = outSize.x;
                         mTmpMetrics.unscaledHeightPixels = outSize.y;
                         mTmpMetrics.density = mDensity;
-                        mCompatibilityInfo.applyToDisplayMetrics(mTmpMetrics);
+                        ci.applyToDisplayMetrics(mTmpMetrics);
                         outSize.x = mTmpMetrics.widthPixels;
                         outSize.y = mTmpMetrics.heightPixels;
                     }
@@ -111,6 +120,7 @@
                 // system process before the window manager is up.
                 outSize.y = getRealHeight();
             }
+            if (DEBUG_COMPAT && doCompat) Slog.v(TAG, "Returning display size: " + outSize);
         } catch (RemoteException e) {
             Slog.w("Display", "Unable to get display size", e);
         }
@@ -236,9 +246,13 @@
         }
         getNonSizeMetrics(outMetrics);
 
-        if (mCompatibilityInfo != null) {
-            mCompatibilityInfo.applyToDisplayMetrics(outMetrics);
+        CompatibilityInfo ci = mCompatibilityInfo.getIfNeeded();
+        if (ci != null) {
+            ci.applyToDisplayMetrics(outMetrics);
         }
+
+        if (DEBUG_COMPAT) Slog.v(TAG, "Returning DisplayMetrics: " + outMetrics.widthPixels
+                + "x" + outMetrics.heightPixels + " " + outMetrics.density);
     }
 
     /**
@@ -282,7 +296,7 @@
     
     private native void init(int display);
 
-    private final CompatibilityInfo mCompatibilityInfo;
+    private final CompatibilityInfoHolder mCompatibilityInfo;
     private final int   mDisplay;
     // Following fields are initialized from native code
     private int         mPixelFormat;
@@ -299,11 +313,13 @@
     private static boolean sInitialized = false;
     private static IWindowManager sWindowManager;
 
+    private static volatile CompatibilityInfo sCompatibilityInfo;
+
     /**
      * Returns a display object which uses the metric's width/height instead.
      * @hide
      */
-    public static Display createCompatibleDisplay(int displayId, CompatibilityInfo compat) {
+    public static Display createCompatibleDisplay(int displayId, CompatibilityInfoHolder compat) {
         return new Display(displayId, compat);
     }
 }
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index bdf04ab0..ad17edf 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -19,6 +19,7 @@
 import com.android.internal.view.IInputContext;
 import com.android.internal.view.IInputMethodClient;
 
+import android.content.res.CompatibilityInfo;
 import android.content.res.Configuration;
 import android.graphics.Bitmap;
 import android.graphics.Point;
@@ -88,7 +89,7 @@
     void overridePendingAppTransition(String packageName, int enterAnim, int exitAnim);
     void executeAppTransition();
     void setAppStartingWindow(IBinder token, String pkg, int theme,
-            CharSequence nonLocalizedLabel, int labelRes,
+            in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes,
             int icon, int windowFlags, IBinder transferFrom, boolean createIfNeeded);
     void setAppWillBeHidden(IBinder token);
     void setAppVisibility(IBinder token, boolean visible);
@@ -204,4 +205,9 @@
      * Called by the status bar to notify Views of changes to System UI visiblity.
      */
     void statusBarVisibilityChanged(int visibility);
+
+    /**
+     * Called by the settings application to temporarily set the pointer speed.
+     */
+    void setPointerSpeed(int speed);
 }
diff --git a/core/java/android/view/ScaleGestureDetector.java b/core/java/android/view/ScaleGestureDetector.java
index d638e70..6a21b5a 100644
--- a/core/java/android/view/ScaleGestureDetector.java
+++ b/core/java/android/view/ScaleGestureDetector.java
@@ -329,6 +329,15 @@
                         // Set focus point to the remaining finger
                         final int index = event.findPointerIndex(actionId == mActiveId0 ?
                                 mActiveId1 : mActiveId0);
+                        if (index < 0) {
+                            mInvalidGesture = true;
+                            Log.e(TAG, "Invalid MotionEvent stream detected.", new Throwable());
+                            if (mGestureInProgress) {
+                                mListener.onScaleEnd(this);
+                            }
+                            return false;
+                        }
+
                         mActiveId0 = event.getPointerId(index);
 
                         mActive0MostRecent = true;
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java
index 739758c..392797c 100644
--- a/core/java/android/view/ViewConfiguration.java
+++ b/core/java/android/view/ViewConfiguration.java
@@ -111,7 +111,21 @@
      * double-tap.
      */
     private static final int DOUBLE_TAP_TIMEOUT = 300;
-    
+
+    /**
+     * Defines the maximum duration in milliseconds between a touch pad
+     * touch and release for a given touch to be considered a tap (click) as
+     * opposed to a hover movement gesture.
+     */
+    private static final int HOVER_TAP_TIMEOUT = 150;
+
+    /**
+     * Defines the maximum distance in pixels that a touch pad touch can move
+     * before being released for it to be considered a tap (click) as opposed
+     * to a hover movement gesture.
+     */
+    private static final int HOVER_TAP_SLOP = 20;
+
     /**
      * Defines the duration in milliseconds we want to display zoom controls in response 
      * to a user panning within an application.
@@ -360,7 +374,7 @@
     public static int getTapTimeout() {
         return TAP_TIMEOUT;
     }
-    
+
     /**
      * @return the duration in milliseconds we will wait to see if a touch event
      * is a jump tap. If the user does not move within this interval, it is
@@ -378,7 +392,27 @@
     public static int getDoubleTapTimeout() {
         return DOUBLE_TAP_TIMEOUT;
     }
-    
+
+    /**
+     * @return the maximum duration in milliseconds between a touch pad
+     * touch and release for a given touch to be considered a tap (click) as
+     * opposed to a hover movement gesture.
+     * @hide
+     */
+    public static int getHoverTapTimeout() {
+        return HOVER_TAP_TIMEOUT;
+    }
+
+    /**
+     * @return the maximum distance in pixels that a touch pad touch can move
+     * before being released for it to be considered a tap (click) as opposed
+     * to a hover movement gesture.
+     * @hide
+     */
+    public static int getHoverTapSlop() {
+        return HOVER_TAP_SLOP;
+    }
+
     /**
      * @return Inset in pixels to look for touchable content when the user touches the edge of the
      *         screen
diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java
index 5ad0b6b..cdb0339 100644
--- a/core/java/android/view/ViewRoot.java
+++ b/core/java/android/view/ViewRoot.java
@@ -159,6 +159,8 @@
     // so the window should no longer be active.
     boolean mStopped = false;
     
+    boolean mLastInCompatMode = false;
+
     SurfaceHolder.Callback2 mSurfaceHolderCallback;
     BaseSurfaceHolder mSurfaceHolder;
     boolean mIsCreating;
@@ -204,6 +206,8 @@
     boolean mAdded;
     boolean mAddedTouchMode;
 
+    CompatibilityInfoHolder mCompatibilityInfo;
+
     /*package*/ int mAddNesting;
 
     // These are accessed by multiple threads.
@@ -369,8 +373,7 @@
                     enableHardwareAcceleration(attrs);
                 }
 
-                Resources resources = mView.getContext().getResources();
-                CompatibilityInfo compatibilityInfo = resources.getCompatibilityInfo();
+                CompatibilityInfo compatibilityInfo = mCompatibilityInfo.get();
                 mTranslator = compatibilityInfo.getTranslator();
 
                 if (mTranslator != null) {
@@ -387,6 +390,7 @@
 
                 if (!compatibilityInfo.supportsScreen()) {
                     attrs.flags |= WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
+                    mLastInCompatMode = true;
                 }
 
                 mSoftInputMode = attrs.softInputMode;
@@ -719,15 +723,35 @@
             surfaceChanged = true;
             params = lp;
         }
+        CompatibilityInfo compatibilityInfo = mCompatibilityInfo.get();
+        if (compatibilityInfo.supportsScreen() == mLastInCompatMode) {
+            params = lp;
+            fullRedrawNeeded = true;
+            mLayoutRequested = true;
+            if (mLastInCompatMode) {
+                params.flags &= ~WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
+                mLastInCompatMode = false;
+            } else {
+                params.flags |= WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
+                mLastInCompatMode = true;
+            }
+        }
         Rect frame = mWinFrame;
         if (mFirst) {
             fullRedrawNeeded = true;
             mLayoutRequested = true;
 
-            DisplayMetrics packageMetrics =
-                mView.getContext().getResources().getDisplayMetrics();
-            desiredWindowWidth = packageMetrics.widthPixels;
-            desiredWindowHeight = packageMetrics.heightPixels;
+            if (lp.type == WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL) {
+                // NOTE -- system code, won't try to do compat mode.
+                Display disp = WindowManagerImpl.getDefault().getDefaultDisplay();
+                desiredWindowWidth = disp.getRealWidth();
+                desiredWindowHeight = disp.getRealHeight();
+            } else {
+                DisplayMetrics packageMetrics =
+                    mView.getContext().getResources().getDisplayMetrics();
+                desiredWindowWidth = packageMetrics.widthPixels;
+                desiredWindowHeight = packageMetrics.heightPixels;
+            }
 
             // For the very first time, tell the view hierarchy that it
             // is attached to the window.  Note that at this point the surface
@@ -851,9 +875,16 @@
                         || lp.height == ViewGroup.LayoutParams.WRAP_CONTENT) {
                     windowSizeMayChange = true;
 
-                    DisplayMetrics packageMetrics = res.getDisplayMetrics();
-                    desiredWindowWidth = packageMetrics.widthPixels;
-                    desiredWindowHeight = packageMetrics.heightPixels;
+                    if (lp.type == WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL) {
+                        // NOTE -- system code, won't try to do compat mode.
+                        Display disp = WindowManagerImpl.getDefault().getDefaultDisplay();
+                        desiredWindowWidth = disp.getRealWidth();
+                        desiredWindowHeight = disp.getRealHeight();
+                    } else {
+                        DisplayMetrics packageMetrics = res.getDisplayMetrics();
+                        desiredWindowWidth = packageMetrics.widthPixels;
+                        desiredWindowHeight = packageMetrics.heightPixels;
+                    }
                 }
             }
 
@@ -1920,6 +1951,13 @@
                 "Applying new config to window "
                 + mWindowAttributes.getTitle()
                 + ": " + config);
+
+        CompatibilityInfo ci = mCompatibilityInfo.getIfNeeded();
+        if (ci != null) {
+            config = new Configuration(config);
+            ci.applyToConfiguration(config);
+        }
+
         synchronized (sConfigCallbacks) {
             for (int i=sConfigCallbacks.size()-1; i>=0; i--) {
                 sConfigCallbacks.get(i).onConfigurationChanged(config);
@@ -1981,6 +2019,7 @@
     public final static int DISPATCH_DRAG_LOCATION_EVENT = 1016;
     public final static int DISPATCH_SYSTEM_UI_VISIBILITY = 1017;
     public final static int DISPATCH_GENERIC_MOTION = 1018;
+    public final static int UPDATE_CONFIGURATION = 1019;
 
     @Override
     public void handleMessage(Message msg) {
@@ -2164,6 +2203,13 @@
         case DISPATCH_SYSTEM_UI_VISIBILITY: {
             handleDispatchSystemUiVisibilityChanged(msg.arg1);
         } break;
+        case UPDATE_CONFIGURATION: {
+            Configuration config = (Configuration)msg.obj;
+            if (config.isOtherSeqNewer(mLastConfiguration)) {
+                config = mLastConfiguration;
+            }
+            updateConfiguration(config, false);
+        } break;
         }
     }
     
@@ -3191,6 +3237,11 @@
         }
     }
 
+    public void requestUpdateConfiguration(Configuration config) {
+        Message msg = obtainMessage(UPDATE_CONFIGURATION, config);
+        sendMessage(msg);
+    }
+
     private void destroyHardwareRenderer() {
         if (mAttachInfo.mHardwareRenderer != null) {
             mAttachInfo.mHardwareRenderer.destroy(true);
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 5236a9e..e07085c 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -16,6 +16,7 @@
 
 package android.view;
 
+import android.app.Application;
 import android.content.Context;
 import android.content.res.CompatibilityInfo;
 import android.content.res.Configuration;
@@ -25,6 +26,7 @@
 import android.net.Uri;
 import android.os.Bundle;
 import android.os.IBinder;
+import android.util.Slog;
 import android.view.accessibility.AccessibilityEvent;
 
 /**
@@ -463,11 +465,16 @@
         mWindowManager = new LocalWindowManager(wm, hardwareAccelerated);
     }
 
+    static CompatibilityInfoHolder getCompatInfo(Context context) {
+        Application app = (Application)context.getApplicationContext();
+        return app != null ? app.mLoadedApk.mCompatibilityInfo : new CompatibilityInfoHolder();
+    }
+
     private class LocalWindowManager extends WindowManagerImpl.CompatModeWrapper {
         private final boolean mHardwareAccelerated;
 
         LocalWindowManager(WindowManager wm, boolean hardwareAccelerated) {
-            super(wm, mContext.getResources().getCompatibilityInfo());
+            super(wm, getCompatInfo(mContext));
             mHardwareAccelerated = hardwareAccelerated;
         }
 
diff --git a/core/java/android/view/WindowManagerImpl.java b/core/java/android/view/WindowManagerImpl.java
index 9cae75c..02ab1dc 100644
--- a/core/java/android/view/WindowManagerImpl.java
+++ b/core/java/android/view/WindowManagerImpl.java
@@ -19,11 +19,13 @@
 import java.util.HashMap;
 
 import android.content.res.CompatibilityInfo;
+import android.content.res.Configuration;
 import android.graphics.PixelFormat;
 import android.os.IBinder;
 import android.util.AndroidRuntimeException;
 import android.util.Config;
 import android.util.Log;
+import android.util.Slog;
 import android.view.WindowManager;
 import android.view.inputmethod.InputMethodManager;
 
@@ -88,29 +90,32 @@
             = new HashMap<CompatibilityInfo, WindowManager>();
 
     static class CompatModeWrapper implements WindowManager {
-        private final WindowManager mWindowManager;
+        private final WindowManagerImpl mWindowManager;
         private final Display mDefaultDisplay;
+        private final CompatibilityInfoHolder mCompatibilityInfo;
 
-        CompatModeWrapper(WindowManager wm, CompatibilityInfo ci) {
-            mWindowManager = wm;
+        CompatModeWrapper(WindowManager wm, CompatibilityInfoHolder ci) {
+            mWindowManager = wm instanceof CompatModeWrapper
+                    ? ((CompatModeWrapper)wm).mWindowManager : (WindowManagerImpl)wm;
 
             // Use the original display if there is no compatibility mode
             // to apply, or the underlying window manager is already a
             // compatibility mode wrapper.  (We assume that if it is a
             // wrapper, it is applying the same compatibility mode.)
-            if (ci == null || wm instanceof CompatModeWrapper
-                    || (!ci.isScalingRequired() && ci.supportsScreen())) {
+            if (ci == null) {
                 mDefaultDisplay = mWindowManager.getDefaultDisplay();
             } else {
                 //mDefaultDisplay = mWindowManager.getDefaultDisplay();
                 mDefaultDisplay = Display.createCompatibleDisplay(
                         mWindowManager.getDefaultDisplay().getDisplayId(), ci);
             }
+
+            mCompatibilityInfo = ci;
         }
 
         @Override
         public void addView(View view, android.view.ViewGroup.LayoutParams params) {
-            mWindowManager.addView(view, params);
+            mWindowManager.addView(view, params, mCompatibilityInfo);
         }
 
         @Override
@@ -146,8 +151,9 @@
     }
 
     public static WindowManager getDefault(CompatibilityInfo compatInfo) {
-        if (compatInfo == null || (!compatInfo.isScalingRequired()
-                && compatInfo.supportsScreen())) {
+        CompatibilityInfoHolder cih = new CompatibilityInfoHolder();
+        cih.set(compatInfo);
+        if (cih.getIfNeeded() == null) {
             return sWindowManager;
         }
 
@@ -159,35 +165,40 @@
             // having to make wrappers.
             WindowManager wm = sCompatWindowManagers.get(compatInfo);
             if (wm == null) {
-                wm = new CompatModeWrapper(sWindowManager, compatInfo);
+                wm = new CompatModeWrapper(sWindowManager, cih);
                 sCompatWindowManagers.put(compatInfo, wm);
             }
             return wm;
         }
     }
+
+    public static WindowManager getDefault(CompatibilityInfoHolder compatInfo) {
+        return new CompatModeWrapper(sWindowManager, compatInfo);
+    }
     
     public boolean isHardwareAccelerated() {
         return false;
     }
     
-    public void addView(View view)
-    {
+    public void addView(View view) {
         addView(view, new WindowManager.LayoutParams(
             WindowManager.LayoutParams.TYPE_APPLICATION, 0, PixelFormat.OPAQUE));
     }
 
-    public void addView(View view, ViewGroup.LayoutParams params)
-    {
-        addView(view, params, false);
+    public void addView(View view, ViewGroup.LayoutParams params) {
+        addView(view, params, null, false);
     }
     
-    public void addViewNesting(View view, ViewGroup.LayoutParams params)
-    {
-        addView(view, params, false);
+    public void addView(View view, ViewGroup.LayoutParams params, CompatibilityInfoHolder cih) {
+        addView(view, params, cih, false);
     }
     
-    private void addView(View view, ViewGroup.LayoutParams params, boolean nest)
-    {
+    public void addViewNesting(View view, ViewGroup.LayoutParams params) {
+        addView(view, params, null, false);
+    }
+
+    private void addView(View view, ViewGroup.LayoutParams params,
+            CompatibilityInfoHolder cih, boolean nest) {
         if (Config.LOGV) Log.v("WindowManager", "addView view=" + view);
 
         if (!(params instanceof WindowManager.LayoutParams)) {
@@ -237,6 +248,11 @@
             
             root = new ViewRoot(view.getContext());
             root.mAddNesting = 1;
+            if (cih == null) {
+                root.mCompatibilityInfo = new CompatibilityInfoHolder();
+            } else {
+                root.mCompatibilityInfo = cih;
+            }
 
             view.setLayoutParams(wparams);
             
@@ -326,9 +342,11 @@
             return view;
         }
 
-        InputMethodManager imm = InputMethodManager.getInstance(view.getContext());
-        if (imm != null) {
-            imm.windowDismissed(mViews[index].getWindowToken());
+        if (view != null) {
+            InputMethodManager imm = InputMethodManager.getInstance(view.getContext());
+            if (imm != null) {
+                imm.windowDismissed(mViews[index].getWindowToken());
+            }
         }
         root.die(false);
         finishRemoveViewLocked(view, index);
@@ -352,9 +370,11 @@
         removeItem(tmpParams, mParams, index);
         mParams = tmpParams;
 
-        view.assignParent(null);
-        // func doesn't allow null...  does it matter if we clear them?
-        //view.setLayoutParams(null);
+        if (view != null) {
+            view.assignParent(null);
+            // func doesn't allow null...  does it matter if we clear them?
+            //view.setLayoutParams(null);
+        }
     }
 
     public void closeAll(IBinder token, String who, String what) {
@@ -402,6 +422,17 @@
         }
     }
     
+    public void reportNewConfiguration(Configuration config) {
+        synchronized (this) {
+            int count = mViews.length;
+            config = new Configuration(config);
+            for (int i=0; i<count; i++) {
+                ViewRoot root = mRoots[i];
+                root.requestUpdateConfiguration(config);
+            }
+        }
+    }
+
     public WindowManager.LayoutParams getRootViewLayoutParameter(View view) {
         ViewParent vp = view.getParent();
         while (vp != null && !(vp instanceof ViewRoot)) {
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index beb23aa..4d4569c1 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -17,6 +17,7 @@
 package android.view;
 
 import android.content.Context;
+import android.content.res.CompatibilityInfo;
 import android.content.res.Configuration;
 import android.graphics.Rect;
 import android.os.IBinder;
@@ -537,7 +538,7 @@
      * @see #removeStartingWindow
      */
     public View addStartingWindow(IBinder appToken, String packageName,
-            int theme, CharSequence nonLocalizedLabel,
+            int theme, CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel,
             int labelRes, int icon, int windowFlags);
 
     /**
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index a39c7c7..83d2a79 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -998,13 +998,13 @@
                 if (DEBUG) Log.v(TAG, "START INPUT: " + view + " ic="
                         + ic + " tba=" + tba + " initial=" + initial);
                 InputBindResult res = mService.startInput(mClient,
-                        servedContext, tba, initial, mCurMethod == null);
+                        servedContext, tba, initial, true);
                 if (DEBUG) Log.v(TAG, "Starting input: Bind result=" + res);
                 if (res != null) {
                     if (res.id != null) {
                         mBindSequence = res.sequence;
                         mCurMethod = res.method;
-                    } else {
+                    } else if (mCurMethod == null) {
                         // This means there is no input method available.
                         if (DEBUG) Log.v(TAG, "ABORT input: no input method!");
                         return;
diff --git a/core/java/android/webkit/HTML5VideoFullScreen.java b/core/java/android/webkit/HTML5VideoFullScreen.java
index 0918683..5a9b054 100644
--- a/core/java/android/webkit/HTML5VideoFullScreen.java
+++ b/core/java/android/webkit/HTML5VideoFullScreen.java
@@ -314,10 +314,12 @@
 
     @Override
     protected void switchProgressView(boolean playerBuffering) {
-        if (playerBuffering) {
-            mProgressView.setVisibility(View.VISIBLE);
-        } else {
-            mProgressView.setVisibility(View.GONE);
+        if (mProgressView != null) {
+            if (playerBuffering) {
+                mProgressView.setVisibility(View.VISIBLE);
+            } else {
+                mProgressView.setVisibility(View.GONE);
+            }
         }
         return;
     }
diff --git a/core/java/android/webkit/WebTextView.java b/core/java/android/webkit/WebTextView.java
index d3e7290..26cfbff 100644
--- a/core/java/android/webkit/WebTextView.java
+++ b/core/java/android/webkit/WebTextView.java
@@ -1174,17 +1174,21 @@
                 imeOptions |= EditorInfo.IME_ACTION_SEARCH;
                 break;
             case EMAIL:
-                inputType |= EditorInfo.TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS;
+                // inputType needs to be overwritten because of the different text variation.
+                inputType = EditorInfo.TYPE_CLASS_TEXT
+                        | EditorInfo.TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS;
                 imeOptions |= EditorInfo.IME_ACTION_GO;
                 break;
             case NUMBER:
-                inputType |= EditorInfo.TYPE_CLASS_NUMBER;
+                // inputType needs to be overwritten because of the different class.
+                inputType = EditorInfo.TYPE_CLASS_NUMBER | EditorInfo.TYPE_NUMBER_VARIATION_NORMAL;
                 // Number and telephone do not have both a Tab key and an
                 // action, so set the action to NEXT
                 imeOptions |= EditorInfo.IME_ACTION_NEXT;
                 break;
             case TELEPHONE:
-                inputType |= EditorInfo.TYPE_CLASS_PHONE;
+                // inputType needs to be overwritten because of the different class.
+                inputType = EditorInfo.TYPE_CLASS_PHONE;
                 imeOptions |= EditorInfo.IME_ACTION_NEXT;
                 break;
             case URL:
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 0d34ff6..eeb5b7b 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -6215,7 +6215,7 @@
                     if (hscroll != 0 || vscroll != 0) {
                         final int vdelta = (int) (vscroll * getVerticalScrollFactor());
                         final int hdelta = (int) (hscroll * getHorizontalScrollFactor());
-                        if (pinScrollBy(hdelta, vdelta, true, 0)) {
+                        if (pinScrollBy(hdelta, vdelta, false, 0)) {
                             return true;
                         }
                     }
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index d39271e..094f195 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -4638,6 +4638,7 @@
         selectedPos = lookForSelectablePosition(selectedPos, down);
         if (selectedPos >= firstPosition && selectedPos <= getLastVisiblePosition()) {
             mLayoutMode = LAYOUT_SPECIFIC;
+            updateSelectorState();
             setSelectionInt(selectedPos);
             invokeOnItemScrollListener();
         } else {
diff --git a/core/java/android/widget/AppSecurityPermissions.java b/core/java/android/widget/AppSecurityPermissions.java
index d3aa42f..988760d 100755
--- a/core/java/android/widget/AppSecurityPermissions.java
+++ b/core/java/android/widget/AppSecurityPermissions.java
@@ -218,15 +218,14 @@
         mShowMore.setClickable(true);
         mShowMore.setOnClickListener(this);
         mShowMore.setFocusable(true);
-        mShowMore.setBackgroundResource(android.R.drawable.list_selector_background);
 
         // Pick up from framework resources instead.
         mDefaultGrpLabel = mContext.getString(R.string.default_permission_group);
         mPermFormat = mContext.getString(R.string.permissions_format);
         mNormalIcon = mContext.getResources().getDrawable(R.drawable.ic_text_dot);
         mDangerousIcon = mContext.getResources().getDrawable(R.drawable.ic_bullet_key_permission);
-        mShowMaxIcon = mContext.getResources().getDrawable(R.drawable.expander_ic_maximized);
-        mShowMinIcon = mContext.getResources().getDrawable(R.drawable.expander_ic_minimized);
+        mShowMaxIcon = mContext.getResources().getDrawable(R.drawable.expander_close_holo_dark);
+        mShowMinIcon = mContext.getResources().getDrawable(R.drawable.expander_open_holo_dark);
         
         // Set permissions view
         setPermissions(mPermsList);
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 13b9285f..435cf4e 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -5236,6 +5236,7 @@
      * @param text The auto complete text the user has selected.
      */
     public void onCommitCompletion(CompletionInfo text) {
+        // Intentionally empty
     }
 
     /**
@@ -8660,8 +8661,6 @@
         private boolean mIsActive = false;
         // The insertion handle can have an associated PastePopupMenu
         private boolean mIsInsertionHandle = false;
-        // Used to detect taps on the insertion handle, which will affect the PastePopupMenu
-        private long mTouchTimer;
         private PastePopupMenu mPastePopupWindow;
 
         // Touch-up filter: number of previous positions remembered
@@ -8932,9 +8931,6 @@
                     mLastParentX = coords[0];
                     mLastParentY = coords[1];
                     mIsDragging = true;
-                    if (mIsInsertionHandle) {
-                        mTouchTimer = SystemClock.uptimeMillis();
-                    }
                     break;
                 }
 
@@ -8964,18 +8960,15 @@
 
                 case MotionEvent.ACTION_UP:
                     if (mIsInsertionHandle) {
-                        long delay = SystemClock.uptimeMillis() - mTouchTimer;
-                        if (delay < ViewConfiguration.getTapTimeout()) {
-                            final float deltaX = mDownPositionX - ev.getRawX();
-                            final float deltaY = mDownPositionY - ev.getRawY();
-                            final float distanceSquared = deltaX * deltaX + deltaY * deltaY;
-                            if (distanceSquared < mSquaredTouchSlopDistance) {
-                                if (mPastePopupWindow != null && mPastePopupWindow.isShowing()) {
-                                    // Tapping on the handle dismisses the displayed paste view,
-                                    mPastePopupWindow.hide();
-                                } else {
-                                    ((InsertionPointCursorController) mController).show(0);
-                                }
+                        final float deltaX = mDownPositionX - ev.getRawX();
+                        final float deltaY = mDownPositionY - ev.getRawY();
+                        final float distanceSquared = deltaX * deltaX + deltaY * deltaY;
+                        if (distanceSquared < mSquaredTouchSlopDistance) {
+                            if (mPastePopupWindow != null && mPastePopupWindow.isShowing()) {
+                                // Tapping on the handle dismisses the displayed paste view,
+                                mPastePopupWindow.hide();
+                            } else {
+                                ((InsertionPointCursorController) mController).show(0);
                             }
                         }
                     }
@@ -9360,7 +9353,9 @@
         }
 
         @Override
-        public void onDetached() {}
+        public void onDetached() {
+            // Nothing to do
+        }
     }
 
     private void hideInsertionPointCursorController() {
diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl
index 7f23ed5..aa9e452 100644
--- a/core/java/com/android/internal/statusbar/IStatusBar.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl
@@ -31,7 +31,7 @@
     void animateExpand();
     void animateCollapse();
     void setLightsOn(boolean on);
-    void setMenuKeyVisible(boolean visible);
+    void topAppWindowChanged(boolean menuVisible);
     void setImeWindowStatus(in IBinder token, int vis, int backDisposition);
     void setHardKeyboardStatus(boolean available, boolean enabled);
 }
diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
index d6ca426..1461a7d 100644
--- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and 
  * limitations under the License.
  */
- 
+
 package com.android.internal.statusbar;
 
 import com.android.internal.statusbar.IStatusBar;
@@ -30,7 +30,7 @@
     void setIcon(String slot, String iconPackage, int iconId, int iconLevel);
     void setIconVisibility(String slot, boolean visible);
     void removeIcon(String slot);
-    void setMenuKeyVisible(boolean visible);
+    void topAppWindowChanged(boolean menuVisible);
     void setImeWindowStatus(in IBinder token, int vis, int backDisposition);
 
     // ---- Methods below are for use by the status bar policy services ----
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 2f431c4..441a3bfe 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -1071,6 +1071,13 @@
         android:description="@string/permdesc_setOrientation"
         android:protectionLevel="signature" />
 
+    <!-- Allows low-level access to setting the pointer speed.
+         Not for use by normal applications. -->
+    <permission android:name="android.permission.SET_POINTER_SPEED"
+        android:label="@string/permlab_setPointerSpeed"
+        android:description="@string/permdesc_setPointerSpeed"
+        android:protectionLevel="signature" />
+
     <!-- Allows an application to install packages. -->
     <permission android:name="android.permission.INSTALL_PACKAGES"
         android:label="@string/permlab_installPackages"
diff --git a/core/res/res/drawable-hdpi/toast_frame.9.png b/core/res/res/drawable-hdpi/toast_frame.9.png
index 08b163a..9769bbb7 100644
--- a/core/res/res/drawable-hdpi/toast_frame.9.png
+++ b/core/res/res/drawable-hdpi/toast_frame.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/toast_frame_holo.9.png b/core/res/res/drawable-hdpi/toast_frame_holo.9.png
index 7f830bc..9769bbb7 100644
--- a/core/res/res/drawable-hdpi/toast_frame_holo.9.png
+++ b/core/res/res/drawable-hdpi/toast_frame_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-large-nodpi/default_wallpaper.jpg b/core/res/res/drawable-large-nodpi/default_wallpaper.jpg
new file mode 100644
index 0000000..7d7cdbb
--- /dev/null
+++ b/core/res/res/drawable-large-nodpi/default_wallpaper.jpg
Binary files differ
diff --git a/core/res/res/drawable-mdpi/toast_frame.9.png b/core/res/res/drawable-mdpi/toast_frame.9.png
index 8603e93..06cfc70 100755
--- a/core/res/res/drawable-mdpi/toast_frame.9.png
+++ b/core/res/res/drawable-mdpi/toast_frame.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/toast_frame_holo.9.png b/core/res/res/drawable-mdpi/toast_frame_holo.9.png
index 911f86d..06cfc70 100755
--- a/core/res/res/drawable-mdpi/toast_frame_holo.9.png
+++ b/core/res/res/drawable-mdpi/toast_frame_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/toast_frame.9.png b/core/res/res/drawable-xhdpi/toast_frame.9.png
index 9c0ff47..f7debee 100644
--- a/core/res/res/drawable-xhdpi/toast_frame.9.png
+++ b/core/res/res/drawable-xhdpi/toast_frame.9.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/toast_frame_holo.9.png b/core/res/res/drawable-xhdpi/toast_frame_holo.9.png
new file mode 100644
index 0000000..f7debee
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/toast_frame_holo.9.png
Binary files differ
diff --git a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
index fbb9983..3bb7821 100644
--- a/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
+++ b/core/res/res/layout-sw600dp/keyguard_screen_tab_unlock_land.xml
@@ -44,31 +44,21 @@
     </RelativeLayout>
 
     <!-- right side -->
-    <LinearLayout
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:layout_width="0dip"
-            android:orientation="horizontal"
-            android:gravity="center_horizontal"
-                >
-        <TextView
-                android:id="@+id/screenLocked"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_below="@id/status2"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:gravity="center"
-                android:layout_marginTop="12dip"
-                android:drawablePadding="4dip"
-                />
+    <RelativeLayout
+        android:layout_height="match_parent"
+        android:layout_weight="1"
+        android:layout_width="0dip"
+        android:gravity="center_horizontal|center_vertical">
 
-        <com.android.internal.widget.WaveView
-            android:id="@+id/wave_view"
+        <TextView android:id="@+id/screenLocked"
             android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_marginRight="0dip"
-            android:layout_weight="1.0"
-            />
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:gravity="center"
+            android:layout_marginTop="12dip"
+            android:layout_alignParentLeft="true"
+            android:layout_alignParentTop="true"
+            android:drawablePadding="4dip"/>
 
         <!-- "emergency calls only" shown when sim is missing or PUKd -->
         <TextView
@@ -76,24 +66,35 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignParentTop="true"
-            android:layout_marginTop="20dip"
+            android:layout_alignParentRight="true"
+            android:layout_marginTop="12dip"
             android:text="@string/emergency_calls_only"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:textColor="@color/white"
-               />
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textColor="@color/white"/>
 
-        <!-- emergency call button shown when sim is PUKd and tab_selector is
-             hidden -->
+
+        <com.android.internal.widget.WaveView
+            android:id="@+id/wave_view"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_gravity="center_vertical|center_horizontal"
+            android:layout_marginRight="0dip"
+            android:layout_weight="1.0"/>
+
+
+        <!-- emergency call button shown when sim is PUKd and tab_selector is hidden -->
         <Button
             android:id="@+id/emergencyCallButton"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
+            android:layout_marginRight="80dip"
+            android:layout_marginBottom="80dip"
+            android:layout_alignParentRight="true"
+            android:layout_alignParentBottom="true"
             android:drawableLeft="@drawable/ic_emergency"
             style="@style/Widget.Button.Transparent"
-            android:drawablePadding="8dip"
-            android:layout_marginRight="80dip"
-            android:visibility="gone"
-            />
+            android:drawablePadding="8dip"/>
 
-    </LinearLayout>
+    </RelativeLayout>>
+
 </LinearLayout>
diff --git a/core/res/res/layout/app_perms_summary.xml b/core/res/res/layout/app_perms_summary.xml
index bdbbfcb..3f99dde 100755
--- a/core/res/res/layout/app_perms_summary.xml
+++ b/core/res/res/layout/app_perms_summary.xml
@@ -60,10 +60,11 @@
             android:orientation="horizontal"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginTop="16dip"
-            android:layout_marginBottom="12dip"
-            android:layout_marginLeft="16dip"
-            android:duplicateParentState="true">
+            android:paddingTop="16dip"
+            android:paddingBottom="12dip"
+            android:paddingLeft="16dip"
+            android:duplicateParentState="true"
+            android:background="?android:attr/selectableItemBackground">
 
             <TextView
                 android:id="@+id/show_more_text"
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 5c18b99..5d46b8a 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"للسماح للمالك بإرسال الأهداف إلى أحد مشرفي الجهاز. لا يجب استخدامه على الإطلاق للتطبيقات العادية."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"تغيير اتجاه الشاشة"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"للسماح لتطبيق ما بتغيير تدوير الشاشة في أي وقت. لا يجب استخدامه على الإطلاق للتطبيقات العادية."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"تغيير سرعة المؤشر"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"للسماح لتطبيق ما بتغيير سرعة مؤشر الماوس أو اللوحة اللمسية في أي وقت. لا يجب استخدامه على الإطلاق للتطبيقات العادية."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"إرسال إشارات Linux للتطبيقات"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"للسماح للتطبيق بطلب إرسال الإشارة المزوّدة لجميع العمليات المستمرة."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"تشغيل التطبيق دائمًا"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"تمت إعادة توجيه التطبيق"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> قيد التشغيل الآن."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"تم تشغيل <xliff:g id="APP_NAME">%1$s</xliff:g> من الأصل."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"انتهك التطبيق <xliff:g id="APPLICATION">%1$s</xliff:g> (العملية <xliff:g id="PROCESS">%2$s</xliff:g>) سياسة.StrictMode المفروضة ذاتيًا."</string>
     <string name="smv_process" msgid="5120397012047462446">"انتهكت العملية <xliff:g id="PROCESS">%1$s</xliff:g> سياسة StrictMode المفروضة ذاتيًا."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> يعمل"</string>
diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml
index 8765a52..238d9b8 100644
--- a/core/res/res/values-bg/strings.xml
+++ b/core/res/res/values-bg/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Разрешава на притежателя да изпраща намерения до администратор на устройството. Нормалните приложения би трябвало никога да не се нуждаят от това."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"промяна на ориентацията на екрана"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Разрешава на приложението да променя ориентацията на екрана по всяко време. Нормалните приложения би трябвало никога да не се нуждаят от това."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"промяна на скоростта на курсор"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Разрешава на приложението да променя скоростта на курсора на мишката или на тракпада по всяко време. Обичайните приложения не би трябвало никога да се нуждаят от това."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"изпращане на сигнали от Linux до приложенията"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Разрешава на приложението да подаде заявка предоставеният сигнал да се изпрати до всички постоянни процеси."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"задаване на постоянно изпълнение на приложението"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Приложението се пренасочи"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> се изпълнява."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Първоначално бе стартирано: <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Приложението <xliff:g id="APPLICATION">%1$s</xliff:g> (процес <xliff:g id="PROCESS">%2$s</xliff:g>) наруши правилото за стриктен режим, наложено от самото него."</string>
     <string name="smv_process" msgid="5120397012047462446">"Процесът <xliff:g id="PROCESS">%1$s</xliff:g> наруши правилото за стриктен режим, наложено от самия него."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> се изпълнява"</string>
diff --git a/core/res/res/values-ca/strings.xml b/core/res/res/values-ca/strings.xml
index e1175a1..f2ac1d2 100644
--- a/core/res/res/values-ca/strings.xml
+++ b/core/res/res/values-ca/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permet al titular enviar intencions a un administrador del sistema. No s\'hauria de necessitar mai per a les aplicacions normals."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"canviar l\'orientació de la pantalla"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Permet a una aplicació canviar el gir de la pantalla en qualsevol moment. No s\'hauria de necessitar mai per a les aplicacions normals."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"canvi de velocitat del punter"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Permet que una aplicació canviï la velocitat del punter del ratolí o del ratolí tàctil en qualsevol moment. Mai no s\'hauria de necessitar per a les aplicacions normals."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"enviar senyals Linux a les aplicacions"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Permet a l\'aplicació sol·licitar que el senyal subministrat s\'enviï a tots els processos persistents."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"fer que l\'aplicació s\'executi sempre"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Aplicació redirigida"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> s\'està executant."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> es va iniciar originalment."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"L\'aplicació <xliff:g id="APPLICATION">%1$s</xliff:g> (procés <xliff:g id="PROCESS">%2$s</xliff:g>) ha incomplert la seva política autoimposada de mode estricte."</string>
     <string name="smv_process" msgid="5120397012047462446">"El procés <xliff:g id="PROCESS">%1$s</xliff:g> ha incomplert la seva política de mode estricte."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> s\'està executant"</string>
diff --git a/core/res/res/values-cs/strings.xml b/core/res/res/values-cs/strings.xml
index 0d280a3..3cc182b 100644
--- a/core/res/res/values-cs/strings.xml
+++ b/core/res/res/values-cs/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Umožňuje držiteli oprávnění odesílat informace správci zařízení. Běžné aplikace by toto oprávnění nikdy neměly požadovat."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"změna orientace obrazovky"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Umožňuje aplikaci kdykoli změnit orientaci obrazovky. Běžné aplikace by toto nastavení nikdy neměly využívat."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"změna rychlosti kurzoru"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Umožňuje aplikaci kdykoli změnit rychlost kurzoru myši nebo trackpadu. U běžných aplikací by to nikdy nemělo být potřeba."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"odeslání signálů Linux aplikacím"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Umožňuje aplikaci vyžádat zaslání poskytnutého signálu všem trvalým procesům."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"trvalé spuštění aplikace"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Aplikace přesměrována"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"Je spuštěna aplikace <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Původně byla spuštěna aplikace <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Aplikace <xliff:g id="APPLICATION">%1$s</xliff:g> (proces <xliff:g id="PROCESS">%2$s</xliff:g>) porušila své vlastní vynucené zásady StrictMode."</string>
     <string name="smv_process" msgid="5120397012047462446">"Proces <xliff:g id="PROCESS">%1$s</xliff:g> porušil své vlastní vynucené zásady StrictMode."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Běží aplikace <xliff:g id="APP">%1$s</xliff:g>"</string>
diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml
index 82b0688..88dc4dd 100644
--- a/core/res/res/values-da/strings.xml
+++ b/core/res/res/values-da/strings.xml
@@ -140,7 +140,7 @@
     <string name="shutdown_confirm" product="default" msgid="649792175242821353">"Din telefon slukkes nu."</string>
     <string name="shutdown_confirm_question" msgid="6656441286856415014">"Vil du slukke?"</string>
     <string name="recent_tasks_title" msgid="3691764623638127888">"Seneste"</string>
-    <string name="no_recent_tasks" msgid="279702952298056674">"Der er ingen nye programmer."</string>
+    <string name="no_recent_tasks" msgid="279702952298056674">"Der er ingen nye applikationer."</string>
     <string name="global_actions" product="tablet" msgid="408477140088053665">"Valgmuligheder for tabletcomputeren"</string>
     <string name="global_actions" product="default" msgid="2406416831541615258">"Indstillinger for telefon"</string>
     <string name="global_action_lock" msgid="2844945191792119712">"Skærmlås"</string>
@@ -155,7 +155,7 @@
     <string name="safeMode" msgid="2788228061547930246">"Sikker tilstand"</string>
     <string name="android_system_label" msgid="6577375335728551336">"Android-system"</string>
     <string name="permgrouplab_costMoney" msgid="5429808217861460401">"Tjenester, der koster dig penge"</string>
-    <string name="permgroupdesc_costMoney" msgid="8193824940620517189">"Tillader, at et program kan gøre ting, som kan koste penge."</string>
+    <string name="permgroupdesc_costMoney" msgid="8193824940620517189">"Tillader, at en applikation kan gøre ting, som kan koste penge."</string>
     <string name="permgrouplab_messages" msgid="7521249148445456662">"Dine beskeder"</string>
     <string name="permgroupdesc_messages" msgid="7045736972019211994">"Læs og skriv dine sms-, e-mail- og andre beskeder."</string>
     <string name="permgrouplab_personalInfo" msgid="3519163141070533474">"Dine personlige oplysninger"</string>
@@ -164,7 +164,7 @@
     <string name="permgrouplab_location" msgid="635149742436692049">"Din placering"</string>
     <string name="permgroupdesc_location" msgid="2430258821648348660">"Overvåg din fysiske placering"</string>
     <string name="permgrouplab_network" msgid="5808983377727109831">"Netværkskommunikation"</string>
-    <string name="permgroupdesc_network" msgid="5035763698958415998">"Tillader, at programmerne får adgang til forskellige netværksfunktioner."</string>
+    <string name="permgroupdesc_network" msgid="5035763698958415998">"Tillader, at applikationerne får adgang til forskellige netværksfunktioner."</string>
     <string name="permgrouplab_accounts" msgid="3359646291125325519">"Dine konti"</string>
     <string name="permgroupdesc_accounts" msgid="4948732641827091312">"Få adgang til de tilgængelige konti."</string>
     <string name="permgrouplab_hardwareControls" msgid="7998214968791599326">"Hardwarekontroller"</string>
@@ -179,297 +179,299 @@
     <string name="permgroupdesc_storage" product="nosdcard" msgid="7442318502446874999">"Få adgang til USB-lager."</string>
     <string name="permgroupdesc_storage" product="default" msgid="9203302214915355774">"Få adgang til SD-kortet."</string>
     <string name="permlab_statusBar" msgid="7417192629601890791">"deaktiver eller rediger statuslinje"</string>
-    <string name="permdesc_statusBar" msgid="1365473595331989732">"Tillader, at et program deaktiverer statuslinjen eller tilføjer eller fjerner systemikoner."</string>
+    <string name="permdesc_statusBar" msgid="1365473595331989732">"Tillader, at en applikation deaktiverer statuslinjen eller tilføjer eller fjerner systemikoner."</string>
     <string name="permlab_statusBarService" msgid="7247281911387931485">"statusbjælke"</string>
-    <string name="permdesc_statusBarService" msgid="4097605867643520920">"Tillader, at programmet er statusbjælken."</string>
+    <string name="permdesc_statusBarService" msgid="4097605867643520920">"Tillader, at applikationen er statusbjælken."</string>
     <string name="permlab_expandStatusBar" msgid="1148198785937489264">"udvid/skjul statuslinje"</string>
-    <string name="permdesc_expandStatusBar" msgid="7088604400110768665">"Tillader, at et program udvider eller skjuler statuslinjen."</string>
+    <string name="permdesc_expandStatusBar" msgid="7088604400110768665">"Tillader, at en applikation udvider eller skjuler statuslinjen."</string>
     <string name="permlab_processOutgoingCalls" msgid="1136262550878335980">"opfang udgående opkald"</string>
-    <string name="permdesc_processOutgoingCalls" msgid="2228988201852654461">"Tillader, at et program behandler udgående opkald og ændrer det nummer, der ringes til. Ondsindede programmer kan overvåge, omdirigere eller forhindre udgående opkald."</string>
+    <string name="permdesc_processOutgoingCalls" msgid="2228988201852654461">"Tillader, at en applikation behandler udgående opkald og ændrer det nummer, der ringes til. Ondsindede applikationer kan overvåge, omdirigere eller forhindre udgående opkald."</string>
     <string name="permlab_receiveSms" msgid="2697628268086208535">"modtag sms"</string>
-    <string name="permdesc_receiveSms" msgid="6298292335965966117">"Tillader, at et program modtager og behandler sms-beskeder. Ondsindede programmer kan overvåge dine beskeder eller slette dem uden at vise dem til dig."</string>
+    <string name="permdesc_receiveSms" msgid="6298292335965966117">"Tillader, at en applikation modtager og behandler sms-beskeder. Ondsindede applikationer kan overvåge dine beskeder eller slette dem uden at vise dem til dig."</string>
     <string name="permlab_receiveMms" msgid="8894700916188083287">"modtag mms"</string>
-    <string name="permdesc_receiveMms" msgid="4563346832000174373">"Tillader, at et program modtager og behandler mms-beskeder. Ondsindede programmer kan overvåge dine beskeder eller slette dem uden at vise dem til dig."</string>
+    <string name="permdesc_receiveMms" msgid="4563346832000174373">"Tillader, at en applikation modtager og behandler mms-beskeder. Ondsindede applikationer kan overvåge dine beskeder eller slette dem uden at vise dem til dig."</string>
     <string name="permlab_sendSms" msgid="5600830612147671529">"send sms-beskeder"</string>
-    <string name="permdesc_sendSms" msgid="1946540351763502120">"Tillader, at et program at sender sms-beskeder. Ondsindede programmer kan eventuelt koste dig penge ved at sende beskeder uden din bekræftelse."</string>
+    <string name="permdesc_sendSms" msgid="1946540351763502120">"Tillader, at en applikation at sender sms-beskeder. Ondsindede applikationer kan eventuelt koste dig penge ved at sende beskeder uden din bekræftelse."</string>
     <string name="permlab_readSms" msgid="4085333708122372256">"læs sms eller mms"</string>
-    <string name="permdesc_readSms" product="tablet" msgid="5836710350295631545">"Tillader, at et program læser sms-beskeder, der er gemt på din tabletcomputer eller dit SIM-kort. Ondsindede programmer kan eventuelt læse dine fortrolige beskeder."</string>
-    <string name="permdesc_readSms" product="default" msgid="3002170087197294591">"Tillader, at et program læser sms-beskeder, der er gemt på din telefon eller dit SIM-kort. Ondsindede programmer kan eventuelt læse dine fortrolige beskeder."</string>
+    <string name="permdesc_readSms" product="tablet" msgid="5836710350295631545">"Tillader, at en applikation læser sms-beskeder, der er gemt på din tabletcomputer eller dit SIM-kort. Ondsindede applikationer kan eventuelt læse dine fortrolige beskeder."</string>
+    <string name="permdesc_readSms" product="default" msgid="3002170087197294591">"Tillader, at en applikation læser sms-beskeder, der er gemt på din telefon eller dit SIM-kort. Ondsindede applikationer kan eventuelt læse dine fortrolige beskeder."</string>
     <string name="permlab_writeSms" msgid="6881122575154940744">"rediger sms eller mms"</string>
-    <string name="permdesc_writeSms" product="tablet" msgid="5332124772918835437">"Tillader, at et program skriver i sms-beskeder, der er gemt på din tabletcomputer eller dit SIM-kort. Ondsindede programmer kan eventuelt slette dine beskeder."</string>
-    <string name="permdesc_writeSms" product="default" msgid="6299398896177548095">"Tillader, at et program skriver i sms-beskeder, der er gemt på din telefon eller dit SIM-kort. Ondsindede programmer kan eventuelt slette dine beskeder."</string>
+    <string name="permdesc_writeSms" product="tablet" msgid="5332124772918835437">"Tillader, at en applikation skriver i sms-beskeder, der er gemt på din tabletcomputer eller dit SIM-kort. Ondsindede applikationer kan eventuelt slette dine beskeder."</string>
+    <string name="permdesc_writeSms" product="default" msgid="6299398896177548095">"Tillader, at en applikation skriver i sms-beskeder, der er gemt på din telefon eller dit SIM-kort. Ondsindede applikationer kan eventuelt slette dine beskeder."</string>
     <string name="permlab_receiveWapPush" msgid="8258226427716551388">"modtag WAP"</string>
-    <string name="permdesc_receiveWapPush" msgid="5979623826128082171">"Tillader, at et program modtager og behandler WAP-beskeder. Ondsindede programmer kan overvåge dine beskeder eller slette dem uden at vise dem til dig."</string>
-    <string name="permlab_getTasks" msgid="5005277531132573353">"hent kørende programmer"</string>
-    <string name="permdesc_getTasks" msgid="7048711358713443341">"Tillader, at et program henter oplysninger om nuværende og for nyligt kørende opgaver. Tillader, at eventuelt ondsindede programmer finder private oplysninger om andre programmer."</string>
-    <string name="permlab_reorderTasks" msgid="5669588525059921549">"omorganiser kørende programmer"</string>
-    <string name="permdesc_reorderTasks" msgid="126252774270522835">"Tillader, at et program flytter opgaver til forgrunden og baggrunden. Ondsindede programmer kan tvinge dem selv til forgrunden uden din kontrol."</string>
+    <string name="permdesc_receiveWapPush" msgid="5979623826128082171">"Tillader, at en applikation modtager og behandler WAP-beskeder. Ondsindede applikationer kan overvåge dine beskeder eller slette dem uden at vise dem til dig."</string>
+    <string name="permlab_getTasks" msgid="5005277531132573353">"hent kørende applikationer"</string>
+    <string name="permdesc_getTasks" msgid="7048711358713443341">"Tillader, at en applikation henter oplysninger om nuværende og for nyligt kørende opgaver. Tillader, at eventuelt ondsindede applikationer finder private oplysninger om andre applikationer."</string>
+    <string name="permlab_reorderTasks" msgid="5669588525059921549">"omorganiser kørende applikationer"</string>
+    <string name="permdesc_reorderTasks" msgid="126252774270522835">"Tillader, at en applikation flytter opgaver til forgrunden og baggrunden. Ondsindede applikationer kan tvinge dem selv til forgrunden uden din kontrol."</string>
     <string name="permlab_setDebugApp" msgid="4339730312925176742">"aktiver programfejlretning"</string>
-    <string name="permdesc_setDebugApp" msgid="5584310661711990702">"Tillader, at et program slår fejlretning af andet program til. Ondsindede programmer kan bruge dette til at standse andre programmer."</string>
+    <string name="permdesc_setDebugApp" msgid="5584310661711990702">"Tillader, at en applikation slår fejlretning af en anden applikation til. Ondsindede applikationer kan bruge dette til at standse andre applikationer."</string>
     <string name="permlab_changeConfiguration" msgid="8214475779521218295">"skift indstillinger for brugergrænsefladen"</string>
-    <string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Tillader, at et program ændrer den nuværende konfiguration, f.eks. den lokale eller overordnede skrifttypestørrelse."</string>
+    <string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Tillader, at en applikation ændrer den nuværende konfiguration, f.eks. den lokale eller overordnede skrifttypestørrelse."</string>
     <string name="permlab_enableCarMode" msgid="5684504058192921098">"aktivere biltilstand"</string>
-    <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Tillader et program at aktivere biltilstand."</string>
+    <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Tillader en applikation at aktivere biltilstand."</string>
     <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"standse baggrundsprocesser"</string>
-    <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Tillader et program at standse andre programmers baggrundsprocesser, selvom der ikke er mangel på hukommelse."</string>
-    <string name="permlab_forceStopPackages" msgid="1447830113260156236">"tvangsstandse andre programmer"</string>
-    <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Tillader, at et program tvangsstopper andre programmer."</string>
-    <string name="permlab_forceBack" msgid="1804196839880393631">"tving programmet til at lukke"</string>
-    <string name="permdesc_forceBack" msgid="6534109744159919013">"Tillader, at et program tvinger alle programmer, der er i forgrunden, til at lukke og køre i baggrunden. Bør aldrig være nødvendigt til normale programmer."</string>
+    <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Tillader en applikation at standse andre programmers baggrundsprocesser, selvom der ikke er mangel på hukommelse."</string>
+    <string name="permlab_forceStopPackages" msgid="1447830113260156236">"tvangsstandse andre applikationer"</string>
+    <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Tillader, at en applikation tvangsstopper andre applikationer."</string>
+    <string name="permlab_forceBack" msgid="1804196839880393631">"tving applikationen til at lukke"</string>
+    <string name="permdesc_forceBack" msgid="6534109744159919013">"Tillader, at en applikation tvinger alle applikationer, der er i forgrunden, til at lukke og køre i baggrunden. Bør aldrig være nødvendigt til normale applikationer."</string>
     <string name="permlab_dump" msgid="1681799862438954752">"hent intern systemtilstand"</string>
-    <string name="permdesc_dump" msgid="2198776174276275220">"Tillader, at et program henter systemets interne tilstand. Ondsindede programmer kan hente en række private og sikre oplysninger, som de normalt aldrig bør have brug for."</string>
+    <string name="permdesc_dump" msgid="2198776174276275220">"Tillader, at en applikation henter systemets interne tilstand. Ondsindede applikationer kan hente en række private og sikre oplysninger, som de normalt aldrig bør have brug for."</string>
     <string name="permlab_shutdown" msgid="7185747824038909016">"delvis lukning"</string>
     <string name="permdesc_shutdown" msgid="7046500838746291775">"Sætter aktivitetsadministratoren i lukningstilstand. Lukker ikke helt ned."</string>
     <string name="permlab_stopAppSwitches" msgid="4138608610717425573">"undgå programskift"</string>
-    <string name="permdesc_stopAppSwitches" msgid="3857886086919033794">"Forhindrer brugeren i at skifte til et andet program."</string>
-    <string name="permlab_runSetActivityWatcher" msgid="7811586187574696296">"overvåg og kontroller start af alle programmer"</string>
-    <string name="permdesc_runSetActivityWatcher" msgid="2149363027173451218">"Tillader, at et program overvåger og kontrollerer, hvordan systemet starter aktiviteter. Ondsindede programmer kan fuldstændigt kompromittere systemet. Denne tilladelse er kun nødvendig til udvikling, aldrig til normal brug."</string>
+    <string name="permdesc_stopAppSwitches" msgid="3857886086919033794">"Forhindrer brugeren i at skifte til en anden applikation."</string>
+    <string name="permlab_runSetActivityWatcher" msgid="7811586187574696296">"overvåg og kontroller start af alle applikationer"</string>
+    <string name="permdesc_runSetActivityWatcher" msgid="2149363027173451218">"Tillader, at en applikation overvåger og kontrollerer, hvordan systemet starter aktiviteter. Ondsindede applikationer kan fuldstændigt 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="3453286591439891260">"Tillader, at et program udsender en meddelelse om, at en programpakke er fjernet. Ondsindede programmer kan bruge dette til at afslutte et andet kørende program."</string>
+    <string name="permdesc_broadcastPackageRemoved" msgid="3453286591439891260">"Tillader, at en applikation udsender en meddelelse om, at en applikationspakke er fjernet. Ondsindede applikationer kan bruge dette til at afslutte en anden kørende applikation."</string>
     <string name="permlab_broadcastSmsReceived" msgid="5689095009030336593">"send sms-modtaget udsendelse"</string>
-    <string name="permdesc_broadcastSmsReceived" msgid="9122419277306740155">"Tillader, at et program udsender en meddelelse om, at der er modtaget en sms-besked. Ondsindede programmer kan eventuelt bruge dette til at forfalske indgående sms-beskeder."</string>
+    <string name="permdesc_broadcastSmsReceived" msgid="9122419277306740155">"Tillader, at en applikation udsender en meddelelse om, at der er modtaget en sms-besked. Ondsindede applikationer kan eventuelt bruge dette til at forfalske indgående sms-beskeder."</string>
     <string name="permlab_broadcastWapPush" msgid="3145347413028582371">"send WAP-PUSH-modtaget udsendelse"</string>
-    <string name="permdesc_broadcastWapPush" msgid="3955303669461378091">"Tillader, at et program udsender en meddelelse om, at der er modtaget en WAP PUSH-besked. Ondsindede programmer kan eventuelt bruge dette til at forfalske modtagelse af mms-besked eller i det skjulte erstatte indholdet på alle websider med ondsindede varianter."</string>
+    <string name="permdesc_broadcastWapPush" msgid="3955303669461378091">"Tillader, at en applikation udsender en meddelelse om, at der er modtaget en WAP PUSH-besked. Ondsindede applikationer kan eventuelt bruge dette til at forfalske modtagelse af mms-besked eller i det skjulte erstatte indholdet på alle websider med ondsindede varianter."</string>
     <string name="permlab_setProcessLimit" msgid="2451873664363662666">"begræns antallet af kørende processer"</string>
-    <string name="permdesc_setProcessLimit" msgid="7824786028557379539">"Tillader, at et program kontrollerer det maksimale antal processer, der kan køre. Er aldrig nødvendigt til normale programmer."</string>
+    <string name="permdesc_setProcessLimit" msgid="7824786028557379539">"Tillader, at en applikation kontrollerer det maksimale antal processer, der kan køre. Er aldrig nødvendigt til normale applikationer."</string>
     <string name="permlab_setAlwaysFinish" msgid="5342837862439543783">"få alle baggrundsprogrammer til at lukke"</string>
-    <string name="permdesc_setAlwaysFinish" msgid="8773936403987091620">"Tillader, at et program kontrollerer, om aktiviteter altid afsluttes, så snart de går i baggrunden. Aldrig nødvendigt til normale programmer."</string>
+    <string name="permdesc_setAlwaysFinish" msgid="8773936403987091620">"Tillader, at en applikation kontrollerer, om aktiviteter altid afsluttes, så snart de går i baggrunden. Aldrig nødvendigt til normale applikationer."</string>
     <string name="permlab_batteryStats" msgid="7863923071360031652">"rediger batteristatistikker"</string>
-    <string name="permdesc_batteryStats" msgid="5847319823772230560">"Tillader ændring af indsamlede batteristatistikker. Ikke til brug for normale programmer."</string>
+    <string name="permdesc_batteryStats" msgid="5847319823772230560">"Tillader ændring af indsamlede batteristatistikker. Ikke til brug for normale applikationer."</string>
     <string name="permlab_backup" msgid="470013022865453920">"kontroller sikkerhedskopiering af system, og gendan"</string>
-    <string name="permdesc_backup" msgid="4837493065154256525">"Tillader, at et program kontrollerer systemets sikkerhedskopierings- og gendannelsesfunktion. Ikke til brug til normale programmer."</string>
+    <string name="permdesc_backup" msgid="4837493065154256525">"Tillader, at en applikation kontrollerer systemets sikkerhedskopierings- og gendannelsesfunktion. Ikke til brug til normale applikationer."</string>
     <string name="permlab_internalSystemWindow" msgid="2148563628140193231">"vis uautoriserede vinduer"</string>
-    <string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Tillader oprettelse af vinduer, der er beregnet til at blive brugt af den interne systembrugergrænseflade. Ikke til brug for normale programmer."</string>
+    <string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Tillader oprettelse af vinduer, der er beregnet til at blive brugt af den interne systembrugergrænseflade. Ikke til brug for normale applikationer."</string>
     <string name="permlab_systemAlertWindow" msgid="3372321942941168324">"vis underretninger på systemniveau"</string>
-    <string name="permdesc_systemAlertWindow" msgid="2884149573672821318">"Tillader, at et program viser vinduer med systemunderretninger. Ondsindede programmer kan overtage hele skærmen."</string>
+    <string name="permdesc_systemAlertWindow" msgid="2884149573672821318">"Tillader, at en applikation viser vinduer med systemunderretninger. Ondsindede applikationer kan overtage hele skærmen."</string>
     <string name="permlab_setAnimationScale" msgid="2805103241153907174">"rediger global animationshastighed"</string>
-    <string name="permdesc_setAnimationScale" msgid="7181522138912391988">"Tillader, at et program altid kan ændre den globale animationshastighed (hurtigere eller langsommere animationer)."</string>
+    <string name="permdesc_setAnimationScale" msgid="7181522138912391988">"Tillader, at en applikation altid kan ændre den globale animationshastighed (hurtigere eller langsommere animationer)."</string>
     <string name="permlab_manageAppTokens" msgid="17124341698093865">"administrer programtokens"</string>
-    <string name="permdesc_manageAppTokens" msgid="977127907524195988">"Tillader, at programmet opretter og administrerer sine egen tokens og gå uden om sin normale Z-rækkefølge. Bør aldrig være nødvendigt til normale programmer."</string>
+    <string name="permdesc_manageAppTokens" msgid="977127907524195988">"Tillader, at applikationen opretter og administrerer sine egen tokens og gå uden om sin normale Z-rækkefølge. Bør aldrig være nødvendigt til normale applikationer."</string>
     <string name="permlab_injectEvents" msgid="1378746584023586600">"tryk på taster og kontrolknapper"</string>
-    <string name="permdesc_injectEvents" product="tablet" msgid="7200014808195664505">"Tillader, at et program leverer sine egne inputbegivenheder (tastetryk osv.) til andre programmer. Ondsindede programmer kan bruge dette til at overtage tabletcomputeren."</string>
-    <string name="permdesc_injectEvents" product="default" msgid="3946098050410874715">"Tillader, at et program leverer sine egne inputbegivenheder (tastetryk osv.) til andre programmer. Ondsindede programmer kan bruge dette til at overtage telefonen."</string>
+    <string name="permdesc_injectEvents" product="tablet" msgid="7200014808195664505">"Tillader, at en applikation leverer sine egne inputbegivenheder (tastetryk osv.) til andre applikationer. Ondsindede applikationer kan bruge dette til at overtage tabletcomputeren."</string>
+    <string name="permdesc_injectEvents" product="default" msgid="3946098050410874715">"Tillader, at en applikation leverer sine egne inputbegivenheder (tastetryk osv.) til andre applikationer. Ondsindede applikationer kan bruge dette til at overtage telefonen."</string>
     <string name="permlab_readInputState" msgid="469428900041249234">"registrerer, hvad du indtaster, og hvilke handlinger du foretager dig"</string>
-    <string name="permdesc_readInputState" msgid="5132879321450325445">"Tillader, at et program registrerer taster, du trykker på, selv når du interagerer med andre programmer (f.eks. ved indtastning af adgangskode). Bør aldrig være nødvendigt til normale programmer."</string>
+    <string name="permdesc_readInputState" msgid="5132879321450325445">"Tillader, at en applikation registrerer taster, du trykker på, selv når du interagerer med andre applikationer (f.eks. ved indtastning af adgangskode). Bør aldrig være nødvendigt til normale applikationer."</string>
     <string name="permlab_bindInputMethod" msgid="3360064620230515776">"forpligt til en inputmetode"</string>
-    <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Tillader, at brugeren forpligter sig til en inputmetodes grænseflade på øverste niveau. Bør aldrig være nødvendig til normale programmer."</string>
+    <string name="permdesc_bindInputMethod" msgid="3734838321027317228">"Tillader, at brugeren forpligter sig til en inputmetodes grænseflade på øverste niveau. Bør aldrig være nødvendig til normale applikationer."</string>
     <string name="permlab_bindWallpaper" msgid="8716400279937856462">"forpligt til et tapet"</string>
-    <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Tillader, at brugeren forpligter sig til et tapets grænseflade på øverste niveau. Bør aldrig være nødvendig til normale programmer."</string>
+    <string name="permdesc_bindWallpaper" msgid="5287754520361915347">"Tillader, at brugeren forpligter sig til et tapets grænseflade på øverste niveau. Bør aldrig være nødvendig til normale applikationer."</string>
     <string name="permlab_bindRemoteViews" msgid="5697987759897367099">"forpligt til en widgettjeneste"</string>
     <string name="permdesc_bindRemoteViews" msgid="2930855984822926963">"Tillader, at brugeren forpligter sig til en widgettjenestes grænseflade på øverste niveau. Bør aldrig være nødvendigt til almindelige applikationer."</string>
     <string name="permlab_bindDeviceAdmin" msgid="8704986163711455010">"kommunikere med en enhedsadministrator"</string>
-    <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Tillader brugeren at sende hensigter til en enhedsadministrator. Bør aldrig være nødvendigt for almindelige programmer."</string>
+    <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Tillader brugeren at sende hensigter til en enhedsadministrator. Bør aldrig være nødvendigt for almindelige applikationer."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"skift skærmretning"</string>
-    <string name="permdesc_setOrientation" msgid="6335814461615851863">"Tillader, at et program ændrer rotationen af skærmen når som helst. Bør aldrig være nødvendigt til normale programmer."</string>
-    <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"send Linux-signaler til programmer"</string>
-    <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Tillader, at programmet kan anmode om, at det leverede signal sendes til alle vedholdende processer."</string>
-    <string name="permlab_persistentActivity" msgid="8659652042401085862">"lad altid programmet køre"</string>
-    <string name="permdesc_persistentActivity" msgid="5037199778265006008">"Tillader, at et program gør dele af sig selv vedholdende, så systemet ikke kan bruge det til andre programmer."</string>
-    <string name="permlab_deletePackages" msgid="3343439331576348805">"slet programmer"</string>
-    <string name="permdesc_deletePackages" msgid="3634943677518723314">"Tillader, at et program sletter Android-pakker. Ondsindede programmer kan bruge dette til at slette vigtige programmer."</string>
+    <string name="permdesc_setOrientation" msgid="6335814461615851863">"Tillader, at en applikation ændrer rotationen af skærmen når som helst. Bør aldrig være nødvendigt til normale applikationer."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"ændre markørens hastighed"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Tillader, at en applikation altid kan ændre muse- eller pegefeltmarkørens hastighed. Burde ikke være nødvendigt i normale applikationer."</string>
+    <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"send Linux-signaler til applikationer"</string>
+    <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Tillader, at applikationen kan anmode om, at det leverede signal sendes til alle vedholdende processer."</string>
+    <string name="permlab_persistentActivity" msgid="8659652042401085862">"lad altid applikationen køre"</string>
+    <string name="permdesc_persistentActivity" msgid="5037199778265006008">"Tillader, at en applikation gør dele af sig selv vedholdende, så systemet ikke kan bruge det til andre applikationer."</string>
+    <string name="permlab_deletePackages" msgid="3343439331576348805">"slet applikationer"</string>
+    <string name="permdesc_deletePackages" msgid="3634943677518723314">"Tillader, at en applikation sletter Android-pakker. Ondsindede applikationer kan bruge dette til at slette vigtige applikationer."</string>
     <string name="permlab_clearAppUserData" msgid="2192134353540277878">"slet andre programmers data"</string>
-    <string name="permdesc_clearAppUserData" msgid="7546345080434325456">"Tillader, at et program rydder brugerdata."</string>
+    <string name="permdesc_clearAppUserData" msgid="7546345080434325456">"Tillader, at en applikation rydder brugerdata."</string>
     <string name="permlab_deleteCacheFiles" msgid="1518556602634276725">"slet andre programmers cacher"</string>
-    <string name="permdesc_deleteCacheFiles" msgid="2283074077168165971">"Tillader, at et program sletter cachefiler."</string>
+    <string name="permdesc_deleteCacheFiles" msgid="2283074077168165971">"Tillader, at en applikation sletter cachefiler."</string>
     <string name="permlab_getPackageSize" msgid="4799785352306641460">"vis programmets lagerplads"</string>
-    <string name="permdesc_getPackageSize" msgid="5557253039670753437">"Tillader, at et program henter sin kode, data og cachestørrelser"</string>
-    <string name="permlab_installPackages" msgid="335800214119051089">"installer programmer direkte"</string>
-    <string name="permdesc_installPackages" msgid="526669220850066132">"Tillader, at et program installerer nye eller opdaterede Android-pakker. Ondsindede programmer kan bruge dette til at tilføje nye programmer med vilkårlige, effektive tilladelser."</string>
-    <string name="permlab_clearAppCache" msgid="4747698311163766540">"slet alle cachedata for programmet"</string>
-    <string name="permdesc_clearAppCache" product="tablet" msgid="3097119797652477973">"Tillader, at et program frigør plads på tabletcomputeren ved at slette filer i programmets cachemappe. Adgang er normalt meget begrænset til systemprocesser."</string>
-    <string name="permdesc_clearAppCache" product="default" msgid="7740465694193671402">"Tillader, at et program frigør plads på telefonen ved at slette filer i programmets cachemappe. Adgang er normalt meget begrænset til systemprocesser."</string>
+    <string name="permdesc_getPackageSize" msgid="5557253039670753437">"Tillader, at en applikation henter sin kode, data og cachestørrelser"</string>
+    <string name="permlab_installPackages" msgid="335800214119051089">"installer applikationer direkte"</string>
+    <string name="permdesc_installPackages" msgid="526669220850066132">"Tillader, at en applikation installerer nye eller opdaterede Android-pakker. Ondsindede applikationer kan bruge dette til at tilføje nye applikationer med vilkårlige, effektive tilladelser."</string>
+    <string name="permlab_clearAppCache" msgid="4747698311163766540">"slet alle cachedata for applikationen"</string>
+    <string name="permdesc_clearAppCache" product="tablet" msgid="3097119797652477973">"Tillader, at en applikation frigør plads på tabletcomputeren ved at slette filer i programmets cachemappe. Adgang er normalt meget begrænset til systemprocesser."</string>
+    <string name="permdesc_clearAppCache" product="default" msgid="7740465694193671402">"Tillader, at en applikation frigør plads på telefonen ved at slette filer i programmets cachemappe. Adgang er normalt meget begrænset til systemprocesser."</string>
     <string name="permlab_movePackage" msgid="728454979946503926">"Flyt programressourcer"</string>
-    <string name="permdesc_movePackage" msgid="6323049291923925277">"Tillader, at et program flytter programressourcer fra interne til eksterne medier og omvendt."</string>
+    <string name="permdesc_movePackage" msgid="6323049291923925277">"Tillader, at en applikation flytter programressourcer fra interne til eksterne medier og omvendt."</string>
     <string name="permlab_readLogs" msgid="6615778543198967614">"læse følsomme logdata"</string>
-    <string name="permdesc_readLogs" product="tablet" msgid="4077356893924755294">"Tillader, at et program læser fra systemets forskellige logfiler. Dermed kan generelle oplysninger om, hvad du laver med tabletcomputeren, registreres, også personlige eller private oplysninger."</string>
-    <string name="permdesc_readLogs" product="default" msgid="8896449437464867766">"Tillader, at et program læser fra systemets forskellige logfiler. Dermed kan generelle oplysninger om, hvad du laver med telefonen, registreres, også personlige eller private oplysninger."</string>
+    <string name="permdesc_readLogs" product="tablet" msgid="4077356893924755294">"Tillader, at en applikation læser fra systemets forskellige logfiler. Dermed kan generelle oplysninger om, hvad du laver med tabletcomputeren, registreres, også personlige eller private oplysninger."</string>
+    <string name="permdesc_readLogs" product="default" msgid="8896449437464867766">"Tillader, at en applikation læser fra systemets forskellige logfiler. Dermed kan generelle oplysninger om, hvad du laver med telefonen, registreres, også personlige eller private oplysninger."</string>
     <string name="permlab_diagnostic" msgid="8076743953908000342">"læs/skriv til ressourcer ejet af diag"</string>
-    <string name="permdesc_diagnostic" msgid="3121238373951637049">"Tillader, at et program læser og skriver til alle ressourcer, der ejes af diag-gruppen, som f.eks. flier i /dev. Dette kan muligvis påvirke systemets stabilitet og sikkerhed. Dette bør KUN bruges til hardwarespecifikke diagnosticeringer foretaget af producent eller udbyder."</string>
+    <string name="permdesc_diagnostic" msgid="3121238373951637049">"Tillader, at en applikation læser og skriver til alle ressourcer, der ejes af diag-gruppen, som f.eks. flier i /dev. Dette kan muligvis påvirke systemets stabilitet og sikkerhed. Dette bør KUN bruges til hardwarespecifikke diagnosticeringer foretaget af producent eller udbyder."</string>
     <string name="permlab_changeComponentState" msgid="79425198834329406">"aktiver eller deaktiver programkomponenter"</string>
-    <string name="permdesc_changeComponentState" product="tablet" msgid="4647419365510068321">"Tillader, at et program ændrer, om en komponent fra et andet program er aktiveret eller ej. Ondsindede programmer kan bruge dette til at deaktivere vigtige funktioner på tabletcomputeren. Denne tilladelse skal anvendes med forsigtighed, da det kan forårsage ubrugelige, inkonsekvente eller ustabile programkomponenter."</string>
-    <string name="permdesc_changeComponentState" product="default" msgid="3443473726140080761">"Tillader, at et program ændrer, om en komponent fra et andet program er aktiveret eller ej. Ondsindede programmer kan bruge dette til at deaktivere vigtige funktioner på telefonen. Denne tilladelse skal anvendes med forsigtighed, da det kan forårsage ubrugelige eller ustabile programkomponenter."</string>
-    <string name="permlab_setPreferredApplications" msgid="3393305202145172005">"angiv foretrukne programmer"</string>
-    <string name="permdesc_setPreferredApplications" msgid="760008293501937546">"Tillader, at et program ændrer dine foretrukne programmer. Dette kan medføre, at ondsindede programmer ændrer kørende programmer i det skjulte og narrer dine eksisterende programmer til at indsamle personlige oplysninger fra dig."</string>
+    <string name="permdesc_changeComponentState" product="tablet" msgid="4647419365510068321">"Tillader, at en applikation ændrer, om en komponent fra en anden applikation er aktiveret eller ej. Ondsindede applikationer kan bruge dette til at deaktivere vigtige funktioner på tabletcomputeren. Denne tilladelse skal anvendes med forsigtighed, da det kan forårsage ubrugelige, inkonsekvente eller ustabile programkomponenter."</string>
+    <string name="permdesc_changeComponentState" product="default" msgid="3443473726140080761">"Tillader, at en applikation ændrer, om en komponent fra en anden applikation er aktiveret eller ej. Ondsindede applikationer kan bruge dette til at deaktivere vigtige funktioner på telefonen. Denne tilladelse skal anvendes med forsigtighed, da det kan forårsage ubrugelige eller ustabile programkomponenter."</string>
+    <string name="permlab_setPreferredApplications" msgid="3393305202145172005">"angiv foretrukne applikationer"</string>
+    <string name="permdesc_setPreferredApplications" msgid="760008293501937546">"Tillader, at en applikation ændrer dine foretrukne applikationer. Dette kan medføre, at ondsindede applikationer ændrer kørende applikationer i det skjulte og narrer dine eksisterende applikationer til at indsamle personlige oplysninger fra dig."</string>
     <string name="permlab_writeSettings" msgid="1365523497395143704">"rediger globale systemindstillinger"</string>
-    <string name="permdesc_writeSettings" msgid="838789419871034696">"Tillader, at et program ændrer systemets indstillingsdata. Ondsindede programmer kan skade systemets konfiguration."</string>
+    <string name="permdesc_writeSettings" msgid="838789419871034696">"Tillader, at en applikation ændrer systemets indstillingsdata. Ondsindede applikationer kan skade systemets konfiguration."</string>
     <string name="permlab_writeSecureSettings" msgid="204676251876718288">"rediger sikre systemindstillinger"</string>
-    <string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"Tillader, at et program ændrer systemernes sikre indstillingsdata. Ikke til brug til almindelige programmer."</string>
+    <string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"Tillader, at en applikation ændrer systemernes sikre indstillingsdata. Ikke til brug til almindelige applikationer."</string>
     <string name="permlab_writeGservices" msgid="2149426664226152185">"rediger kortet over Google-tjenester"</string>
-    <string name="permdesc_writeGservices" msgid="6602362746516676175">"Tillader, at et program ændrer kortet over Google-tjenester. Ikke til brug til normale programmer."</string>
+    <string name="permdesc_writeGservices" msgid="6602362746516676175">"Tillader, at en applikation ændrer kortet over Google-tjenester. Ikke til brug til normale applikationer."</string>
     <string name="permlab_receiveBootCompleted" msgid="7776779842866993377">"start automatisk ved opstart"</string>
-    <string name="permdesc_receiveBootCompleted" product="tablet" msgid="7530977064379338199">"Tillader, at et program selv starter, når systemet er færdig med at starte. Dette kan gøre opstarten af tabletcomputeren langsommere og generelt gøre tabletcomputeren langsommere ved altid at lade programmet køre."</string>
-    <string name="permdesc_receiveBootCompleted" product="default" msgid="698336728415008796">"Tillader, at et program starter selv, når systemet er færdig med at starte. Dette kan gøre startem af telefonen langsommere og generelt gøre telefonen langsommere ved altid at lade programmet køre."</string>
+    <string name="permdesc_receiveBootCompleted" product="tablet" msgid="7530977064379338199">"Tillader, at en applikation selv starter, når systemet er færdig med at starte. Dette kan gøre opstarten af tabletcomputeren langsommere og generelt gøre tabletcomputeren langsommere ved altid at lade applikationen køre."</string>
+    <string name="permdesc_receiveBootCompleted" product="default" msgid="698336728415008796">"Tillader, at en applikation starter selv, når systemet er færdig med at starte. Dette kan gøre startem af telefonen langsommere og generelt gøre telefonen langsommere ved altid at lade applikationen køre."</string>
     <string name="permlab_broadcastSticky" msgid="7919126372606881614">"send klæbende udsendelse"</string>
-    <string name="permdesc_broadcastSticky" product="tablet" msgid="6322249605930062595">"Tillader, at et program sender klæbende udsendelser, der bliver tilbage, efter udsendelsen er slut. Ondsindede programmer kan gøre tabletcomputeren langsom eller ustabil ved at få den til at bruge for meget hukommelse."</string>
-    <string name="permdesc_broadcastSticky" product="default" msgid="1920045289234052219">"Tillader, at et program sender klæbende udsendelser, der bliver tilbage, efter udsendelsen er slut. Ondsindede programmer kan gøre telefonen langsom eller ustabil ved at få den til at bruge for meget hukommelse."</string>
+    <string name="permdesc_broadcastSticky" product="tablet" msgid="6322249605930062595">"Tillader, at en applikation sender klæbende udsendelser, der bliver tilbage, efter udsendelsen er slut. Ondsindede applikationer kan gøre tabletcomputeren langsom eller ustabil ved at få den til at bruge for meget hukommelse."</string>
+    <string name="permdesc_broadcastSticky" product="default" msgid="1920045289234052219">"Tillader, at en applikation sender klæbende udsendelser, der bliver tilbage, efter udsendelsen er slut. Ondsindede applikationer kan gøre telefonen langsom eller ustabil ved at få den til at bruge for meget hukommelse."</string>
     <string name="permlab_readContacts" msgid="6219652189510218240">"læs kontaktdata"</string>
-    <string name="permdesc_readContacts" product="tablet" msgid="7596158687301157686">"Tillader, at et program læser alle kontaktdata (adresser), der er gemt på din tabletcomputer. Ondsindede programmer kan bruge dette til at sende dine data til andre mennesker."</string>
-    <string name="permdesc_readContacts" product="default" msgid="3371591512896545975">"Tillader, at et program læser alle kontaktdata (adresser), der er gemt på din telefon. Ondsindede programmer kan bruge dette til at sende dine data til andre mennesker."</string>
+    <string name="permdesc_readContacts" product="tablet" msgid="7596158687301157686">"Tillader, at en applikation læser alle kontaktdata (adresser), der er gemt på din tabletcomputer. Ondsindede applikationer kan bruge dette til at sende dine data til andre mennesker."</string>
+    <string name="permdesc_readContacts" product="default" msgid="3371591512896545975">"Tillader, at en applikation læser alle kontaktdata (adresser), der er gemt på din telefon. Ondsindede applikationer kan bruge dette til at sende dine data til andre mennesker."</string>
     <string name="permlab_writeContacts" msgid="644616215860933284">"skriv kontaktdata"</string>
-    <string name="permdesc_writeContacts" product="tablet" msgid="7782689510038568495">"Tillader, at et program ændrer kontaktdata (adresser), der er gemt på din tabletcomputer. Ondsindede programmer kan bruge dette til at slette eller ændre kontaktdata."</string>
-    <string name="permdesc_writeContacts" product="default" msgid="3924383579108183601">"Tillader, at et program ændrer kontaktdata (adresser), der er gemt på din telefon. Ondsindede programmer kan bruge dette til at slette eller ændre kontaktdata."</string>
+    <string name="permdesc_writeContacts" product="tablet" msgid="7782689510038568495">"Tillader, at en applikation ændrer kontaktdata (adresser), der er gemt på din tabletcomputer. Ondsindede applikationer kan bruge dette til at slette eller ændre kontaktdata."</string>
+    <string name="permdesc_writeContacts" product="default" msgid="3924383579108183601">"Tillader, at en applikation ændrer kontaktdata (adresser), der er gemt på din telefon. Ondsindede applikationer kan bruge dette til at slette eller ændre kontaktdata."</string>
     <string name="permlab_readCalendar" msgid="6898987798303840534">"læs kalenderbegivenheder"</string>
-    <string name="permdesc_readCalendar" product="tablet" msgid="5905870265734599678">"Tillader, at et program læser alle kalenderbegivenheder, der er gemt på din tabletcomputer. Ondsindede programmer kan bruge dette til at sende dine kalenderbegivenheder til andre mennesker."</string>
-    <string name="permdesc_readCalendar" product="default" msgid="5533029139652095734">"Tillader, at et program læser alle kalenderbegivenheder, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at sende dine kalenderbegivenheder til andre mennesker."</string>
+    <string name="permdesc_readCalendar" product="tablet" msgid="5905870265734599678">"Tillader, at en applikation læser alle kalenderbegivenheder, der er gemt på din tabletcomputer. Ondsindede applikationer kan bruge dette til at sende dine kalenderbegivenheder til andre mennesker."</string>
+    <string name="permdesc_readCalendar" product="default" msgid="5533029139652095734">"Tillader, at en applikation læser alle kalenderbegivenheder, der er gemt på din telefon. Ondsindede applikationer kan bruge dette til at sende dine kalenderbegivenheder til andre mennesker."</string>
     <string name="permlab_writeCalendar" msgid="3894879352594904361">"tilføj eller rediger kalenderbegivenheder, og send e-mail til gæster"</string>
-    <string name="permdesc_writeCalendar" msgid="2988871373544154221">"Tillader, at et program tilføjer eller ændrer begivenhederne i din kalender, hvilket kan sende e-mail til gæster. Ondsindede programmer kan bruge dette til at slette eller ændre dine kalenderbegivenheder eller til at sende e-mail til gæster."</string>
+    <string name="permdesc_writeCalendar" msgid="2988871373544154221">"Tillader, at en applikation tilføjer eller ændrer begivenhederne i din kalender, hvilket kan sende e-mail til gæster. Ondsindede applikationer kan bruge dette til at slette eller ændre dine kalenderbegivenheder eller til at sende e-mail til gæster."</string>
     <string name="permlab_accessMockLocation" msgid="8688334974036823330">"imiterede placeringskilder til test"</string>
-    <string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Opret imiterede placeringskilder til testning. Ondsindede programmer kan bruge dette til at tilsidesætte den returnerede placering og/eller status fra rigtige placeringskilder som f.eks. GPS eller netværksudbydere."</string>
+    <string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Opret imiterede placeringskilder til testning. Ondsindede applikationer kan bruge dette til at tilsidesætte den returnerede placering og/eller status fra rigtige placeringskilder som f.eks. GPS eller netværksudbydere."</string>
     <string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"få adgang til yderligere kommandoer for placeringsudbyder"</string>
-    <string name="permdesc_accessLocationExtraCommands" msgid="1948144701382451721">"Få adgang til ekstra kommandoer fra placeringsudbyder. Ondsindede programmer kan bruge dette til at gribe ind i driften af GPS\'en eller andre placeringskilder."</string>
+    <string name="permdesc_accessLocationExtraCommands" msgid="1948144701382451721">"Få adgang til ekstra kommandoer fra placeringsudbyder. Ondsindede applikationer kan bruge dette til at gribe ind i driften af GPS\'en eller andre placeringskilder."</string>
     <string name="permlab_installLocationProvider" msgid="6578101199825193873">"tilladelse til at installere en placeringsudbyder"</string>
-    <string name="permdesc_installLocationProvider" msgid="5449175116732002106">"Opret imiterede placeringskilder til testning. Ondsindede programmer kan bruge dette til at tilsidesætte den returnerede placering og/eller status fra rigtige placeringskilder som f.eks. GPS eller netværksudbydere eller til at overvåge og rapportere din placering til en ekstern kilde."</string>
+    <string name="permdesc_installLocationProvider" msgid="5449175116732002106">"Opret imiterede placeringskilder til testning. Ondsindede applikationer kan bruge dette til at tilsidesætte den returnerede placering og/eller status fra rigtige placeringskilder som f.eks. GPS eller netværksudbydere eller til at overvåge og rapportere din placering til en ekstern kilde."</string>
     <string name="permlab_accessFineLocation" msgid="8116127007541369477">"fin (GPS) placering"</string>
-    <string name="permdesc_accessFineLocation" product="tablet" msgid="243973693233359681">"Få adgang til gode placeringskilder, som f.eks. Global Positioning System på tabletcomputeren, hvor det er tilgængeligt. Ondsindede programmer kan bruge dette til at finde ud af, hvor du er, og kan eventuelt bruge yderligere batterikapacitet."</string>
-    <string name="permdesc_accessFineLocation" product="default" msgid="7411213317434337331">"Få adgang til gode placeringskilder, som f.eks. Global Positioning System på telefonen, når det er tilgængeligt. Ondsindede programmer kan bruge dette til at finde ud af, hvor du er og kan eventuelt bruge yderligere batterikapacitet."</string>
+    <string name="permdesc_accessFineLocation" product="tablet" msgid="243973693233359681">"Få adgang til gode placeringskilder, som f.eks. Global Positioning System på tabletcomputeren, hvor det er tilgængeligt. Ondsindede applikationer kan bruge dette til at finde ud af, hvor du er, og kan eventuelt bruge yderligere batterikapacitet."</string>
+    <string name="permdesc_accessFineLocation" product="default" msgid="7411213317434337331">"Få adgang til gode placeringskilder, som f.eks. Global Positioning System på telefonen, når det er tilgængeligt. Ondsindede applikationer kan bruge dette til at finde ud af, hvor du er og kan eventuelt bruge yderligere batterikapacitet."</string>
     <string name="permlab_accessCoarseLocation" msgid="4642255009181975828">"grov (netværksbaseret) placering"</string>
-    <string name="permdesc_accessCoarseLocation" product="tablet" msgid="3704633168985466045">"Få adgang til grove placeringskilder som f.eks. den mobile netværksdatabase for at finde en omtrentlig placering for tabletcomputeren, hvor det er muligt. Ondsindede programmer kan bruge dette til at finde ud af, hvor du omtrent er."</string>
-    <string name="permdesc_accessCoarseLocation" product="default" msgid="8235655958070862293">"Få adgang til grove placeringskilder som f.eks. den mobile netværksdatabase for at finde en omtrentlig placering for telefonen, hvor det er muligt. Ondsindede programmer kan bruge dette til at finde ud af, hvor du omtrent er."</string>
+    <string name="permdesc_accessCoarseLocation" product="tablet" msgid="3704633168985466045">"Få adgang til grove placeringskilder som f.eks. den mobile netværksdatabase for at finde en omtrentlig placering for tabletcomputeren, hvor det er muligt. Ondsindede applikationer kan bruge dette til at finde ud af, hvor du omtrent er."</string>
+    <string name="permdesc_accessCoarseLocation" product="default" msgid="8235655958070862293">"Få adgang til grove placeringskilder som f.eks. den mobile netværksdatabase for at finde en omtrentlig placering for telefonen, hvor det er muligt. Ondsindede applikationer kan bruge dette til at finde ud af, hvor du omtrent er."</string>
     <string name="permlab_accessSurfaceFlinger" msgid="2363969641792388947">"få adgang til SurfaceFlinger"</string>
-    <string name="permdesc_accessSurfaceFlinger" msgid="6805241830020733025">"Tillader, at et program bruger SurfaceFlinger-funktioner på lavt niveau."</string>
+    <string name="permdesc_accessSurfaceFlinger" msgid="6805241830020733025">"Tillader, at en applikation bruger SurfaceFlinger-funktioner på lavt niveau."</string>
     <string name="permlab_readFrameBuffer" msgid="6690504248178498136">"læs rammebuffer"</string>
-    <string name="permdesc_readFrameBuffer" msgid="7530020370469942528">"Tillader, at et program læser indholdet fra rammebufferen."</string>
+    <string name="permdesc_readFrameBuffer" msgid="7530020370469942528">"Tillader, at en applikation læser indholdet fra rammebufferen."</string>
     <string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"skift dine lydindstillinger"</string>
-    <string name="permdesc_modifyAudioSettings" msgid="5793461287365991922">"Tillader, at et program ændrer globale lydindstillinger som f.eks. lydstyrke og kanalisering."</string>
+    <string name="permdesc_modifyAudioSettings" msgid="5793461287365991922">"Tillader, at en applikation ændrer globale lydindstillinger som f.eks. lydstyrke og kanalisering."</string>
     <string name="permlab_recordAudio" msgid="3876049771427466323">"optag lyd"</string>
-    <string name="permdesc_recordAudio" msgid="6493228261176552356">"Tillader, at et program får adgang til lydregistreringsstien."</string>
+    <string name="permdesc_recordAudio" msgid="6493228261176552356">"Tillader, at en applikation får adgang til lydregistreringsstien."</string>
     <string name="permlab_camera" msgid="3616391919559751192">"tag billeder og optag video"</string>
-    <string name="permdesc_camera" msgid="6004878235852154239">"Tillader, at programmet tager billeder og optager video med kameraet. Dette giver programmet mulighed for altid at indsamle de billeder, kameraet ser."</string>
+    <string name="permdesc_camera" msgid="6004878235852154239">"Tillader, at applikationen tager billeder og optager video med kameraet. Dette giver applikationen mulighed for altid at indsamle de billeder, kameraet ser."</string>
     <string name="permlab_brick" product="tablet" msgid="2961292205764488304">"deaktiver tabletcomputeren permanent"</string>
     <string name="permlab_brick" product="default" msgid="8337817093326370537">"deaktiver telefonen permanent"</string>
-    <string name="permdesc_brick" product="tablet" msgid="7379164636920817963">"Tillader, at programmet deaktiverer hele tabletcomputeren permanent. Dette er meget farligt."</string>
-    <string name="permdesc_brick" product="default" msgid="5569526552607599221">"Tillader, at programmet deaktiverer hele telefonen permanent. Dette er meget farligt."</string>
+    <string name="permdesc_brick" product="tablet" msgid="7379164636920817963">"Tillader, at applikationen deaktiverer hele tabletcomputeren permanent. Dette er meget farligt."</string>
+    <string name="permdesc_brick" product="default" msgid="5569526552607599221">"Tillader, at applikationen deaktiverer hele telefonen permanent. Dette er meget farligt."</string>
     <string name="permlab_reboot" product="tablet" msgid="3436634972561795002">"tving tabletcomputeren til at genstarte"</string>
     <string name="permlab_reboot" product="default" msgid="2898560872462638242">"tving telefon til at genstarte"</string>
-    <string name="permdesc_reboot" product="tablet" msgid="4555793623560701557">"Tillader, at programmet tvinger tabletcomputeren til at genstarte."</string>
-    <string name="permdesc_reboot" product="default" msgid="7914933292815491782">"Tillader, at programmet tvinger telefonen til at genstarte."</string>
+    <string name="permdesc_reboot" product="tablet" msgid="4555793623560701557">"Tillader, at applikationen tvinger tabletcomputeren til at genstarte."</string>
+    <string name="permdesc_reboot" product="default" msgid="7914933292815491782">"Tillader, at applikationen tvinger telefonen til at genstarte."</string>
     <string name="permlab_mount_unmount_filesystems" msgid="1761023272170956541">"monter eller demonter filsystemer"</string>
-    <string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Tillader, at programmet monterer eller demonterer filsystemer til flytbar lagring."</string>
+    <string name="permdesc_mount_unmount_filesystems" msgid="6253263792535859767">"Tillader, at applikationen monterer eller demonterer filsystemer til flytbar lagring."</string>
     <string name="permlab_mount_format_filesystems" msgid="5523285143576718981">"formater ekstern lagring"</string>
-    <string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Tillader, at et program formaterer flytbart lager."</string>
+    <string name="permdesc_mount_format_filesystems" msgid="574060044906047386">"Tillader, at en applikation formaterer flytbart lager."</string>
     <string name="permlab_asec_access" msgid="3411338632002193846">"hente oplysninger om internt lager"</string>
-    <string name="permdesc_asec_access" msgid="8820326551687285439">"Tillader, at programmet får oplysninger om internt lager."</string>
+    <string name="permdesc_asec_access" msgid="8820326551687285439">"Tillader, at applikationen får oplysninger om internt lager."</string>
     <string name="permlab_asec_create" msgid="6414757234789336327">"oprette internt lager"</string>
-    <string name="permdesc_asec_create" msgid="2621346764995731250">"Tillader, at programmet opretter internt lager."</string>
+    <string name="permdesc_asec_create" msgid="2621346764995731250">"Tillader, at applikationen opretter internt lager."</string>
     <string name="permlab_asec_destroy" msgid="526928328301618022">"ødelægge internt lager"</string>
-    <string name="permdesc_asec_destroy" msgid="2746706889208066256">"Tillader, at programmet ødelægger internt lager."</string>
+    <string name="permdesc_asec_destroy" msgid="2746706889208066256">"Tillader, at applikationen ødelægger internt lager."</string>
     <string name="permlab_asec_mount_unmount" msgid="2456287623689029744">"montere/demontere internt lager"</string>
-    <string name="permdesc_asec_mount_unmount" msgid="5934375590189368200">"Tillader, at programmet monterer/demonterer internt lager."</string>
+    <string name="permdesc_asec_mount_unmount" msgid="5934375590189368200">"Tillader, at applikationen monterer/demonterer internt lager."</string>
     <string name="permlab_asec_rename" msgid="7496633954080472417">"omdøbe internt lager"</string>
-    <string name="permdesc_asec_rename" msgid="2152829985238876790">"Tillader, at programmet omdøber internt lager."</string>
+    <string name="permdesc_asec_rename" msgid="2152829985238876790">"Tillader, at applikationen omdøber internt lager."</string>
     <string name="permlab_vibrate" msgid="7768356019980849603">"kontroller vibrator"</string>
-    <string name="permdesc_vibrate" msgid="2886677177257789187">"Lader programmet kontrollere vibratoren."</string>
+    <string name="permdesc_vibrate" msgid="2886677177257789187">"Lader applikationen kontrollere vibratoren."</string>
     <string name="permlab_flashlight" msgid="2155920810121984215">"kontroller lommelygte"</string>
-    <string name="permdesc_flashlight" msgid="6433045942283802309">"Tillader, at programmet kontrollerer lommelygten."</string>
+    <string name="permdesc_flashlight" msgid="6433045942283802309">"Tillader, at applikationen kontrollerer lommelygten."</string>
     <string name="permlab_manageUsb" msgid="1113453430645402723">"administrer præferencer og tilladelser for USB-enheder"</string>
-    <string name="permdesc_manageUsb" msgid="6148489202092166164">"Tillader, at programmet administrerer præferencer og tilladelser for USB-enheder."</string>
+    <string name="permdesc_manageUsb" msgid="6148489202092166164">"Tillader, at applikationen administrerer præferencer og tilladelser for USB-enheder."</string>
     <string name="permlab_accessMtp" msgid="4953468676795917042">"implementere MTP-protokol"</string>
     <string name="permdesc_accessMtp" msgid="6532961200486791570">"Tillader adgang til kerne-MTP-driveren for at implementere MTB USB-protokollen."</string>
     <string name="permlab_hardware_test" msgid="4148290860400659146">"test hardware"</string>
-    <string name="permdesc_hardware_test" msgid="3668894686500081699">"Tillader, at et program kontrollerer forskellige perifere enheder for at teste hardwaren."</string>
+    <string name="permdesc_hardware_test" msgid="3668894686500081699">"Tillader, at en applikation kontrollerer forskellige perifere enheder for at teste hardwaren."</string>
     <string name="permlab_callPhone" msgid="3925836347681847954">"ring direkte op til telefonnumre"</string>
-    <string name="permdesc_callPhone" msgid="3369867353692722456">"Tillader, at programmet ringer til telefonnumre uden din indgriben. Ondsindede programmer kan forårsage uventede opkald på din telefonregning. Vær opmærksom på, at programmet ikke kan ringe til nødnumre."</string>
+    <string name="permdesc_callPhone" msgid="3369867353692722456">"Tillader, at applikationen ringer til telefonnumre uden din indgriben. Ondsindede applikationer kan forårsage uventede opkald på din telefonregning. Vær opmærksom på, at applikationen ikke kan ringe til nødnumre."</string>
     <string name="permlab_callPrivileged" msgid="4198349211108497879">"ring direkte op til alle telefonnumre"</string>
-    <string name="permdesc_callPrivileged" msgid="244405067160028452">"Tillader, at programmet ringer til alle telefonnumre inklusive nødnumre uden din indgriben. Ondsindede programmer kan eventuelt foretage unødvendige og ulovlige opkald til nødtjenester."</string>
+    <string name="permdesc_callPrivileged" msgid="244405067160028452">"Tillader, at applikationen ringer til alle telefonnumre inklusive nødnumre uden din indgriben. Ondsindede applikationer kan eventuelt foretage unødvendige og ulovlige opkald til nødtjenester."</string>
     <string name="permlab_performCdmaProvisioning" product="tablet" msgid="4842576994144604821">"start CDMA-opsætning af tabletcomputeren direkte"</string>
     <string name="permlab_performCdmaProvisioning" product="default" msgid="5604848095315421425">"start CDMA-telefonopsætning direkte"</string>
-    <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Tillader, at programmet starter CDMA-levering. Ondsindede programmer kan starte unødvendig CDMA-levering"</string>
+    <string name="permdesc_performCdmaProvisioning" msgid="6457447676108355905">"Tillader, at applikationen starter CDMA-levering. Ondsindede applikationer kan starte unødvendig CDMA-levering"</string>
     <string name="permlab_locationUpdates" msgid="7785408253364335740">"kontroller meddelelser om placeringsopdatering"</string>
-    <string name="permdesc_locationUpdates" msgid="2300018303720930256">"Tillader aktivering/deaktivering af placeringsdata fra radioen. Ikke til brug til normale programmer."</string>
+    <string name="permdesc_locationUpdates" msgid="2300018303720930256">"Tillader aktivering/deaktivering af placeringsdata fra radioen. Ikke til brug til normale applikationer."</string>
     <string name="permlab_checkinProperties" msgid="7855259461268734914">"egenskaber for adgangskontrol"</string>
-    <string name="permdesc_checkinProperties" msgid="7150307006141883832">"Tillader læse/skrive-adgang til egenskaber, der er uploadet af kontroltjenesten. Ikke til brug til normale programmer."</string>
+    <string name="permdesc_checkinProperties" msgid="7150307006141883832">"Tillader læse/skrive-adgang til egenskaber, der er uploadet af kontroltjenesten. Ikke til brug til normale applikationer."</string>
     <string name="permlab_bindGadget" msgid="776905339015863471">"vælg widgets"</string>
-    <string name="permdesc_bindGadget" msgid="2098697834497452046">"Tillader, at programmet fortæller systemet, hvilke widgets der kan bruges af hvilke programmer. Med denne tilladelse kan programmer give adgang til personlige oplysninger til andre programmer. Ikke til brug til normale programmer."</string>
+    <string name="permdesc_bindGadget" msgid="2098697834497452046">"Tillader, at applikationen fortæller systemet, hvilke widgets der kan bruges af hvilke applikationer. Med denne tilladelse kan applikationer give adgang til personlige oplysninger til andre applikationer. Ikke til brug til normale applikationer."</string>
     <string name="permlab_modifyPhoneState" msgid="8423923777659292228">"rediger telefontilstand"</string>
-    <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Tillader, at programmet kontrollerer enhedens telefonfunktioner. Et program med denne tilladelse kan skifte netværk, slå telefonens radio til og fra og lignende uden nogensinde at informere dig."</string>
+    <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Tillader, at applikationen kontrollerer enhedens telefonfunktioner. En applikation med denne tilladelse kan skifte netværk, slå telefonens radio til og fra og lignende uden nogensinde at informere dig."</string>
     <string name="permlab_readPhoneState" msgid="2326172951448691631">"læs telefontilstand og identitet"</string>
-    <string name="permdesc_readPhoneState" msgid="188877305147626781">"Tillader, at programmet får adgang til enhedens telefonfunktioner. Et program kan med denne tilladelse registrere denne telefons telefon- og serienummer, om et opkald er aktivt, nummeret som det opkald er forbundet til osv."</string>
+    <string name="permdesc_readPhoneState" msgid="188877305147626781">"Tillader, at applikationen får adgang til enhedens telefonfunktioner. En applikation kan med denne tilladelse registrere denne telefons telefon- og serienummer, om et opkald er aktivt, nummeret som det opkald er forbundet til osv."</string>
     <string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"afhold tabletcomputeren fra at gå i dvale"</string>
     <string name="permlab_wakeLock" product="default" msgid="573480187941496130">"afhold telefonen fra at gå i dvale"</string>
-    <string name="permdesc_wakeLock" product="tablet" msgid="4032181488045338551">"Tillader, at et program forhindrer tabletcomputeren i at gå i dvale."</string>
-    <string name="permdesc_wakeLock" product="default" msgid="7584036471227467099">"Tillader, at et program forhindrer telefonen i at gå i dvale."</string>
+    <string name="permdesc_wakeLock" product="tablet" msgid="4032181488045338551">"Tillader, at en applikation forhindrer tabletcomputeren i at gå i dvale."</string>
+    <string name="permdesc_wakeLock" product="default" msgid="7584036471227467099">"Tillader, at en applikation forhindrer telefonen i at gå i dvale."</string>
     <string name="permlab_devicePower" product="tablet" msgid="2787034722616350417">"tænd eller sluk for tabletcomputeren"</string>
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"tænd eller sluk for telefonen"</string>
-    <string name="permdesc_devicePower" product="tablet" msgid="3853773100100451905">"Tillader, at programmet slukker og tænder tabletcomputeren."</string>
-    <string name="permdesc_devicePower" product="default" msgid="4577331933252444818">"Tillader, at programmet slukker og tænder telefonen."</string>
+    <string name="permdesc_devicePower" product="tablet" msgid="3853773100100451905">"Tillader, at applikationen slukker og tænder tabletcomputeren."</string>
+    <string name="permdesc_devicePower" product="default" msgid="4577331933252444818">"Tillader, at applikationen slukker og tænder telefonen."</string>
     <string name="permlab_factoryTest" msgid="3715225492696416187">"kør i fabriksindstillet testtilstand"</string>
     <string name="permdesc_factoryTest" product="tablet" msgid="3952059318359653091">"Kør som en producenttest på lavt niveau, der giver fuld adgang til tabletcomputerens hardware. Kun tilgængeligt når en tabletcomputer kører i producenttesttilstand."</string>
     <string name="permdesc_factoryTest" product="default" msgid="8136644990319244802">"Kør som en producenttest på lavt niveau. Giver fuld adgang til telefonens hardware. Kun tilgængeligt når en telefon kører i producenttesttilstand."</string>
     <string name="permlab_setWallpaper" msgid="6627192333373465143">"angiv tapet"</string>
-    <string name="permdesc_setWallpaper" msgid="6417041752170585837">"Tillader, at programmet opsætter systemets tapet."</string>
+    <string name="permdesc_setWallpaper" msgid="6417041752170585837">"Tillader, at applikationen opsætter systemets tapet."</string>
     <string name="permlab_setWallpaperHints" msgid="3600721069353106851">"opsæt tip til tapetstørrelse"</string>
-    <string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Tillader, at programmet opsætter størrelsestip for systemets tapet."</string>
+    <string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Tillader, at applikationen opsætter størrelsestip for systemets tapet."</string>
     <string name="permlab_masterClear" msgid="2315750423139697397">"nulstil system til fabriksstandarder"</string>
-    <string name="permdesc_masterClear" msgid="5033465107545174514">"Tillader, at et program nulstiller systemet fuldstændig til fabriksindstillingerne, sletter alle data, konfigurationer og installerede programmer."</string>
+    <string name="permdesc_masterClear" msgid="5033465107545174514">"Tillader, at en applikation nulstiller systemet fuldstændig til fabriksindstillingerne, sletter alle data, konfigurationer og installerede applikationer."</string>
     <string name="permlab_setTime" msgid="2021614829591775646">"angive tid"</string>
-    <string name="permdesc_setTime" product="tablet" msgid="209693136361006073">"Tillader, at et program ændrer tabletcomputerens klokkeslæt."</string>
-    <string name="permdesc_setTime" product="default" msgid="667294309287080045">"Tillader, at et program ændrer telefonens klokkeslæt."</string>
+    <string name="permdesc_setTime" product="tablet" msgid="209693136361006073">"Tillader, at en applikation ændrer tabletcomputerens klokkeslæt."</string>
+    <string name="permdesc_setTime" product="default" msgid="667294309287080045">"Tillader, at en applikation ændrer telefonens klokkeslæt."</string>
     <string name="permlab_setTimeZone" msgid="2945079801013077340">"angiv tidszone"</string>
-    <string name="permdesc_setTimeZone" product="tablet" msgid="2522877107613885139">"Tillader, at et program ændrer tabletcomputerens tidszone."</string>
-    <string name="permdesc_setTimeZone" product="default" msgid="1902540227418179364">"Tillader, at et program ændrer telefonens tidszone."</string>
+    <string name="permdesc_setTimeZone" product="tablet" msgid="2522877107613885139">"Tillader, at en applikation ændrer tabletcomputerens tidszone."</string>
+    <string name="permdesc_setTimeZone" product="default" msgid="1902540227418179364">"Tillader, at en applikation ændrer telefonens tidszone."</string>
     <string name="permlab_accountManagerService" msgid="4829262349691386986">"fungerer som kontoadministrationstjeneste"</string>
-    <string name="permdesc_accountManagerService" msgid="6056903274106394752">"Tillader, at et program foretager opkald til kontogodkendere"</string>
+    <string name="permdesc_accountManagerService" msgid="6056903274106394752">"Tillader, at en applikation foretager opkald til kontogodkendere"</string>
     <string name="permlab_getAccounts" msgid="4549918644233460103">"registrer kendte konti"</string>
-    <string name="permdesc_getAccounts" product="tablet" msgid="857622793935544694">"Tillader, at et program henter listen over konti, der er kendt af tabletcomputeren."</string>
-    <string name="permdesc_getAccounts" product="default" msgid="6839262446413155394">"Tillader, at et program henter listen over konti, der er kendt af telefonen."</string>
+    <string name="permdesc_getAccounts" product="tablet" msgid="857622793935544694">"Tillader, at en applikation henter listen over konti, der er kendt af tabletcomputeren."</string>
+    <string name="permdesc_getAccounts" product="default" msgid="6839262446413155394">"Tillader, at en applikation henter listen over konti, der er kendt af telefonen."</string>
     <string name="permlab_authenticateAccounts" msgid="3940505577982882450">"fungerer som en kontogodkender"</string>
-    <string name="permdesc_authenticateAccounts" msgid="4006839406474208874">"Tillader, at et program bruger kontoadministratorens kontogodkendelsesegenskaber, bl.a. oprettelse af konti samt hentning og indstilling af deres adgangskoder."</string>
+    <string name="permdesc_authenticateAccounts" msgid="4006839406474208874">"Tillader, at en applikation bruger kontoadministratorens kontogodkendelsesegenskaber, bl.a. oprettelse af konti samt hentning og indstilling af deres adgangskoder."</string>
     <string name="permlab_manageAccounts" msgid="4440380488312204365">"administrer kontolisten"</string>
-    <string name="permdesc_manageAccounts" msgid="8804114016661104517">"Tillader, at et program foretager handlinger, f.eks. at tilføje og fjerne konti samt slette sin adgangskode."</string>
+    <string name="permdesc_manageAccounts" msgid="8804114016661104517">"Tillader, at en applikation foretager handlinger, f.eks. at tilføje og fjerne konti samt slette sin adgangskode."</string>
     <string name="permlab_useCredentials" msgid="6401886092818819856">"brug en kontos godkendelsesoplysninger"</string>
-    <string name="permdesc_useCredentials" msgid="7416570544619546974">"Tillader, at et program anmoder om godkendelsestokens"</string>
+    <string name="permdesc_useCredentials" msgid="7416570544619546974">"Tillader, at en applikation anmoder om godkendelsestokens"</string>
     <string name="permlab_accessNetworkState" msgid="6865575199464405769">"vis netværkstilstand"</string>
-    <string name="permdesc_accessNetworkState" msgid="558721128707712766">"Tillader, at et program viser tilstanden for alle netværk."</string>
+    <string name="permdesc_accessNetworkState" msgid="558721128707712766">"Tillader, at en applikation viser tilstanden for alle netværk."</string>
     <string name="permlab_createNetworkSockets" msgid="9121633680349549585">"fuld internetadgang"</string>
-    <string name="permdesc_createNetworkSockets" msgid="4593339106921772192">"Tillader, at et program opretter netværks-sockets."</string>
+    <string name="permdesc_createNetworkSockets" msgid="4593339106921772192">"Tillader, at en applikation opretter netværks-sockets."</string>
     <string name="permlab_writeApnSettings" msgid="7823599210086622545">"skriv indstillinger for adgangspunktnavn"</string>
-    <string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Tillader, at et program ændrer APN-indstillingerne, f.eks. enhver APNs Proxy og Port."</string>
+    <string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Tillader, at en applikation ændrer APN-indstillingerne, f.eks. enhver APNs Proxy og Port."</string>
     <string name="permlab_changeNetworkState" msgid="958884291454327309">"skift netværksforbindelse"</string>
-    <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Tillader, at et program ændrer netværksforbindelsens tilstand."</string>
+    <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Tillader, at en applikation ændrer netværksforbindelsens tilstand."</string>
     <string name="permlab_changeTetherState" msgid="2702121155761140799">"Skift tethering-forbindelse"</string>
-    <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Tillader, at et program ændrer tilstand for et bundet netværk."</string>
+    <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Tillader, at en applikation ændrer tilstand for et bundet netværk."</string>
     <string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"skift brugerindstilling for baggrundsdata"</string>
-    <string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Tillader, at et program ændrer brugerindstillingerne for baggrundsdata."</string>
+    <string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Tillader, at en applikation ændrer brugerindstillingerne for baggrundsdata."</string>
     <string name="permlab_accessWifiState" msgid="8100926650211034400">"vis Wi-Fi-tilstand"</string>
-    <string name="permdesc_accessWifiState" msgid="485796529139236346">"Tillader, at et program viser oplysninger om Wi-Fi-tilstanden."</string>
+    <string name="permdesc_accessWifiState" msgid="485796529139236346">"Tillader, at en applikation viser oplysninger om Wi-Fi-tilstanden."</string>
     <string name="permlab_changeWifiState" msgid="7280632711057112137">"skift Wi-Fi-tilstand"</string>
-    <string name="permdesc_changeWifiState" msgid="2950383153656873267">"Tillader, at et program opretter og afbryder forbindelsen fra Wi-Fi-adgangspunkter og foretager ændringer i konfigurerede Wi-Fi-netværk."</string>
+    <string name="permdesc_changeWifiState" msgid="2950383153656873267">"Tillader, at en applikation opretter og afbryder forbindelsen fra Wi-Fi-adgangspunkter og foretager ændringer i konfigurerede Wi-Fi-netværk."</string>
     <string name="permlab_changeWifiMulticastState" msgid="1368253871483254784">"tillad Wi-Fi-multicastmodtagelse"</string>
-    <string name="permdesc_changeWifiMulticastState" msgid="8199464507656067553">"Tillader, at et program modtager pakker, der ikke er direkte adresseret til din enhed. Dette kan være nyttigt, hvis du finder tjenester, der tilbydes i nærheden. Det bruger mere strøm end multicasttilstanden."</string>
+    <string name="permdesc_changeWifiMulticastState" msgid="8199464507656067553">"Tillader, at en applikation modtager pakker, der ikke er direkte adresseret til din enhed. Dette kan være nyttigt, hvis du finder tjenester, der tilbydes i nærheden. Det bruger mere strøm end multicasttilstanden."</string>
     <string name="permlab_bluetoothAdmin" msgid="1092209628459341292">"bluetooth-administration"</string>
-    <string name="permdesc_bluetoothAdmin" product="tablet" msgid="3511795757324345837">"Tillader, at et program konfigurerer den lokale Bluetooth-tabletcomputer samt opdager og parrer med fjerne enheder."</string>
-    <string name="permdesc_bluetoothAdmin" product="default" msgid="7256289774667054555">"Tillader, at et program konfigurerer den lokale Bluetooth-telefon samt opdager og parrer med fjerne enheder."</string>
+    <string name="permdesc_bluetoothAdmin" product="tablet" msgid="3511795757324345837">"Tillader, at en applikation konfigurerer den lokale Bluetooth-tabletcomputer samt opdager og parrer med fjerne enheder."</string>
+    <string name="permdesc_bluetoothAdmin" product="default" msgid="7256289774667054555">"Tillader, at en applikation konfigurerer den lokale Bluetooth-telefon samt opdager og parrer med fjerne enheder."</string>
     <string name="permlab_bluetooth" msgid="8361038707857018732">"opret Bluetooth-forbindelser"</string>
-    <string name="permdesc_bluetooth" product="tablet" msgid="4191941825910543803">"Tillader, at et program viser konfigurationen af den lokale Bluetooth-tabletcomputer samt opretter og accepterer forbindelse med parrede enheder."</string>
-    <string name="permdesc_bluetooth" product="default" msgid="762515380679392945">"Tillader, at et program viser konfigurationen af den lokale Bluetooth-telefon samt opretter og accepterer forbindelse med parrede enheder."</string>
+    <string name="permdesc_bluetooth" product="tablet" msgid="4191941825910543803">"Tillader, at en applikation viser konfigurationen af den lokale Bluetooth-tabletcomputer samt opretter og accepterer forbindelse med parrede enheder."</string>
+    <string name="permdesc_bluetooth" product="default" msgid="762515380679392945">"Tillader, at en applikation viser konfigurationen af den lokale Bluetooth-telefon samt opretter og accepterer forbindelse med parrede enheder."</string>
     <string name="permlab_nfc" msgid="4423351274757876953">"kontrollere Near Field Communication"</string>
-    <string name="permdesc_nfc" msgid="9171401851954407226">"Tillader, at et program kommunikerer med tags, kort og læsere i Near Field Communication (NFC)."</string>
+    <string name="permdesc_nfc" msgid="9171401851954407226">"Tillader, at en applikation kommunikerer med tags, kort og læsere i Near Field Communication (NFC)."</string>
     <string name="permlab_disableKeyguard" msgid="4977406164311535092">"deaktiver tastaturlås"</string>
-    <string name="permdesc_disableKeyguard" msgid="3189763479326302017">"Tillader, at et program deaktiverer tastaturlåsen og al associeret adgangskodesikkerhed. Et legitimt eksempel på dette er, at telefonen deaktiverer tastaturlåsen, når der modtages et indgående telefonopkald, og genaktiverer tastaturlåsen, når opkaldet er afsluttet."</string>
+    <string name="permdesc_disableKeyguard" msgid="3189763479326302017">"Tillader, at en applikation deaktiverer tastaturlåsen og al associeret adgangskodesikkerhed. Et legitimt eksempel på dette er, at telefonen deaktiverer tastaturlåsen, når der modtages et indgående telefonopkald, og genaktiverer tastaturlåsen, når opkaldet er afsluttet."</string>
     <string name="permlab_readSyncSettings" msgid="6201810008230503052">"læs indstillinger for synkronisering"</string>
-    <string name="permdesc_readSyncSettings" msgid="5315925706353341823">"Tillader, at et program læser synkroniseringsindstillingerne, f.eks. om kontakter skal synkroniseres."</string>
+    <string name="permdesc_readSyncSettings" msgid="5315925706353341823">"Tillader, at en applikation læser synkroniseringsindstillingerne, f.eks. om kontakter skal synkroniseres."</string>
     <string name="permlab_writeSyncSettings" msgid="6297138566442486462">"skriv indstillinger for synkronisering"</string>
-    <string name="permdesc_writeSyncSettings" msgid="2498201614431360044">"Tillader, at et program ændrer indstillingerne for synkronisering, f.eks. kontakter skal synkroniseres."</string>
+    <string name="permdesc_writeSyncSettings" msgid="2498201614431360044">"Tillader, at en applikation ændrer indstillingerne for synkronisering, f.eks. kontakter skal synkroniseres."</string>
     <string name="permlab_readSyncStats" msgid="7396577451360202448">"læs synkroniseringsstatistikker"</string>
-    <string name="permdesc_readSyncStats" msgid="7511448343374465000">"Tillader, at et program læser synkroniseringsstatistikker, f.eks. oversigten over forrige synkroniseringer."</string>
+    <string name="permdesc_readSyncStats" msgid="7511448343374465000">"Tillader, at en applikation læser synkroniseringsstatistikker, f.eks. oversigten over forrige synkroniseringer."</string>
     <string name="permlab_subscribedFeedsRead" msgid="4756609637053353318">"læs abonnerede feeds"</string>
-    <string name="permdesc_subscribedFeedsRead" msgid="3622200625634207660">"Tillader, at et program får detaljer om de aktuelt synkroniserede feeds."</string>
+    <string name="permdesc_subscribedFeedsRead" msgid="3622200625634207660">"Tillader, at en applikation får detaljer om de aktuelt synkroniserede feeds."</string>
     <string name="permlab_subscribedFeedsWrite" msgid="9015246325408209296">"skriv abonnerede feeds"</string>
-    <string name="permdesc_subscribedFeedsWrite" msgid="8121607099326533878">"Tillader, at et program ændrer dine aktuelle synkroniserede feeds. Dette kan muligvis lade et ondsindet program ændre dine synkroniserede feeds."</string>
+    <string name="permdesc_subscribedFeedsWrite" msgid="8121607099326533878">"Tillader, at en applikation ændrer dine aktuelle synkroniserede feeds. Dette kan muligvis lade et ondsinden applikation ændre dine synkroniserede feeds."</string>
     <string name="permlab_readDictionary" msgid="432535716804748781">"læs brugerdefineret ordbog"</string>
-    <string name="permdesc_readDictionary" msgid="1082972603576360690">"Tillader, at et program læser alle private ord, navne og sætninger, som brugeren eventuelt har gemt i brugerordbogen."</string>
+    <string name="permdesc_readDictionary" msgid="1082972603576360690">"Tillader, at en applikation læser alle private ord, navne og sætninger, som brugeren eventuelt har gemt i brugerordbogen."</string>
     <string name="permlab_writeDictionary" msgid="6703109511836343341">"skriv til den brugerdefinerede ordbog"</string>
-    <string name="permdesc_writeDictionary" msgid="2241256206524082880">"Tillader, at et program skriver nye ord i brugerordbogen."</string>
+    <string name="permdesc_writeDictionary" msgid="2241256206524082880">"Tillader, at en applikation skriver nye ord i brugerordbogen."</string>
     <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"rette/slette i USB-lager"</string>
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"ret/slet indholdet på SD-kortet"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Tillad skriv til USB-lager."</string>
-    <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Tillader, at et program skriver til SD-kortet."</string>
+    <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Tillader, at en applikation skriver til SD-kortet."</string>
     <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"Rediger/slet internt medielagringsindhold"</string>
     <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Tillader, at applikationen ændrer indholdet af det interne medielagringsindhold."</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"få adgang til cache-filsystemet"</string>
-    <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Tillader, at et program læser og skriver til cache-filsystemet."</string>
+    <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Tillader, at en applikation læser og skriver til cache-filsystemet."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"foretage/modtage internetopkald"</string>
-    <string name="permdesc_use_sip" msgid="6320376185606661843">"Tillader, at et program anvender SIP-tjenesten til at foretage/modtage internetopkald."</string>
+    <string name="permdesc_use_sip" msgid="6320376185606661843">"Tillader, at en applikation anvender SIP-tjenesten til at foretage/modtage internetopkald."</string>
     <string name="policylab_limitPassword" msgid="4497420728857585791">"Indstil regler for adgangskode"</string>
     <string name="policydesc_limitPassword" msgid="9083400080861728056">"Kontroller længden samt tilladte tegn i adgangskoder til oplåsning af skærm"</string>
     <string name="policylab_watchLogin" msgid="914130646942199503">"Overvåg forsøg på oplåsning af skærm"</string>
@@ -672,14 +674,14 @@
     <string name="autofill_address_summary_separator" msgid="7483307893170324129">", "</string>
     <string name="autofill_address_summary_format" msgid="4874459455786827344">"$1$2$3"</string>
     <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"læs browserens oversigt og bogmærker"</string>
-    <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Tillader, at programmet læser alle de webadresser, browseren har besøgt, og alle browserens bogmærker."</string>
+    <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Tillader, at applikationen læser alle de webadresser, browseren har besøgt, og alle browserens bogmærker."</string>
     <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"skriv browserens oversigt og bogmærker"</string>
-    <string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="7193514090469945307">"Tillader, at et program ændrer browseroversigten eller bogmærker, der er gemt på din tabletcomputer. Ondsindede programmer kan bruge dette til at slette eller ændre din browsers data."</string>
-    <string name="permdesc_writeHistoryBookmarks" product="default" msgid="945571990357114950">"Tillader, at et program ændrer browseroversigten eller bogmærker, der er gemt på din telefon. Ondsindede programmer kan bruge dette til at slette eller ændre din browsers data."</string>
+    <string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="7193514090469945307">"Tillader, at en applikation ændrer browseroversigten eller bogmærker, der er gemt på din tabletcomputer. Ondsindede applikationer kan bruge dette til at slette eller ændre din browsers data."</string>
+    <string name="permdesc_writeHistoryBookmarks" product="default" msgid="945571990357114950">"Tillader, at en applikation ændrer browseroversigten eller bogmærker, der er gemt på din telefon. Ondsindede applikationer kan bruge dette til at slette eller ændre din browsers data."</string>
     <string name="permlab_setAlarm" msgid="5924401328803615165">"angiv alarm i alarmprogram"</string>
-    <string name="permdesc_setAlarm" msgid="5966966598149875082">"Tillader, at programmet angiver en alarm i et installeret alarmprogram. Nogle alarmprogrammer kan ikke implementere denne funktion."</string>
+    <string name="permdesc_setAlarm" msgid="5966966598149875082">"Tillader, at applikationen angiver en alarm i et installeret alarmprogram. Nogle alarmprogrammer kan ikke implementere denne funktion."</string>
     <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Skift browsertilladelser for geografisk placering"</string>
-    <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Giver et program tilladelse til at ændre browserens tilladelser for geografisk placering. Skadelige programmer kan bruge dette til at tillade, at placeringsoplysninger sendes til vilkårlige websteder."</string>
+    <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Giver en applikation tilladelse til at ændre browserens tilladelser for geografisk placering. Skadelige applikationer kan bruge dette til at tillade, at placeringsoplysninger sendes til vilkårlige websteder."</string>
     <string name="save_password_message" msgid="767344687139195790">"Ønsker du, at browseren skal huske denne adgangskode?"</string>
     <string name="save_password_notnow" msgid="6389675316706699758">"Ikke nu"</string>
     <string name="save_password_remember" msgid="6491879678996749466">"Husk"</string>
@@ -812,15 +814,15 @@
     <string name="capital_off" msgid="6815870386972805832">"FRA"</string>
     <string name="whichApplication" msgid="4533185947064773386">"Fuldfør handling ved hjælp af"</string>
     <string name="alwaysUse" msgid="4583018368000610438">"Brug som standard til denne handling."</string>
-    <string name="clearDefaultHintMsg" msgid="4815455344600932173">"Ryd standard i Startindstillinger &gt; Programmer &gt; Administrer programmer."</string>
+    <string name="clearDefaultHintMsg" msgid="4815455344600932173">"Ryd standard i Startindstillinger &gt; Applikationer &gt; Administrer applikationer."</string>
     <string name="chooseActivity" msgid="1009246475582238425">"Vælg en handling"</string>
-    <string name="chooseUsbActivity" msgid="7892597146032121735">"Vælg et program for USB-enheden"</string>
-    <string name="noApplications" msgid="1691104391758345586">"Der er ingen programmer, der kan foretage denne handling."</string>
+    <string name="chooseUsbActivity" msgid="7892597146032121735">"Vælg en applikation for USB-enheden"</string>
+    <string name="noApplications" msgid="1691104391758345586">"Der er ingen applikationer, der kan foretage denne handling."</string>
     <string name="aerr_title" msgid="653922989522758100">"Beklager!"</string>
     <string name="aerr_application" msgid="4683614104336409186">"Programmet <xliff:g id="APPLICATION">%1$s</xliff:g> (proces <xliff:g id="PROCESS">%2$s</xliff:g>) er standset uventet. Prøv igen."</string>
     <string name="aerr_process" msgid="1551785535966089511">"Processen <xliff:g id="PROCESS">%1$s</xliff:g> er standset uventet. Prøv igen."</string>
     <string name="anr_title" msgid="3100070910664756057">"Beklager!"</string>
-    <string name="anr_activity_application" msgid="3538242413112507636">"Aktivitet <xliff:g id="ACTIVITY">%1$s</xliff:g> (i programmet <xliff:g id="APPLICATION">%2$s</xliff:g>) svarer ikke."</string>
+    <string name="anr_activity_application" msgid="3538242413112507636">"Aktivitet <xliff:g id="ACTIVITY">%1$s</xliff:g> (i applikationen <xliff:g id="APPLICATION">%2$s</xliff:g>) svarer ikke."</string>
     <string name="anr_activity_process" msgid="5420826626009561014">"Aktivitet <xliff:g id="ACTIVITY">%1$s</xliff:g> (igangværende <xliff:g id="PROCESS">%2$s</xliff:g>) svarer ikke."</string>
     <string name="anr_application_process" msgid="4185842666452210193">"Programmet <xliff:g id="APPLICATION">%1$s</xliff:g> (igangværende <xliff:g id="PROCESS">%2$s</xliff:g>) svarer ikke."</string>
     <string name="anr_process" msgid="1246866008169975783">"Processen <xliff:g id="PROCESS">%1$s</xliff:g> svarer ikke."</string>
@@ -830,16 +832,22 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Programmet er omdirigeret"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> kører nu."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> blev oprindeligt åbnet."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Programmet <xliff:g id="APPLICATION">%1$s</xliff:g> (proces <xliff:g id="PROCESS">%2$s</xliff:g>) har overtrådt sin egen StrictMode-politik."</string>
     <string name="smv_process" msgid="5120397012047462446">"Processen <xliff:g id="PROCESS">%1$s</xliff:g> har overtrådt sin egen StrictMode-politik."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> er i gang"</string>
-    <string name="heavy_weight_notification_detail" msgid="2423977499339403402">"Vælg for at skifte program"</string>
-    <string name="heavy_weight_switcher_title" msgid="1135403633766694316">"Skift program?"</string>
-    <string name="heavy_weight_switcher_text" msgid="4592075610079319667">"Der kører et andet program, der skal stoppes, før du kan starte et nyt."</string>
+    <string name="heavy_weight_notification_detail" msgid="2423977499339403402">"Vælg for at skifte applikation"</string>
+    <string name="heavy_weight_switcher_title" msgid="1135403633766694316">"Skift applikation?"</string>
+    <string name="heavy_weight_switcher_text" msgid="4592075610079319667">"Der kører en anden applikation, der skal stoppes, før du kan starte et nyt."</string>
     <string name="old_app_action" msgid="493129172238566282">"Tilbage til <xliff:g id="OLD_APP">%1$s</xliff:g>"</string>
-    <string name="old_app_description" msgid="942967900237208466">"Start ikke det nye program."</string>
+    <string name="old_app_description" msgid="942967900237208466">"Start ikke den nye applikation."</string>
     <string name="new_app_action" msgid="5472756926945440706">"Start <xliff:g id="OLD_APP">%1$s</xliff:g>"</string>
-    <string name="new_app_description" msgid="6830398339826789493">"Stop det gamle program uden at gemme."</string>
+    <string name="new_app_description" msgid="6830398339826789493">"Stop den gamle applikation uden at gemme."</string>
     <string name="sendText" msgid="5132506121645618310">"Vælg en handling for teksten"</string>
     <string name="volume_ringtone" msgid="6885421406845734650">"Lydstyrke for opkald"</string>
     <string name="volume_music" msgid="5421651157138628171">"Lydstyrke for medier"</string>
@@ -864,7 +872,7 @@
     <item quantity="other" msgid="7915895323644292768">"Der er åbne Wi-Fi-netværk tilgængelige"</item>
   </plurals>
     <string name="select_character" msgid="3365550120617701745">"Indsæt tegn"</string>
-    <string name="sms_control_default_app_name" msgid="7630529934366549163">"Ukendt program"</string>
+    <string name="sms_control_default_app_name" msgid="7630529934366549163">"Ukendt applikation"</string>
     <string name="sms_control_title" msgid="7296612781128917719">"Sender sms-beskeder"</string>
     <string name="sms_control_message" msgid="1289331457999236205">"Der sendes et stort antal sms-beskeder. Vælg \"OK\" for at fortsætte eller \"Annuller\" for at stoppe afsendelsen."</string>
     <string name="sms_control_yes" msgid="2532062172402615953">"OK"</string>
@@ -893,7 +901,7 @@
     <string name="usb_storage_stop_button_mount" msgid="7060218034900696029">"Slå USB-lagring fra"</string>
     <string name="usb_storage_stop_error_message" msgid="143881914840412108">"Der opstod et problem med at slå USB-lagringen fra. Sørg for, at du har demonteret USB-værten, og prøv så igen."</string>
     <string name="dlg_confirm_kill_storage_users_title" msgid="963039033470478697">"Slå USB-lagring til"</string>
-    <string name="dlg_confirm_kill_storage_users_text" msgid="3202838234780505886">"Hvis du slår USB-lagring til, vil nogle af de programmer, som du bruger, stoppe, og de kan være utilgængelige, indtil du slår USB-lagring til igen."</string>
+    <string name="dlg_confirm_kill_storage_users_text" msgid="3202838234780505886">"Hvis du slår USB-lagring til, vil nogle af de applikationer, som du bruger, stoppe, og de kan være utilgængelige, indtil du slår USB-lagring til igen."</string>
     <string name="dlg_error_title" msgid="8048999973837339174">"USB-handlingen mislykkedes"</string>
     <string name="dlg_ok" msgid="7376953167039865701">"OK"</string>
     <string name="extmedia_format_title" product="nosdcard" msgid="7980995592595097841">"Formater USB-lager"</string>
@@ -933,9 +941,9 @@
     <string name="ext_media_nomedia_notification_message" product="default" msgid="3870120652983659641">"SD-kortet er fjernet. Indsæt et nyt."</string>
     <string name="activity_list_empty" msgid="4168820609403385789">"Der blev ikke fundet nogen matchende aktiviteter"</string>
     <string name="permlab_pkgUsageStats" msgid="8787352074326748892">"opdater brugerstatistikker for komponenter"</string>
-    <string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Tillader ændring af indsamlede brugerstatistikker for komponenter. Ikke til brug til normale programmer."</string>
-    <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Tillader kald af standardcontainertjeneste for at kopiere indhold. Ikke til brug for almindelige programmer."</string>
-    <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Tillader kald af standardcontainertjeneste for at kopiere indhold. Ikke til brug for almindelige programmer."</string>
+    <string name="permdesc_pkgUsageStats" msgid="891553695716752835">"Tillader ændring af indsamlede brugerstatistikker for komponenter. Ikke til brug til normale applikationer."</string>
+    <string name="permlab_copyProtectedData" msgid="1660908117394854464">"Tillader kald af standardcontainertjeneste for at kopiere indhold. Ikke til brug for almindelige applikationer."</string>
+    <string name="permdesc_copyProtectedData" msgid="537780957633976401">"Tillader kald af standardcontainertjeneste for at kopiere indhold. Ikke til brug for almindelige applikationer."</string>
     <string name="tutorial_double_tap_to_zoom_message_short" msgid="1311810005957319690">"Tryk to gange for zoomkontrol"</string>
     <string name="gadget_host_error_inflating" msgid="2613287218853846830">"Der opstod en fejl under forøgelsen af widgetten"</string>
     <string name="ime_action_go" msgid="8320845651737369027">"Gå"</string>
@@ -949,7 +957,7 @@
     <string name="create_contact_using" msgid="4947405226788104538">"Opret kontakt"\n"ved hjælp af <xliff:g id="NUMBER">%s</xliff:g>"</string>
     <string name="accessibility_compound_button_selected" msgid="5612776946036285686">"kontrolleret"</string>
     <string name="accessibility_compound_button_unselected" msgid="8864512895673924091">"ikke kontrolleret"</string>
-    <string name="grant_credentials_permission_message_header" msgid="6824538733852821001">"Følgende programmer anmoder om tilladelse til at få adgang til din konto nu og i fremtiden."</string>
+    <string name="grant_credentials_permission_message_header" msgid="6824538733852821001">"Følgende applikationer anmoder om tilladelse til at få adgang til din konto nu og i fremtiden."</string>
     <string name="grant_credentials_permission_message_footer" msgid="3125211343379376561">"Vil du tillade denne anmodning?"</string>
     <string name="grant_permissions_header_text" msgid="2722567482180797717">"Adgangsanmodning"</string>
     <string name="allow" msgid="7225948811296386551">"Tillad"</string>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index 2cebada..2438a94 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -185,7 +185,7 @@
     <string name="permlab_expandStatusBar" msgid="1148198785937489264">"Statusleiste ein-/ausblenden"</string>
     <string name="permdesc_expandStatusBar" msgid="7088604400110768665">"Ermöglicht der Anwendung, die Statusleiste ein- oder auszublenden"</string>
     <string name="permlab_processOutgoingCalls" msgid="1136262550878335980">"Ausgehende Anrufe abfangen"</string>
-    <string name="permdesc_processOutgoingCalls" msgid="2228988201852654461">"Ermöglicht einer Anwendung, abgehende Anrufe zu verarbeiten und die zu wählende Nummer zu ändern. Schädliche Anwendungen können so abgehende Anrufe eventuell überwachen, umleiten oder verhindern."</string>
+    <string name="permdesc_processOutgoingCalls" msgid="2228988201852654461">"Ermöglicht einer App, abgehende Anrufe zu verarbeiten und die zu wählende Nummer zu ändern. Schädliche Anwendungen können so abgehende Anrufe eventuell überwachen, umleiten oder verhindern."</string>
     <string name="permlab_receiveSms" msgid="2697628268086208535">"SMS empfangen"</string>
     <string name="permdesc_receiveSms" msgid="6298292335965966117">"Ermöglicht der Anwendung, Kurzmitteilungen zu empfangen und zu verarbeiten. Schädliche Anwendungen können Ihre Nachrichten möglicherweise überwachen oder löschen, bevor sie angezeigt werden."</string>
     <string name="permlab_receiveMms" msgid="8894700916188083287">"MMS empfangen"</string>
@@ -193,31 +193,31 @@
     <string name="permlab_sendSms" msgid="5600830612147671529">"Kurznachrichten senden"</string>
     <string name="permdesc_sendSms" msgid="1946540351763502120">"Ermöglicht der Anwendung das Senden von SMS. Bei schädlichen Anwendungen können Kosten entstehen, wenn diese Nachrichten ohne Ihre Zustimmung versenden."</string>
     <string name="permlab_readSms" msgid="4085333708122372256">"SMS oder MMS lesen"</string>
-    <string name="permdesc_readSms" product="tablet" msgid="5836710350295631545">"Ermöglicht einer Anwendung, auf Ihrem Tablet oder Ihrer SIM-Karte gespeicherte SMS zu lesen. Schädliche Anwendungen lesen so möglicherweise Ihre vertraulichen Nachrichten."</string>
-    <string name="permdesc_readSms" product="default" msgid="3002170087197294591">"Ermöglicht einer Anwendung, auf Ihrem Telefon oder Ihrer SIM-Karte gespeicherte Kurznachrichten zu lesen. Schädliche Anwendungen lesen so möglicherweise Ihre  vertraulichen Nachrichten."</string>
+    <string name="permdesc_readSms" product="tablet" msgid="5836710350295631545">"Ermöglicht einer App, auf Ihrem Tablet oder Ihrer SIM-Karte gespeicherte SMS zu lesen. Schädliche Anwendungen lesen so möglicherweise Ihre vertraulichen Nachrichten."</string>
+    <string name="permdesc_readSms" product="default" msgid="3002170087197294591">"Ermöglicht einer App, auf Ihrem Telefon oder Ihrer SIM-Karte gespeicherte Kurznachrichten zu lesen. Schädliche Anwendungen lesen so möglicherweise Ihre  vertraulichen Nachrichten."</string>
     <string name="permlab_writeSms" msgid="6881122575154940744">"SMS oder MMS bearbeiten"</string>
-    <string name="permdesc_writeSms" product="tablet" msgid="5332124772918835437">"Ermöglicht einer Anwendung, auf Ihrem Tablet oder Ihrer SIM-Karte gespeicherte SMS zu bearbeiten. Schädliche Anwendungen löschen möglicherweise Ihre Nachrichten."</string>
-    <string name="permdesc_writeSms" product="default" msgid="6299398896177548095">"Ermöglicht einer Anwendung, auf Ihrem Telefon oder Ihrer SIM-Karte gespeicherte Kurznachrichten zu bearbeiten. Schädliche Anwendungen löschen möglicherweise Ihre Nachrichten."</string>
+    <string name="permdesc_writeSms" product="tablet" msgid="5332124772918835437">"Ermöglicht einer App, auf Ihrem Tablet oder Ihrer SIM-Karte gespeicherte SMS zu bearbeiten. Schädliche Anwendungen löschen möglicherweise Ihre Nachrichten."</string>
+    <string name="permdesc_writeSms" product="default" msgid="6299398896177548095">"Ermöglicht einer App, auf Ihrem Telefon oder Ihrer SIM-Karte gespeicherte Kurznachrichten zu bearbeiten. Schädliche Anwendungen löschen möglicherweise Ihre Nachrichten."</string>
     <string name="permlab_receiveWapPush" msgid="8258226427716551388">"WAP-Nachrichten empfangen"</string>
     <string name="permdesc_receiveWapPush" msgid="5979623826128082171">"Ermöglicht der Anwendung, WAP-Mitteilungen zu empfangen und zu verarbeiten. Schädliche Anwendungen können Ihre Nachrichten möglicherweise überwachen oder löschen, bevor sie angezeigt werden."</string>
     <string name="permlab_getTasks" msgid="5005277531132573353">"laufende Anwendungen abrufen"</string>
     <string name="permdesc_getTasks" msgid="7048711358713443341">"Ermöglicht der Anwendung, Informationen zu aktuellen und kürzlich ausführten Aufgaben abzurufen. Schädliche Anwendungen können so eventuell geheime Informationen zu anderen Anwendungen entdecken."</string>
     <string name="permlab_reorderTasks" msgid="5669588525059921549">"Laufende Anwendungen neu ordnen"</string>
-    <string name="permdesc_reorderTasks" msgid="126252774270522835">"Ermöglicht einer Anwendung, Aufgaben in den Vorder- und Hintergrund zu verschieben. Schädliche Anwendungen können so ohne Ihr Zutun eine Anzeige im Vordergrund erzwingen."</string>
+    <string name="permdesc_reorderTasks" msgid="126252774270522835">"Ermöglicht einer App, Aufgaben in den Vorder- und Hintergrund zu verschieben. Schädliche Anwendungen können so ohne Ihr Zutun eine Anzeige im Vordergrund erzwingen."</string>
     <string name="permlab_setDebugApp" msgid="4339730312925176742">"Fehlerbeseitigung für Anwendung aktivieren"</string>
-    <string name="permdesc_setDebugApp" msgid="5584310661711990702">"Ermöglicht einer Anwendung, die Fehlerbeseitigung für eine andere Anwendung zu aktivieren. Schädliche Anwendungen können so andere Anwendungen löschen."</string>
+    <string name="permdesc_setDebugApp" msgid="5584310661711990702">"Ermöglicht einer App, die Fehlerbeseitigung für eine andere Anwendung zu aktivieren. Schädliche Anwendungen können so andere Anwendungen löschen."</string>
     <string name="permlab_changeConfiguration" msgid="8214475779521218295">"UI-Einstellungen ändern"</string>
-    <string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Ermöglicht einer Anwendung, die aktuelle Konfiguration zu ändern, etwa das Gebietsschema oder die Schriftgröße"</string>
+    <string name="permdesc_changeConfiguration" msgid="3465121501528064399">"Ermöglicht einer App, die aktuelle Konfiguration zu ändern, etwa das Gebietsschema oder die Schriftgröße"</string>
     <string name="permlab_enableCarMode" msgid="5684504058192921098">"Automodus aktivieren"</string>
-    <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Ermöglicht einer Anwendung, den Automodus zu aktivieren"</string>
+    <string name="permdesc_enableCarMode" msgid="5673461159384850628">"Ermöglicht einer App, den Automodus zu aktivieren"</string>
     <string name="permlab_killBackgroundProcesses" msgid="8373714752793061963">"Hintergrundprozesse beenden"</string>
-    <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Ermöglicht einer Anwendung, Hintergrundprozesse anderer Anwendungen auch bei ausreichendem Speicher zu beenden."</string>
+    <string name="permdesc_killBackgroundProcesses" msgid="2908829602869383753">"Ermöglicht einer App, Hintergrundprozesse anderer Anwendungen auch bei ausreichendem Speicher zu beenden."</string>
     <string name="permlab_forceStopPackages" msgid="1447830113260156236">"Beenden anderer Anwendungen erzwingen"</string>
-    <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Ermöglicht einer Anwendung, das Beenden anderer Anwendungen zu erzwingen"</string>
+    <string name="permdesc_forceStopPackages" msgid="7263036616161367402">"Ermöglicht einer App, das Beenden anderer Anwendungen zu erzwingen"</string>
     <string name="permlab_forceBack" msgid="1804196839880393631">"Schließen von Anwendung erzwingen"</string>
-    <string name="permdesc_forceBack" msgid="6534109744159919013">"Ermöglicht einer Anwendung, alle Aktivitäten, die im Vordergrund ablaufen, zu beenden und in den Hintergrund zu schieben. Sollte nicht für normale Anwendungen benötigt werden."</string>
+    <string name="permdesc_forceBack" msgid="6534109744159919013">"Ermöglicht einer App, alle Aktivitäten, die im Vordergrund ablaufen, zu beenden und in den Hintergrund zu schieben. Sollte nicht für normale Anwendungen benötigt werden."</string>
     <string name="permlab_dump" msgid="1681799862438954752">"Systeminternen Status abrufen"</string>
-    <string name="permdesc_dump" msgid="2198776174276275220">"Ermöglicht einer Anwendung, den internen Status des Systems abzurufen. Schädliche Anwendungen rufen hierbei möglicherweise eine Vielzahl an privaten und geschützten Daten ab, die Sie in der Regel nicht benötigen würden."</string>
+    <string name="permdesc_dump" msgid="2198776174276275220">"Ermöglicht einer App, den internen Status des Systems abzurufen. Schädliche Anwendungen rufen hierbei möglicherweise eine Vielzahl an privaten und geschützten Daten ab, die Sie in der Regel nicht benötigen würden."</string>
     <string name="permlab_shutdown" msgid="7185747824038909016">"partielles Herunterfahren"</string>
     <string name="permdesc_shutdown" msgid="7046500838746291775">"Versetzt den Aktivitätsmanager in einen heruntergefahrenen Zustand. Führt kein vollständiges Herunterfahren aus."</string>
     <string name="permlab_stopAppSwitches" msgid="4138608610717425573">"Anwendungswechsel verhindern"</string>
@@ -225,13 +225,13 @@
     <string name="permlab_runSetActivityWatcher" msgid="7811586187574696296">"Start von Anwendungen überwachen und steuern"</string>
     <string name="permdesc_runSetActivityWatcher" msgid="2149363027173451218">"Ermöglicht der Anwendung, den Start von Systemaktivitäten zu überwachen und zu steuern. Schädliche Anwendungen können so das gesamte System beeinträchtigen. Diese Berechtigung wird nur zu Entwicklungszwecken und nie für die normale Nutzung benötigt."</string>
     <string name="permlab_broadcastPackageRemoved" msgid="2576333434893532475">"Broadcast ohne Paket senden"</string>
-    <string name="permdesc_broadcastPackageRemoved" msgid="3453286591439891260">"Ermöglicht einer Anwendung, eine Benachrichtigung zur Entfernung eines Anwendungspakets zu senden. Schädliche Anwendungen können so laufende Anwendungen beenden."</string>
+    <string name="permdesc_broadcastPackageRemoved" msgid="3453286591439891260">"Ermöglicht einer App, eine Benachrichtigung zur Entfernung eines Anwendungspakets zu senden. Schädliche Anwendungen können so laufende Anwendungen beenden."</string>
     <string name="permlab_broadcastSmsReceived" msgid="5689095009030336593">"per SMS empfangenen Broadcast senden"</string>
-    <string name="permdesc_broadcastSmsReceived" msgid="9122419277306740155">"Ermöglicht einer Anwendung, eine Benachrichtigung zu senden, dass eine Kurzmitteilung empfangen wurde. Schädliche Anwendungen könnten diese Option verwenden, um den Eingang von Kurzmitteilungen zu erzwingen."</string>
+    <string name="permdesc_broadcastSmsReceived" msgid="9122419277306740155">"Ermöglicht einer App, eine Benachrichtigung zu senden, dass eine Kurzmitteilung empfangen wurde. Schädliche Anwendungen könnten diese Option verwenden, um den Eingang von Kurzmitteilungen zu erzwingen."</string>
     <string name="permlab_broadcastWapPush" msgid="3145347413028582371">"von WAP-PUSH empfangenen Broadcast senden"</string>
-    <string name="permdesc_broadcastWapPush" msgid="3955303669461378091">"Ermöglicht einer Anwendung, eine Benachrichtigung zu senden, dass eine WAP PUSH-Nachricht empfangen wurde. Schädliche Anwendungen könnten diese Option verwenden, um den Erhalt von MMS-Mitteilungen zu erzwingen, oder um unbemerkt den Inhalt einer beliebigen Webseite durch schädliche Inhalte zu ersetzen."</string>
+    <string name="permdesc_broadcastWapPush" msgid="3955303669461378091">"Ermöglicht einer App, eine Benachrichtigung zu senden, dass eine WAP PUSH-Nachricht empfangen wurde. Schädliche Anwendungen könnten diese Option verwenden, um den Erhalt von MMS-Mitteilungen zu erzwingen, oder um unbemerkt den Inhalt einer beliebigen Webseite durch schädliche Inhalte zu ersetzen."</string>
     <string name="permlab_setProcessLimit" msgid="2451873664363662666">"Anzahl der laufenden Prozesse beschränken"</string>
-    <string name="permdesc_setProcessLimit" msgid="7824786028557379539">"Ermöglicht einer Anwendung, die maximale Anzahl an laufenden Prozessen zu steuern. Wird nicht für normale Anwendungen benötigt."</string>
+    <string name="permdesc_setProcessLimit" msgid="7824786028557379539">"Ermöglicht einer App, die maximale Anzahl an laufenden Prozessen zu steuern. Wird nicht für normale Anwendungen benötigt."</string>
     <string name="permlab_setAlwaysFinish" msgid="5342837862439543783">"alle Anwendungen im Hintergrund schließen"</string>
     <string name="permdesc_setAlwaysFinish" msgid="8773936403987091620">"Überlässt einer Anwendung die Entscheidung, ob Aktivitäten beendet werden, sobald Sie in den Hintergrund rücken. Wird nicht für normale Anwendungen benötigt."</string>
     <string name="permlab_batteryStats" msgid="7863923071360031652">"Akku-Daten ändern"</string>
@@ -241,14 +241,14 @@
     <string name="permlab_internalSystemWindow" msgid="2148563628140193231">"nicht autorisierte Fenster anzeigen"</string>
     <string name="permdesc_internalSystemWindow" msgid="5895082268284998469">"Ermöglicht die Erstellung von Fenstern, die von der Benutzeroberfläche des internen Systems verwendet werden. Nicht für normale Anwendungen geeignet."</string>
     <string name="permlab_systemAlertWindow" msgid="3372321942941168324">"Warnungen auf Systemebene anzeigen"</string>
-    <string name="permdesc_systemAlertWindow" msgid="2884149573672821318">"Ermöglicht einer Anwendung, Fenster mit Systemwarnungen anzuzeigen. Schädliche Anwendungen können so die Kontrolle über das gesamte Display übernehmen."</string>
+    <string name="permdesc_systemAlertWindow" msgid="2884149573672821318">"Ermöglicht einer App, Fenster mit Systemwarnungen anzuzeigen. Schädliche Anwendungen können so die Kontrolle über das gesamte Display übernehmen."</string>
     <string name="permlab_setAnimationScale" msgid="2805103241153907174">"Allgemeine Animationsgeschwindigkeit einstellen"</string>
-    <string name="permdesc_setAnimationScale" msgid="7181522138912391988">"Ermöglicht einer Anwendung, die allgemeine Animationsgeschwindigkeit (schnellere oder langsamere Animationen) jederzeit anzupassen"</string>
+    <string name="permdesc_setAnimationScale" msgid="7181522138912391988">"Ermöglicht einer App, die allgemeine Animationsgeschwindigkeit (schnellere oder langsamere Animationen) jederzeit anzupassen"</string>
     <string name="permlab_manageAppTokens" msgid="17124341698093865">"Anwendungs-Tokens verwalten"</string>
     <string name="permdesc_manageAppTokens" msgid="977127907524195988">"Ermöglicht Anwendungen, Ihre eigenen Tokens zu erstellen und zu verwalten. Hierbei wird die normale Z-Reihenfolge umgangen. Dies sollte nicht für normale Anwendungen benötigt werden."</string>
     <string name="permlab_injectEvents" msgid="1378746584023586600">"Tasten und Steuerungstasten drücken"</string>
-    <string name="permdesc_injectEvents" product="tablet" msgid="7200014808195664505">"Ermöglicht einer Anwendung, ihre eigenen Eingabeaktionen (Drücken von Tasten usw.) an andere Anwendungen zu liefern. Schädliche Anwendungen können so die Kontrolle über Ihr Tablet übernehmen."</string>
-    <string name="permdesc_injectEvents" product="default" msgid="3946098050410874715">"Ermöglicht einer Anwendung, ihre eigenen Eingabeaktionen (Drücken von Tasten etc.) an andere Anwendungen zu liefern.  Schädliche Anwendungen können so die Kontrolle über Ihr Telefon übernehmen."</string>
+    <string name="permdesc_injectEvents" product="tablet" msgid="7200014808195664505">"Ermöglicht einer App, ihre eigenen Eingabeaktionen (Drücken von Tasten usw.) an andere Anwendungen zu liefern. Schädliche Anwendungen können so die Kontrolle über Ihr Tablet übernehmen."</string>
+    <string name="permdesc_injectEvents" product="default" msgid="3946098050410874715">"Ermöglicht einer App, ihre eigenen Eingabeaktionen (Drücken von Tasten etc.) an andere Anwendungen zu liefern.  Schädliche Anwendungen können so die Kontrolle über Ihr Telefon übernehmen."</string>
     <string name="permlab_readInputState" msgid="469428900041249234">"Tastatureingaben und Aktionen aufzeichnen"</string>
     <string name="permdesc_readInputState" msgid="5132879321450325445">"Ermöglicht Anwendungen, die von Ihnen gedrückten Tasten zu überwachen (etwa die Eingabe eines Passworts). Dies gilt auch für die Interaktion mit anderen Anwendungen. Sollte für normale Anwendungen nicht benötigt werden."</string>
     <string name="permlab_bindInputMethod" msgid="3360064620230515776">"An eine Eingabemethode binden"</string>
@@ -261,58 +261,60 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Ermöglicht dem Halter, Intents an einen Geräteadministrator zu senden. Sollte nie für normale Anwendungen benötigt werden."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"Bildschirmausrichtung ändern"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Ermöglicht der Anwendung, die Bildschirmdrehung jederzeit zu ändern. Sollte nicht für normale Anwendungen benötigt werden."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"Zeigergeschwindigkeit ändern"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Ermöglicht einer App, jederzeit die Geschwindigkeit des Maus- bzw. Touchpad-Zeigers zu ändern. Sollte für normale Apps nicht benötigt werden."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"Linux-Signale an Anwendungen senden"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Ermöglicht der Anwendung, das Senden des gelieferten Signals an alle anhaltenden Prozesse zu fordern"</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"Anwendungen permanent ausführen"</string>
-    <string name="permdesc_persistentActivity" msgid="5037199778265006008">"Ermöglicht einer Anwendung, eigene Komponenten persistent zu machen, damit das System diese nicht für andere Anwendungen nutzen kann"</string>
+    <string name="permdesc_persistentActivity" msgid="5037199778265006008">"Ermöglicht einer App, eigene Komponenten persistent zu machen, damit das System diese nicht für andere Anwendungen nutzen kann"</string>
     <string name="permlab_deletePackages" msgid="3343439331576348805">"Anwendungen löschen"</string>
-    <string name="permdesc_deletePackages" msgid="3634943677518723314">"Ermöglicht einer Anwendung, Android-Pakete zu löschen. Schädliche Anwendungen können so wichtige Anwendungen löschen."</string>
+    <string name="permdesc_deletePackages" msgid="3634943677518723314">"Ermöglicht einer App, Android-Pakete zu löschen. Schädliche Anwendungen können so wichtige Anwendungen löschen."</string>
     <string name="permlab_clearAppUserData" msgid="2192134353540277878">"Daten anderer Anwendungen löschen"</string>
-    <string name="permdesc_clearAppUserData" msgid="7546345080434325456">"Ermöglicht einer Anwendung das Löschen von Nutzerdaten"</string>
+    <string name="permdesc_clearAppUserData" msgid="7546345080434325456">"Ermöglicht einer App das Löschen von Nutzerdaten"</string>
     <string name="permlab_deleteCacheFiles" msgid="1518556602634276725">"Caches anderer Anwendungen löschen"</string>
-    <string name="permdesc_deleteCacheFiles" msgid="2283074077168165971">"Ermöglicht einer Anwendung, Cache-Dateien zu löschen"</string>
+    <string name="permdesc_deleteCacheFiles" msgid="2283074077168165971">"Ermöglicht einer App, Cache-Dateien zu löschen"</string>
     <string name="permlab_getPackageSize" msgid="4799785352306641460">"Speicherplatz der Anwendung abrufen"</string>
-    <string name="permdesc_getPackageSize" msgid="5557253039670753437">"Ermöglicht einer Anwendung, ihre Code-, Daten- und Cache-Größe abzurufen"</string>
+    <string name="permdesc_getPackageSize" msgid="5557253039670753437">"Ermöglicht einer App, ihre Code-, Daten- und Cache-Größe abzurufen"</string>
     <string name="permlab_installPackages" msgid="335800214119051089">"Anwendungen direkt installieren"</string>
-    <string name="permdesc_installPackages" msgid="526669220850066132">"Ermöglicht einer Anwendung, neue oder aktualisierte Android-Pakete zu installieren. Schädliche Anwendungen können so neue Anwendungen mit beliebig umfangreichen Berechtigungen hinzufügen."</string>
+    <string name="permdesc_installPackages" msgid="526669220850066132">"Ermöglicht einer App, neue oder aktualisierte Android-Pakete zu installieren. Schädliche Anwendungen können so neue Anwendungen mit beliebig umfangreichen Berechtigungen hinzufügen."</string>
     <string name="permlab_clearAppCache" msgid="4747698311163766540">"Alle Cache-Daten der Anwendung löschen"</string>
-    <string name="permdesc_clearAppCache" product="tablet" msgid="3097119797652477973">"Ermöglicht einer Anwendung, Tablet-Speicher durch das Löschen von Dateien im Cache-Verzeichnis der Anwendung freizugeben. Der Zugriff beschränkt sich in der Regel auf Systemprozesse."</string>
-    <string name="permdesc_clearAppCache" product="default" msgid="7740465694193671402">"Ermöglicht einer Anwendung, Telefonspeicher durch das Löschen von Dateien im Cache-Verzeichnis der Anwendung freizugeben. Der Zugriff beschränkt sich in der Regel auf Systemprozesse."</string>
+    <string name="permdesc_clearAppCache" product="tablet" msgid="3097119797652477973">"Ermöglicht einer App, Tablet-Speicher durch das Löschen von Dateien im Cache-Verzeichnis der Anwendung freizugeben. Der Zugriff beschränkt sich in der Regel auf Systemprozesse."</string>
+    <string name="permdesc_clearAppCache" product="default" msgid="7740465694193671402">"Ermöglicht einer App, Telefonspeicher durch das Löschen von Dateien im Cache-Verzeichnis der Anwendung freizugeben. Der Zugriff beschränkt sich in der Regel auf Systemprozesse."</string>
     <string name="permlab_movePackage" msgid="728454979946503926">"Anwendungsressourcen verschieben"</string>
-    <string name="permdesc_movePackage" msgid="6323049291923925277">"Ermöglicht einer Anwendung, Anwendungsressourcen von internen auf externe Medien zu verschieben und umgekehrt"</string>
+    <string name="permdesc_movePackage" msgid="6323049291923925277">"Ermöglicht einer App, Anwendungsressourcen von internen auf externe Medien zu verschieben und umgekehrt"</string>
     <string name="permlab_readLogs" msgid="6615778543198967614">"Lesen vertraulicher Protokolldaten"</string>
-    <string name="permdesc_readLogs" product="tablet" msgid="4077356893924755294">"Ermöglicht einer Anwendung, die verschiedenen Protokolldateien des Systems zu lesen. So können allgemeine Informationen zu den auf Ihrem Tablet durchgeführten Aktionen eingesehen werden. Diese können persönliche oder geheime Daten enthalten."</string>
-    <string name="permdesc_readLogs" product="default" msgid="8896449437464867766">"Ermöglicht einer Anwendung, die verschiedenen Protokolldateien des Systems zu lesen. So können allgemeine Informationen zu den auf Ihrem Telefon durchgeführten Aktionen eingesehen werden. Diese können persönliche oder geheime Daten enthalten."</string>
+    <string name="permdesc_readLogs" product="tablet" msgid="4077356893924755294">"Ermöglicht einer App, die verschiedenen Protokolldateien des Systems zu lesen. So können allgemeine Informationen zu den auf Ihrem Tablet durchgeführten Aktionen eingesehen werden. Diese können persönliche oder geheime Daten enthalten."</string>
+    <string name="permdesc_readLogs" product="default" msgid="8896449437464867766">"Ermöglicht einer App, die verschiedenen Protokolldateien des Systems zu lesen. So können allgemeine Informationen zu den auf Ihrem Telefon durchgeführten Aktionen eingesehen werden. Diese können persönliche oder geheime Daten enthalten."</string>
     <string name="permlab_diagnostic" msgid="8076743953908000342">"Lese-/Schreibberechtigung für zu Diagnosegruppe gehörige Elemente"</string>
-    <string name="permdesc_diagnostic" msgid="3121238373951637049">"Ermöglicht einer Anwendung, alle Elemente in der Diagnosegruppe zu lesen und zu bearbeiten, etwa Dateien in \"/dev\". Dies könnte eine potenzielle Gefährdung für die Stabilität und Sicherheit des Systems darstellen und sollte NUR für Hardware-spezifische Diagnosen des Herstellers oder Netzbetreibers verwendet werden."</string>
+    <string name="permdesc_diagnostic" msgid="3121238373951637049">"Ermöglicht einer App, alle Elemente in der Diagnosegruppe zu lesen und zu bearbeiten, etwa Dateien in \"/dev\". Dies könnte eine potenzielle Gefährdung für die Stabilität und Sicherheit des Systems darstellen und sollte NUR für Hardware-spezifische Diagnosen des Herstellers oder Netzbetreibers verwendet werden."</string>
     <string name="permlab_changeComponentState" msgid="79425198834329406">"Anwendungskomponenten aktivieren oder deaktivieren"</string>
-    <string name="permdesc_changeComponentState" product="tablet" msgid="4647419365510068321">"Ermöglicht einer Anwendung, die Komponente einer anderen Anwendung nach Belieben zu aktivieren oder zu deaktivieren. Schädliche Anwendungen können so wichtige Funktionen des Tablets deaktivieren. Bei der Erteilung dieser Berechtigung ist Vorsicht geboten, da die Anwendungskomponenten unbrauchbar, inkonsistent und instabil werden können."</string>
-    <string name="permdesc_changeComponentState" product="default" msgid="3443473726140080761">"Ermöglicht einer Anwendung, die Komponente einer anderen Anwendung nach Belieben zu aktivieren oder zu deaktivieren. Schädliche Anwendungen können so wichtige Funktionen des Telefons deaktivieren. Bei der Erteilung dieser Berechtigung ist Vorsicht geboten, da die Anwendungskomponenten unbrauchbar, inkonsistent oder instabil werden können."</string>
+    <string name="permdesc_changeComponentState" product="tablet" msgid="4647419365510068321">"Ermöglicht einer App, die Komponente einer anderen Anwendung nach Belieben zu aktivieren oder zu deaktivieren. Schädliche Anwendungen können so wichtige Funktionen des Tablets deaktivieren. Bei der Erteilung dieser Berechtigung ist Vorsicht geboten, da die Anwendungskomponenten unbrauchbar, inkonsistent und instabil werden können."</string>
+    <string name="permdesc_changeComponentState" product="default" msgid="3443473726140080761">"Ermöglicht einer App, die Komponente einer anderen Anwendung nach Belieben zu aktivieren oder zu deaktivieren. Schädliche Anwendungen können so wichtige Funktionen des Telefons deaktivieren. Bei der Erteilung dieser Berechtigung ist Vorsicht geboten, da die Anwendungskomponenten unbrauchbar, inkonsistent oder instabil werden können."</string>
     <string name="permlab_setPreferredApplications" msgid="3393305202145172005">"bevorzugte Einstellungen festlegen"</string>
-    <string name="permdesc_setPreferredApplications" msgid="760008293501937546">"Ermöglicht einer Anwendung, Ihre bevorzugten Einstellungen zu ändern. Schädliche Anwendungen können so laufende Anwendungen ohne Ihr Wissen ändern, damit die vorhandenen Anwendungen private Daten von Ihnen sammeln."</string>
+    <string name="permdesc_setPreferredApplications" msgid="760008293501937546">"Ermöglicht einer App, Ihre bevorzugten Einstellungen zu ändern. Schädliche Anwendungen können so laufende Anwendungen ohne Ihr Wissen ändern, damit die vorhandenen Anwendungen private Daten von Ihnen sammeln."</string>
     <string name="permlab_writeSettings" msgid="1365523497395143704">"allgemeine Systemeinstellungen ändern"</string>
-    <string name="permdesc_writeSettings" msgid="838789419871034696">"Ermöglicht einer Anwendung, die Einstellungsdaten des Systems zu ändern. Schädliche Anwendungen können so die Systemkonfiguration beschädigen."</string>
+    <string name="permdesc_writeSettings" msgid="838789419871034696">"Ermöglicht einer App, die Einstellungsdaten des Systems zu ändern. Schädliche Anwendungen können so die Systemkonfiguration beschädigen."</string>
     <string name="permlab_writeSecureSettings" msgid="204676251876718288">"Sicherheitseinstellungen für das System ändern"</string>
     <string name="permdesc_writeSecureSettings" msgid="5497873143539034724">"Der Anwendung wird das Ändern der Sicherheitseinstellungsdaten des Systems ermöglicht. Nicht für normale Anwendungen vorgesehen."</string>
     <string name="permlab_writeGservices" msgid="2149426664226152185">"Google Services Map ändern"</string>
-    <string name="permdesc_writeGservices" msgid="6602362746516676175">"Ermöglicht einer Anwendung, Änderungen an der Google Services Map vorzunehmen. Nicht für normale Anwendungen vorgesehen."</string>
+    <string name="permdesc_writeGservices" msgid="6602362746516676175">"Ermöglicht einer App, Änderungen an der Google Services Map vorzunehmen. Nicht für normale Anwendungen vorgesehen."</string>
     <string name="permlab_receiveBootCompleted" msgid="7776779842866993377">"Automatisch nach dem Booten starten"</string>
-    <string name="permdesc_receiveBootCompleted" product="tablet" msgid="7530977064379338199">"Ermöglicht einer Anwendung, sich selbst zu starten, sobald das System gebootet wurde. Dadurch kann es länger dauern, bis das Tablet gestartet wird, und durch die ständige Aktivität der Anwendung wird die gesamte Leistung des Tablets beeinträchtigt."</string>
-    <string name="permdesc_receiveBootCompleted" product="default" msgid="698336728415008796">"Ermöglicht einer Anwendung, sich selbst zu starten, sobald das System gebootet wurde. Dadurch kann es länger dauern, bis das Telefon gestartet wird, und durch die ständige Aktivität der Anwendung wird die gesamte Leistung des Telefons beeinträchtigt."</string>
+    <string name="permdesc_receiveBootCompleted" product="tablet" msgid="7530977064379338199">"Ermöglicht einer App, sich selbst zu starten, sobald das System gebootet wurde. Dadurch kann es länger dauern, bis das Tablet gestartet wird, und durch die ständige Aktivität der Anwendung wird die gesamte Leistung des Tablets beeinträchtigt."</string>
+    <string name="permdesc_receiveBootCompleted" product="default" msgid="698336728415008796">"Ermöglicht einer App, sich selbst zu starten, sobald das System gebootet wurde. Dadurch kann es länger dauern, bis das Telefon gestartet wird, und durch die ständige Aktivität der Anwendung wird die gesamte Leistung des Telefons beeinträchtigt."</string>
     <string name="permlab_broadcastSticky" msgid="7919126372606881614">"dauerhaften Broadcast senden"</string>
-    <string name="permdesc_broadcastSticky" product="tablet" msgid="6322249605930062595">"Ermöglicht einer Anwendung, dauerhafte Broadcasts zu senden, die auch nach dem Ende des Broadcasts bestehen bleiben. Schädliche Anwendungen können das Tablet langsam oder instabil machen, da zu viel Speicherplatz belegt wird."</string>
-    <string name="permdesc_broadcastSticky" product="default" msgid="1920045289234052219">"Ermöglicht einer Anwendung, dauerhafte Broadcasts zu senden, die auch nach dem Ende des Broadcasts bestehen bleiben. Schädliche Anwendungen können das Telefon langsam oder unstabil machen, da zuviel Speicherplatz belegt wird."</string>
+    <string name="permdesc_broadcastSticky" product="tablet" msgid="6322249605930062595">"Ermöglicht einer App, dauerhafte Broadcasts zu senden, die auch nach dem Ende des Broadcasts bestehen bleiben. Schädliche Anwendungen können das Tablet langsam oder instabil machen, da zu viel Speicherplatz belegt wird."</string>
+    <string name="permdesc_broadcastSticky" product="default" msgid="1920045289234052219">"Ermöglicht einer App, dauerhafte Broadcasts zu senden, die auch nach dem Ende des Broadcasts bestehen bleiben. Schädliche Anwendungen können das Telefon langsam oder unstabil machen, da zuviel Speicherplatz belegt wird."</string>
     <string name="permlab_readContacts" msgid="6219652189510218240">"Kontaktdaten lesen"</string>
-    <string name="permdesc_readContacts" product="tablet" msgid="7596158687301157686">"Ermöglicht einer Anwendung, alle auf Ihrem Tablet gespeicherten Kontaktdaten (Adressen) zu lesen. Schädliche Anwendungen können so Ihre Daten an andere Personen senden."</string>
-    <string name="permdesc_readContacts" product="default" msgid="3371591512896545975">"Ermöglicht einer Anwendung, alle auf Ihrem Telefon gespeicherten Kontaktdaten (Adressen) zu lesen. Schädliche Anwendungen können so Ihre Daten an andere Personen senden."</string>
+    <string name="permdesc_readContacts" product="tablet" msgid="7596158687301157686">"Ermöglicht einer App, alle auf Ihrem Tablet gespeicherten Kontaktdaten (Adressen) zu lesen. Schädliche Anwendungen können so Ihre Daten an andere Personen senden."</string>
+    <string name="permdesc_readContacts" product="default" msgid="3371591512896545975">"Ermöglicht einer App, alle auf Ihrem Telefon gespeicherten Kontaktdaten (Adressen) zu lesen. Schädliche Anwendungen können so Ihre Daten an andere Personen senden."</string>
     <string name="permlab_writeContacts" msgid="644616215860933284">"Kontaktdaten schreiben"</string>
-    <string name="permdesc_writeContacts" product="tablet" msgid="7782689510038568495">"Ermöglicht einer Anwendung, die auf Ihrem Tablet gespeicherten Kontaktdaten (Adressen) zu ändern. Schädliche Anwendungen können so Ihre Kontaktdaten löschen oder verändern."</string>
-    <string name="permdesc_writeContacts" product="default" msgid="3924383579108183601">"Ermöglicht einer Anwendung, die auf Ihrem Telefon gespeicherten Kontaktdaten (Adressen) zu ändern. Schädliche Anwendungen können so Ihre Kontaktdaten löschen oder verändern."</string>
+    <string name="permdesc_writeContacts" product="tablet" msgid="7782689510038568495">"Ermöglicht einer App, die auf Ihrem Tablet gespeicherten Kontaktdaten (Adressen) zu ändern. Schädliche Anwendungen können so Ihre Kontaktdaten löschen oder verändern."</string>
+    <string name="permdesc_writeContacts" product="default" msgid="3924383579108183601">"Ermöglicht einer App, die auf Ihrem Telefon gespeicherten Kontaktdaten (Adressen) zu ändern. Schädliche Anwendungen können so Ihre Kontaktdaten löschen oder verändern."</string>
     <string name="permlab_readCalendar" msgid="6898987798303840534">"Kalendereinträge lesen"</string>
-    <string name="permdesc_readCalendar" product="tablet" msgid="5905870265734599678">"Ermöglicht einer Anwendung, alle auf Ihrem Tablet gespeicherten Kalenderereignisse zu lesen. Schädliche Anwendungen können so Ihre Kalenderereignisse an andere Personen senden."</string>
-    <string name="permdesc_readCalendar" product="default" msgid="5533029139652095734">"Ermöglicht einer Anwendung, alle auf Ihrem Telefon gespeicherten Kalenderereignisse zu lesen. Schädliche Anwendungen können so Ihre Kalenderereignisse an andere Personen senden."</string>
+    <string name="permdesc_readCalendar" product="tablet" msgid="5905870265734599678">"Ermöglicht einer App, alle auf Ihrem Tablet gespeicherten Kalenderereignisse zu lesen. Schädliche Anwendungen können so Ihre Kalenderereignisse an andere Personen senden."</string>
+    <string name="permdesc_readCalendar" product="default" msgid="5533029139652095734">"Ermöglicht einer App, alle auf Ihrem Telefon gespeicherten Kalenderereignisse zu lesen. Schädliche Anwendungen können so Ihre Kalenderereignisse an andere Personen senden."</string>
     <string name="permlab_writeCalendar" msgid="3894879352594904361">"Kalendereinträge hinzufügen oder ändern und E-Mails an Gäste senden"</string>
-    <string name="permdesc_writeCalendar" msgid="2988871373544154221">"Ermöglicht einer Anwendung, Einträge in Ihrem Kalender hinzuzufügen oder zu ändern, wodurch E-Mails an Gäste gesendet werden können. Schädliche Anwendungen können so Ihre Kalenderdaten löschen oder verändern oder E-Mails versenden."</string>
+    <string name="permdesc_writeCalendar" msgid="2988871373544154221">"Ermöglicht einer App, Einträge in Ihrem Kalender hinzuzufügen oder zu ändern, wodurch E-Mails an Gäste gesendet werden können. Schädliche Anwendungen können so Ihre Kalenderdaten löschen oder verändern oder E-Mails versenden."</string>
     <string name="permlab_accessMockLocation" msgid="8688334974036823330">"Simulierte Standortquellen für Testzwecke"</string>
     <string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Erstellt falsche Standortquellen für Testzwecke. Schädliche Anwendungen können so den von den echten Standortquellen wie GPS oder Netzwerkanbieter zurückgegebenen Standort und/oder Status überschreiben."</string>
     <string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"Auf zusätzliche Dienstanbieterbefehle für Standort zugreifen"</string>
@@ -326,9 +328,9 @@
     <string name="permdesc_accessCoarseLocation" product="tablet" msgid="3704633168985466045">"Greift auf Quellen mit ungefähren Standortbestimmungen wie die Datenbank des Mobilfunknetzes zu, um falls möglich den ungefähren Standort des Tablets zu bestimmen. Schädliche Anwendungen können damit herauszufinden, wo Sie sich ungefähr befinden."</string>
     <string name="permdesc_accessCoarseLocation" product="default" msgid="8235655958070862293">"Greift auf Quellen mit ungefähren Standortbestimmungen wie die Datenbank des Mobilfunknetzes zu, um falls möglich den ungefähren Standort des Tablets festzustellen. Schädliche Anwendungen können damit herausfinden, wo Sie sich ungefähr befinden"</string>
     <string name="permlab_accessSurfaceFlinger" msgid="2363969641792388947">"Auf SurfaceFlinger zugreifen"</string>
-    <string name="permdesc_accessSurfaceFlinger" msgid="6805241830020733025">"Ermöglicht einer Anwendung, die systemnahen SurfaceFlinger-Funktionen zu verwenden"</string>
+    <string name="permdesc_accessSurfaceFlinger" msgid="6805241830020733025">"Ermöglicht einer App, die systemnahen SurfaceFlinger-Funktionen zu verwenden"</string>
     <string name="permlab_readFrameBuffer" msgid="6690504248178498136">"Frame-Puffer lesen"</string>
-    <string name="permdesc_readFrameBuffer" msgid="7530020370469942528">"Ermöglicht einer Anwendung, den Content des Frame-Puffers zu lesen"</string>
+    <string name="permdesc_readFrameBuffer" msgid="7530020370469942528">"Ermöglicht einer App, den Content des Frame-Puffers zu lesen"</string>
     <string name="permlab_modifyAudioSettings" msgid="6095859937069146086">"Audio-Einstellungen ändern"</string>
     <string name="permdesc_modifyAudioSettings" msgid="5793461287365991922">"Ermöglicht der Anwendung, Änderungen an allgemeinen Audioeinstellungen wie Lautstärke und Weiterleitung vorzunehmen"</string>
     <string name="permlab_recordAudio" msgid="3876049771427466323">"Audio aufnehmen"</string>
@@ -366,7 +368,7 @@
     <string name="permlab_accessMtp" msgid="4953468676795917042">"MTP-Protokoll implementieren"</string>
     <string name="permdesc_accessMtp" msgid="6532961200486791570">"Erlaubt den Zugriff auf den Kernel-MTP-Treiber zur Implementierung des MTP-USB-Protokolls."</string>
     <string name="permlab_hardware_test" msgid="4148290860400659146">"Hardware testen"</string>
-    <string name="permdesc_hardware_test" msgid="3668894686500081699">"Ermöglicht einer Anwendung, verschiedene Peripherie-Geräte zu Hardware-Testzwecken zu steuern"</string>
+    <string name="permdesc_hardware_test" msgid="3668894686500081699">"Ermöglicht einer App, verschiedene Peripherie-Geräte zu Hardware-Testzwecken zu steuern"</string>
     <string name="permlab_callPhone" msgid="3925836347681847954">"Telefonnummern direkt anrufen"</string>
     <string name="permdesc_callPhone" msgid="3369867353692722456">"Ermöglicht dem Anwendungen, Rufnummern ohne Ihr Eingreifen zu wählen. Schädliche Anwendungen können für unerwartete Anrufe auf Ihrer Telefonrechnung verantwortlich sein. Das Wählen von Notrufnummern ist allerdings nicht möglich."</string>
     <string name="permlab_callPrivileged" msgid="4198349211108497879">"Alle Telefonnummern direkt anrufen"</string>
@@ -381,13 +383,13 @@
     <string name="permlab_bindGadget" msgid="776905339015863471">"Widgets auswählen"</string>
     <string name="permdesc_bindGadget" msgid="2098697834497452046">"Ermöglicht der Anwendung, dem System zu melden, welche Widgets von welcher Anwendung verwendet werden können. Mit dieser Berechtigung können Anwendungen anderen Anwendungen Zugriff auf persönliche Daten gewähren. Nicht für normale Anwendungen vorgesehen."</string>
     <string name="permlab_modifyPhoneState" msgid="8423923777659292228">"Telefonstatus ändern"</string>
-    <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Ermöglicht einer Anwendung, die Telefonfunktionen des Gerätes zu steuern. Eine Anwendung mit dieser Berechtigung kann unter anderem das Netzwerk wechseln oder die Mobilfunkverbindung des Telefons ein- und ausschalten, ohne Sie darüber zu informieren."</string>
+    <string name="permdesc_modifyPhoneState" msgid="3302284561346956587">"Ermöglicht einer App, die Telefonfunktionen des Gerätes zu steuern. Eine Anwendung mit dieser Berechtigung kann unter anderem das Netzwerk wechseln oder die Mobilfunkverbindung des Telefons ein- und ausschalten, ohne Sie darüber zu informieren."</string>
     <string name="permlab_readPhoneState" msgid="2326172951448691631">"Telefonstatus lesen und identifizieren"</string>
     <string name="permdesc_readPhoneState" msgid="188877305147626781">"Ermöglicht der Anwendung, auf die Telefonfunktionen des Gerätes zuzugreifen. Eine Anwendung mit dieser Berechtigung kann unter anderem bestimmen, welche Telefonnummer dieses Telefon verwendet, ob ein Anruf aktiv ist oder mit welcher Nummer der Anrufer verbunden ist."</string>
     <string name="permlab_wakeLock" product="tablet" msgid="1531731435011495015">"Standby-Modus des Tablets deaktivieren"</string>
     <string name="permlab_wakeLock" product="default" msgid="573480187941496130">"Standby-Modus deaktivieren"</string>
-    <string name="permdesc_wakeLock" product="tablet" msgid="4032181488045338551">"Ermöglicht einer Anwendung, den Standby-Modus des Tablets zu deaktivieren."</string>
-    <string name="permdesc_wakeLock" product="default" msgid="7584036471227467099">"Ermöglicht einer Anwendung, den Standby-Modus des Telefons zu deaktivieren"</string>
+    <string name="permdesc_wakeLock" product="tablet" msgid="4032181488045338551">"Ermöglicht einer App, den Standby-Modus des Tablets zu deaktivieren."</string>
+    <string name="permdesc_wakeLock" product="default" msgid="7584036471227467099">"Ermöglicht einer App, den Standby-Modus des Telefons zu deaktivieren"</string>
     <string name="permlab_devicePower" product="tablet" msgid="2787034722616350417">"Tablet ein- oder ausschalten"</string>
     <string name="permlab_devicePower" product="default" msgid="4928622470980943206">"Gerät ein- oder ausschalten"</string>
     <string name="permdesc_devicePower" product="tablet" msgid="3853773100100451905">"Ermöglicht der Anwendung, das Tablet ein- oder auszuschalten."</string>
@@ -400,76 +402,76 @@
     <string name="permlab_setWallpaperHints" msgid="3600721069353106851">"Größenhinweise für Hintergrund festlegen"</string>
     <string name="permdesc_setWallpaperHints" msgid="6019479164008079626">"Ermöglicht der Anwendung, die Größenhinweise für den Hintergrund festzulegen"</string>
     <string name="permlab_masterClear" msgid="2315750423139697397">"System auf Werkseinstellung zurücksetzen"</string>
-    <string name="permdesc_masterClear" msgid="5033465107545174514">"Ermöglicht einer Anwendung, das System komplett auf Werkseinstellung zurückzusetzen. Hierbei werden alle Daten, Konfigurationen und installierten Anwendungen gelöscht."</string>
+    <string name="permdesc_masterClear" msgid="5033465107545174514">"Ermöglicht einer App, das System komplett auf Werkseinstellung zurückzusetzen. Hierbei werden alle Daten, Konfigurationen und installierten Anwendungen gelöscht."</string>
     <string name="permlab_setTime" msgid="2021614829591775646">"Zeit einstellen"</string>
-    <string name="permdesc_setTime" product="tablet" msgid="209693136361006073">"Ermöglicht einer Anwendung, die Uhrzeit des Tablets zu ändern"</string>
-    <string name="permdesc_setTime" product="default" msgid="667294309287080045">"Ermöglicht einer Anwendung, die Uhrzeit des Telefons zu ändern"</string>
+    <string name="permdesc_setTime" product="tablet" msgid="209693136361006073">"Ermöglicht einer App, die Uhrzeit des Tablets zu ändern"</string>
+    <string name="permdesc_setTime" product="default" msgid="667294309287080045">"Ermöglicht einer App, die Uhrzeit des Telefons zu ändern"</string>
     <string name="permlab_setTimeZone" msgid="2945079801013077340">"Zeitzone festlegen"</string>
-    <string name="permdesc_setTimeZone" product="tablet" msgid="2522877107613885139">"Ermöglicht einer Anwendung, die Zeitzone des Tablets zu ändern."</string>
-    <string name="permdesc_setTimeZone" product="default" msgid="1902540227418179364">"Ermöglicht einer Anwendung, die Zeitzone des Telefons zu ändern"</string>
+    <string name="permdesc_setTimeZone" product="tablet" msgid="2522877107613885139">"Ermöglicht einer App, die Zeitzone des Tablets zu ändern."</string>
+    <string name="permdesc_setTimeZone" product="default" msgid="1902540227418179364">"Ermöglicht einer App, die Zeitzone des Telefons zu ändern"</string>
     <string name="permlab_accountManagerService" msgid="4829262349691386986">"Als Konto-Manager fungieren"</string>
-    <string name="permdesc_accountManagerService" msgid="6056903274106394752">"Ermöglicht einer Anwendung, Anrufe an Konto-Authentifizierer zu tätigen"</string>
+    <string name="permdesc_accountManagerService" msgid="6056903274106394752">"Ermöglicht einer App, Anrufe an Konto-Authentifizierer zu tätigen"</string>
     <string name="permlab_getAccounts" msgid="4549918644233460103">"bekannte Konten suchen"</string>
-    <string name="permdesc_getAccounts" product="tablet" msgid="857622793935544694">"Ermöglicht einer Anwendung, eine Liste der dem Tablet bekannten Konten abzurufen."</string>
-    <string name="permdesc_getAccounts" product="default" msgid="6839262446413155394">"Ermöglicht einer Anwendung, eine Liste der dem Telefon bekannten Konten abzurufen"</string>
+    <string name="permdesc_getAccounts" product="tablet" msgid="857622793935544694">"Ermöglicht einer App, eine Liste der dem Tablet bekannten Konten abzurufen."</string>
+    <string name="permdesc_getAccounts" product="default" msgid="6839262446413155394">"Ermöglicht einer App, eine Liste der dem Telefon bekannten Konten abzurufen"</string>
     <string name="permlab_authenticateAccounts" msgid="3940505577982882450">"Als Kontoauthentifizierer fungieren"</string>
-    <string name="permdesc_authenticateAccounts" msgid="4006839406474208874">"Ermöglicht einer Anwendung, die Kontoauthentifizierungsfunktionen des Konto-Managers zu verwenden, einschließlich die Funktionen zum Erstellen von Konten und zum Abrufen und Einstellen der entsprechenden Passwörter"</string>
+    <string name="permdesc_authenticateAccounts" msgid="4006839406474208874">"Ermöglicht einer App, die Kontoauthentifizierungsfunktionen des Konto-Managers zu verwenden, einschließlich die Funktionen zum Erstellen von Konten und zum Abrufen und Einstellen der entsprechenden Passwörter"</string>
     <string name="permlab_manageAccounts" msgid="4440380488312204365">"Kontoliste verwalten"</string>
-    <string name="permdesc_manageAccounts" msgid="8804114016661104517">"Ermöglicht einer Anwendung, Konten hinzuzufügen und zu entfernen oder deren Passwörter zu löschen"</string>
+    <string name="permdesc_manageAccounts" msgid="8804114016661104517">"Ermöglicht einer App, Konten hinzuzufügen und zu entfernen oder deren Passwörter zu löschen"</string>
     <string name="permlab_useCredentials" msgid="6401886092818819856">"Authentifizierungsinformationen eines Kontos verwenden"</string>
-    <string name="permdesc_useCredentials" msgid="7416570544619546974">"Ermöglicht einer Anwendung, Authentifizierungs-Token anzufordern"</string>
+    <string name="permdesc_useCredentials" msgid="7416570544619546974">"Ermöglicht einer App, Authentifizierungs-Token anzufordern"</string>
     <string name="permlab_accessNetworkState" msgid="6865575199464405769">"Netzwerkstatus anzeigen"</string>
-    <string name="permdesc_accessNetworkState" msgid="558721128707712766">"Ermöglicht einer Anwendung, den Status aller Netzwerke anzuzeigen"</string>
+    <string name="permdesc_accessNetworkState" msgid="558721128707712766">"Ermöglicht einer App, den Status aller Netzwerke anzuzeigen"</string>
     <string name="permlab_createNetworkSockets" msgid="9121633680349549585">"uneingeschränkter Internetzugriff"</string>
-    <string name="permdesc_createNetworkSockets" msgid="4593339106921772192">"Ermöglicht einer Anwendung, Netzwerk-Sockets einzurichten"</string>
+    <string name="permdesc_createNetworkSockets" msgid="4593339106921772192">"Ermöglicht einer App, Netzwerk-Sockets einzurichten"</string>
     <string name="permlab_writeApnSettings" msgid="7823599210086622545">"Einstellungen für Zugriffspunktname schreiben"</string>
-    <string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Ermöglicht einer Anwendung, die APN-Einstellungen wie Proxy und Port eines Zugriffspunkts zu ändern"</string>
+    <string name="permdesc_writeApnSettings" msgid="7443433457842966680">"Ermöglicht einer App, die APN-Einstellungen wie Proxy und Port eines Zugriffspunkts zu ändern"</string>
     <string name="permlab_changeNetworkState" msgid="958884291454327309">"Netzwerkkonnektivität ändern"</string>
-    <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Ermöglicht einer Anwendung, den Status der Netzwerkkonnektivität zu ändern"</string>
+    <string name="permdesc_changeNetworkState" msgid="4199958910396387075">"Ermöglicht einer App, den Status der Netzwerkkonnektivität zu ändern"</string>
     <string name="permlab_changeTetherState" msgid="2702121155761140799">"Tethering-Konnektivität ändern"</string>
-    <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Ermöglicht einer Anwendung, den Status der Tethering-Konnektivität zu ändern"</string>
+    <string name="permdesc_changeTetherState" msgid="8905815579146349568">"Ermöglicht einer App, den Status der Tethering-Konnektivität zu ändern"</string>
     <string name="permlab_changeBackgroundDataSetting" msgid="1400666012671648741">"Einstellung zur Verwendung von Hintergrunddaten ändern"</string>
-    <string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Ermöglicht einer Anwendung, die Einstellung der Verwendung von Hintergrunddaten zu ändern"</string>
+    <string name="permdesc_changeBackgroundDataSetting" msgid="1001482853266638864">"Ermöglicht einer App, die Einstellung der Verwendung von Hintergrunddaten zu ändern"</string>
     <string name="permlab_accessWifiState" msgid="8100926650211034400">"WLAN-Status anzeigen"</string>
-    <string name="permdesc_accessWifiState" msgid="485796529139236346">"Ermöglicht einer Anwendung, die Informationen zum WLAN-Status einzusehen"</string>
+    <string name="permdesc_accessWifiState" msgid="485796529139236346">"Ermöglicht einer App, die Informationen zum WLAN-Status einzusehen"</string>
     <string name="permlab_changeWifiState" msgid="7280632711057112137">"WLAN-Status ändern"</string>
-    <string name="permdesc_changeWifiState" msgid="2950383153656873267">"Ermöglicht einer Anwendung, eine Verbindung zu den WLAN-Zugangspunkten herzustellen und diese zu trennen oder Änderungen an den konfigurierten WLAN-Netzwerken vorzunehmen"</string>
+    <string name="permdesc_changeWifiState" msgid="2950383153656873267">"Ermöglicht einer App, eine Verbindung zu den WLAN-Zugangspunkten herzustellen und diese zu trennen oder Änderungen an den konfigurierten WLAN-Netzwerken vorzunehmen"</string>
     <string name="permlab_changeWifiMulticastState" msgid="1368253871483254784">"WLAN-Multicast-Empfang zulassen"</string>
-    <string name="permdesc_changeWifiMulticastState" msgid="8199464507656067553">"Ermöglicht einer Anwendung, Datenpakete zu empfangen, die nicht direkt an Ihr Gerät gerichtet sind. Dies kann bei der Erkennung von in der Nähe angebotenen Diensten hilfreich sein. Diese Einstellung verbraucht mehr Energie als der Nicht-Multicast-Modus."</string>
+    <string name="permdesc_changeWifiMulticastState" msgid="8199464507656067553">"Ermöglicht einer App, Datenpakete zu empfangen, die nicht direkt an Ihr Gerät gerichtet sind. Dies kann bei der Erkennung von in der Nähe angebotenen Diensten hilfreich sein. Diese Einstellung verbraucht mehr Energie als der Nicht-Multicast-Modus."</string>
     <string name="permlab_bluetoothAdmin" msgid="1092209628459341292">"Bluetooth-Verwaltung"</string>
-    <string name="permdesc_bluetoothAdmin" product="tablet" msgid="3511795757324345837">"Ermöglicht einer Anwendung, das lokale Bluetooth-Tablet zu konfigurieren, Remote-Geräte zu erkennen und eine Verbindung zu diesen herzustellen."</string>
-    <string name="permdesc_bluetoothAdmin" product="default" msgid="7256289774667054555">"Ermöglicht einer Anwendung, das lokale Bluetooth-Telefon zu konfigurieren, Remote-Geräte zu erkennen und eine Verbindung zu diesen herzustellen"</string>
+    <string name="permdesc_bluetoothAdmin" product="tablet" msgid="3511795757324345837">"Ermöglicht einer App, das lokale Bluetooth-Tablet zu konfigurieren, Remote-Geräte zu erkennen und eine Verbindung zu diesen herzustellen."</string>
+    <string name="permdesc_bluetoothAdmin" product="default" msgid="7256289774667054555">"Ermöglicht einer App, das lokale Bluetooth-Telefon zu konfigurieren, Remote-Geräte zu erkennen und eine Verbindung zu diesen herzustellen"</string>
     <string name="permlab_bluetooth" msgid="8361038707857018732">"Bluetooth-Verbindungen herstellen"</string>
-    <string name="permdesc_bluetooth" product="tablet" msgid="4191941825910543803">"Ermöglicht einer Anwendung, die Konfiguration des lokalen Bluetooth-Tablets einzusehen und Verbindungen mit Partnergeräten herzustellen und zu akzeptieren."</string>
-    <string name="permdesc_bluetooth" product="default" msgid="762515380679392945">"Ermöglicht einer Anwendung, die Konfiguration des lokalen Bluetooth-Telefons einzusehen und Verbindungen mit Partnergeräten herzustellen und zu akzeptieren"</string>
+    <string name="permdesc_bluetooth" product="tablet" msgid="4191941825910543803">"Ermöglicht einer App, die Konfiguration des lokalen Bluetooth-Tablets einzusehen und Verbindungen mit Partnergeräten herzustellen und zu akzeptieren."</string>
+    <string name="permdesc_bluetooth" product="default" msgid="762515380679392945">"Ermöglicht einer App, die Konfiguration des lokalen Bluetooth-Telefons einzusehen und Verbindungen mit Partnergeräten herzustellen und zu akzeptieren"</string>
     <string name="permlab_nfc" msgid="4423351274757876953">"Nahfeldkommunikation steuern"</string>
-    <string name="permdesc_nfc" msgid="9171401851954407226">"Ermöglicht einer Anwendung die Kommunikation mit Tags für Nahfeldkommunikation, Karten und Lesegeräte"</string>
+    <string name="permdesc_nfc" msgid="9171401851954407226">"Ermöglicht einer App die Kommunikation mit Tags für Nahfeldkommunikation, Karten und Lesegeräte"</string>
     <string name="permlab_disableKeyguard" msgid="4977406164311535092">"Tastensperre deaktivieren"</string>
-    <string name="permdesc_disableKeyguard" msgid="3189763479326302017">"Ermöglicht einer Anwendung, die Tastensperre sowie den damit verbundenen Passwortschutz zu deaktivieren. So wird die Tastensperre vom Telefon deaktiviert, wenn ein Anruf eingeht, und nach Beendigung des Anrufs wieder aktiviert."</string>
+    <string name="permdesc_disableKeyguard" msgid="3189763479326302017">"Ermöglicht einer App, die Tastensperre sowie den damit verbundenen Passwortschutz zu deaktivieren. So wird die Tastensperre vom Telefon deaktiviert, wenn ein Anruf eingeht, und nach Beendigung des Anrufs wieder aktiviert."</string>
     <string name="permlab_readSyncSettings" msgid="6201810008230503052">"Synchronisierungseinstellungen lesen"</string>
-    <string name="permdesc_readSyncSettings" msgid="5315925706353341823">"Ermöglicht einer Anwendung, die Synchronisierungseinstellungen zu lesen, etwa ob die Synchronisierung für Kontakte aktiviert ist oder nicht"</string>
+    <string name="permdesc_readSyncSettings" msgid="5315925706353341823">"Ermöglicht einer App, die Synchronisierungseinstellungen zu lesen, etwa ob die Synchronisierung für Kontakte aktiviert ist oder nicht"</string>
     <string name="permlab_writeSyncSettings" msgid="6297138566442486462">"Synchronisierungseinstellungen schreiben"</string>
-    <string name="permdesc_writeSyncSettings" msgid="2498201614431360044">"Ermöglicht einer Anwendung, die Synchronisierungseinstellungen zu ändern, etwa ob die Synchronisierung für Kontakte aktiviert ist oder nicht"</string>
+    <string name="permdesc_writeSyncSettings" msgid="2498201614431360044">"Ermöglicht einer App, die Synchronisierungseinstellungen zu ändern, etwa ob die Synchronisierung für Kontakte aktiviert ist oder nicht"</string>
     <string name="permlab_readSyncStats" msgid="7396577451360202448">"Synchronisierungsstatistiken lesen"</string>
-    <string name="permdesc_readSyncStats" msgid="7511448343374465000">"Ermöglicht einer Anwendung, die Synchronisierungsstatistiken zu lesen, etwa den Verlauf der bereits durchgeführten Synchronisierungen"</string>
+    <string name="permdesc_readSyncStats" msgid="7511448343374465000">"Ermöglicht einer App, die Synchronisierungsstatistiken zu lesen, etwa den Verlauf der bereits durchgeführten Synchronisierungen"</string>
     <string name="permlab_subscribedFeedsRead" msgid="4756609637053353318">"abonnierte Feeds lesen"</string>
-    <string name="permdesc_subscribedFeedsRead" msgid="3622200625634207660">"Ermöglicht einer Anwendung, Details zu den zurzeit synchronisierten Feeds abzurufen"</string>
+    <string name="permdesc_subscribedFeedsRead" msgid="3622200625634207660">"Ermöglicht einer App, Details zu den zurzeit synchronisierten Feeds abzurufen"</string>
     <string name="permlab_subscribedFeedsWrite" msgid="9015246325408209296">"abonnierte Feeds schreiben"</string>
-    <string name="permdesc_subscribedFeedsWrite" msgid="8121607099326533878">"Ermöglicht einer Anwendung, Änderungen an den kürzlich synchronisierten Feeds vorzunehmen. Schädliche Anwendungen könnten so Ihre synchronisierten Feeds ändern."</string>
+    <string name="permdesc_subscribedFeedsWrite" msgid="8121607099326533878">"Ermöglicht einer App, Änderungen an den kürzlich synchronisierten Feeds vorzunehmen. Schädliche Anwendungen könnten so Ihre synchronisierten Feeds ändern."</string>
     <string name="permlab_readDictionary" msgid="432535716804748781">"nutzerdefiniertes Wörterbuch lesen"</string>
-    <string name="permdesc_readDictionary" msgid="1082972603576360690">"Ermöglicht einer Anwendung, alle privaten Wörter, Namen und Ausdrücke zu lesen, die ein Nutzer in seinem Wörterbuch gespeichert hat"</string>
+    <string name="permdesc_readDictionary" msgid="1082972603576360690">"Ermöglicht einer App, alle privaten Wörter, Namen und Ausdrücke zu lesen, die ein Nutzer in seinem Wörterbuch gespeichert hat"</string>
     <string name="permlab_writeDictionary" msgid="6703109511836343341">"in nutzerdefiniertes Wörterbuch schreiben"</string>
-    <string name="permdesc_writeDictionary" msgid="2241256206524082880">"Ermöglicht einer Anwendung, Ihrem Wörterbuch neue Einträge hinzuzufügen"</string>
+    <string name="permdesc_writeDictionary" msgid="2241256206524082880">"Ermöglicht einer App, Ihrem Wörterbuch neue Einträge hinzuzufügen"</string>
     <string name="permlab_sdcardWrite" product="nosdcard" msgid="85430876310764752">"USB-Speicherinhalt ändern/löschen"</string>
     <string name="permlab_sdcardWrite" product="default" msgid="8079403759001777291">"SD-Karten-Inhalt ändern/löschen"</string>
     <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6594393334785738252">"Ermöglicht der Anwendung Schreiben in USB-Speicher"</string>
-    <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Ermöglicht einer Anwendung, auf die SD-Karte zu schreiben"</string>
+    <string name="permdesc_sdcardWrite" product="default" msgid="6643963204976471878">"Ermöglicht einer App, auf die SD-Karte zu schreiben"</string>
     <string name="permlab_mediaStorageWrite" product="default" msgid="6859839199706879015">"Intern. Mediensp. änd./löschen"</string>
-    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Ermöglicht einer Anwendung, den Inhalt des internen Medienspeichers zu ändern"</string>
+    <string name="permdesc_mediaStorageWrite" product="default" msgid="8232008512478316233">"Ermöglicht einer App, den Inhalt des internen Medienspeichers zu ändern"</string>
     <string name="permlab_cache_filesystem" msgid="5656487264819669824">"Zugriff auf das Cache-Dateisystem"</string>
     <string name="permdesc_cache_filesystem" msgid="1624734528435659906">"Gewährt einer Anwendung Lese- und Schreibzugriff auf das Cache-Dateisystem."</string>
     <string name="permlab_use_sip" msgid="5986952362795870502">"Internetanrufe tätigen/annehmen"</string>
-    <string name="permdesc_use_sip" msgid="6320376185606661843">"Ermöglicht einer Anwendung die Verwendung des SIP-Dienstes zum Tätigen/Annehmen von Internetanrufen"</string>
+    <string name="permdesc_use_sip" msgid="6320376185606661843">"Ermöglicht einer App die Verwendung des SIP-Dienstes zum Tätigen/Annehmen von Internetanrufen"</string>
     <string name="policylab_limitPassword" msgid="4497420728857585791">"Passwortregeln festlegen"</string>
     <string name="policydesc_limitPassword" msgid="9083400080861728056">"Zulässige Länge und Zeichen für Passwörter zum Entsperren des Displays festlegen"</string>
     <string name="policylab_watchLogin" msgid="914130646942199503">"Versuche zum Entsperren des Displays überwachen"</string>
@@ -674,12 +676,12 @@
     <string name="permlab_readHistoryBookmarks" msgid="1284843728203412135">"Browserverlauf und Lesezeichen lesen"</string>
     <string name="permdesc_readHistoryBookmarks" msgid="4981489815467617191">"Ermöglicht der Anwendung, alle URLs, die mit dem Browser besucht wurden, sowie alle Lesezeichen des Browsers zu lesen"</string>
     <string name="permlab_writeHistoryBookmarks" msgid="9009434109836280374">"Browserverlauf und Lesezeichen schreiben"</string>
-    <string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="7193514090469945307">"Ermöglicht einer Anwendung, den auf Ihrem Tablet gespeicherten Browserverlauf und die Lesezeichen zu ändern. Schädliche Anwendungen können so Ihre Browserdaten löschen oder ändern."</string>
-    <string name="permdesc_writeHistoryBookmarks" product="default" msgid="945571990357114950">"Ermöglicht einer Anwendung, den auf Ihrem Telefon gespeicherten Browserverlauf und die Lesezeichen zu ändern. Schädliche Anwendungen können so Ihre Browserdaten löschen oder ändern."</string>
+    <string name="permdesc_writeHistoryBookmarks" product="tablet" msgid="7193514090469945307">"Ermöglicht einer App, den auf Ihrem Tablet gespeicherten Browserverlauf und die Lesezeichen zu ändern. Schädliche Anwendungen können so Ihre Browserdaten löschen oder ändern."</string>
+    <string name="permdesc_writeHistoryBookmarks" product="default" msgid="945571990357114950">"Ermöglicht einer App, den auf Ihrem Telefon gespeicherten Browserverlauf und die Lesezeichen zu ändern. Schädliche Anwendungen können so Ihre Browserdaten löschen oder ändern."</string>
     <string name="permlab_setAlarm" msgid="5924401328803615165">"Alarm im Wecker festlegen"</string>
     <string name="permdesc_setAlarm" msgid="5966966598149875082">"Ermöglicht dieser Anwendung, einen Alarm mithilfe eines installierten Weckers festzulegen. Einige Weckeranwendungen verfügen möglicherweise nicht über diese Funktion."</string>
     <string name="permlab_writeGeolocationPermissions" msgid="4715212655598275532">"Geolokalisierungsberechtigungen des Browsers ändern"</string>
-    <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Ermöglicht einer Anwendung, die Geolokalisierungsberechtigungen des Browsers zu ändern. Schädliche Anwendungen können dies nutzen, um das Senden von Standortinformationen an willkürliche Websites zuzulassen."</string>
+    <string name="permdesc_writeGeolocationPermissions" msgid="4011908282980861679">"Ermöglicht einer App, die Geolokalisierungsberechtigungen des Browsers zu ändern. Schädliche Anwendungen können dies nutzen, um das Senden von Standortinformationen an willkürliche Websites zuzulassen."</string>
     <string name="save_password_message" msgid="767344687139195790">"Möchten Sie, dass der Browser dieses Passwort speichert?"</string>
     <string name="save_password_notnow" msgid="6389675316706699758">"Nicht jetzt"</string>
     <string name="save_password_remember" msgid="6491879678996749466">"Speichern"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Anwendung umgeleitet"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> wird jetzt ausgeführt."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> wurde ursprünglich gestartet."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Die Anwendung <xliff:g id="APPLICATION">%1$s</xliff:g> (Prozess <xliff:g id="PROCESS">%2$s</xliff:g>) hat gegen ihre selbsterzwungene StrictMode-Richtlinie verstoßen."</string>
     <string name="smv_process" msgid="5120397012047462446">"Der Prozess <xliff:g id="PROCESS">%1$s</xliff:g> hat gegen seine selbsterzwungene StrictMode-Richtlinie verstoßen."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> läuft"</string>
@@ -994,11 +1002,11 @@
     <string name="format_error" product="nosdcard" msgid="4320339096529911637">"USB-Speicher konnte nicht gelöscht werden."</string>
     <string name="format_error" product="default" msgid="1343380371925238343">"SD-Karte konnte nicht gelöscht werden."</string>
     <string name="media_bad_removal" msgid="7960864061016603281">"SD-Karte wurde vor dem Trennvorgang entfernt."</string>
-    <string name="media_checking" product="nosdcard" msgid="418188720009569693">"Der USB-Speicher wird derzeit überprüft."</string>
-    <string name="media_checking" product="default" msgid="7334762503904827481">"Die SD-Karte wird derzeit überprüft."</string>
+    <string name="media_checking" product="nosdcard" msgid="418188720009569693">"Der USB-Speicher wird zurzeit überprüft."</string>
+    <string name="media_checking" product="default" msgid="7334762503904827481">"Die SD-Karte wird zurzeit überprüft."</string>
     <string name="media_removed" msgid="7001526905057952097">"Die SD-Karte wurde entfernt."</string>
-    <string name="media_shared" product="nosdcard" msgid="5830814349250834225">"Der USB-Speicher wird derzeit von einem Computer verwendet."</string>
-    <string name="media_shared" product="default" msgid="5706130568133540435">"Die SD-Karte wird derzeit von einem Computer verwendet."</string>
+    <string name="media_shared" product="nosdcard" msgid="5830814349250834225">"Der USB-Speicher wird zurzeit von einem Computer verwendet."</string>
+    <string name="media_shared" product="default" msgid="5706130568133540435">"Die SD-Karte wird zurzeit von einem Computer verwendet."</string>
     <string name="media_unknown_state" msgid="729192782197290385">"Unbekannter Status des externen Speichermediums"</string>
     <string name="share" msgid="1778686618230011964">"Weitergeben"</string>
     <string name="find" msgid="4808270900322985960">"Suchen"</string>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 1f1e279..71ac7bd 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Επιτρέπει στον κάτοχο την αποστολή στόχων σε έναν διαχειριστή συσκευής. Δεν θα χρειαστεί ποτέ για κανονικές εφαρμογές."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"αλλαγή προσανατολισμού οθόνης"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Επιτρέπει σε μια εφαρμογή την αλλαγή της περιστροφής της οθόνης οποιαδήποτε στιγμή. Δεν είναι απαραίτητο για κανονικές εφαρμογές."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"αλλαγή ταχύτητας δείκτη"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Επιτρέπει σε μια εφαρμογή την αλλαγή της ταχύτητας του δείκτη του ποντικιού ή της επιφάνειας αφής ανά πάσα στιγμή. Υπό κανονικές συνθήκες, δεν απαιτείται για κανονικές εφαρμογές."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"αποστολή σημάτων Linux σε εφαρμογές"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Επιτρέπει σε μια εφαρμογή την αποστολή αιτήματος για την αποστολή του παρεχόμενου σήματος σε όλες τις υπάρχουσες διαδικασίες."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"η εφαρμογή να εκτελείται συνεχώς"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Ανακατεύθυνση εφαρμογής"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"Η εφαρμογή <xliff:g id="APP_NAME">%1$s</xliff:g> εκτελείται τώρα."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Έγινε εκκίνηση πρώτα της εφαρμογής <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Η εφαρμογή <xliff:g id="APPLICATION">%1$s</xliff:g> (διεργασία <xliff:g id="PROCESS">%2$s</xliff:g>) παραβίασε την αυτοεπιβαλόμενη πολιτική StrictMode."</string>
     <string name="smv_process" msgid="5120397012047462446">"Η διεργασία <xliff:g id="PROCESS">%1$s</xliff:g> παραβίασε την αυτοεπιβαλόμενη πολιτική StrictMode."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Η εφαρμογή <xliff:g id="APP">%1$s</xliff:g> εκτελείται"</string>
diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml
index 32357c8..78e2b7f 100644
--- a/core/res/res/values-en-rGB/strings.xml
+++ b/core/res/res/values-en-rGB/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Allows the holder to send intents to a device administrator. Should never be needed for normal applications."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"change screen orientation"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Allows an application to change the rotation of the screen at any time. Should never be needed for normal applications."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"change pointer speed"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Allows an application to change the mouse or track pad pointer speed at any time. Should never be needed for normal applications."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"send Linux signals to applications"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Allows application to request that the supplied signal be sent to all persistent processes."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"make application always run"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Application redirected"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> is now running."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> was originally launched."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"The application <xliff:g id="APPLICATION">%1$s</xliff:g> (process <xliff:g id="PROCESS">%2$s</xliff:g>) has violated its self-enforced StrictMode policy."</string>
     <string name="smv_process" msgid="5120397012047462446">"The process <xliff:g id="PROCESS">%1$s</xliff:g> has violated its self-enforced StrictMode policy."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> running"</string>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 56f1ce0..94cf49a 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite que el propietario envíe sus intentos a un administrador de dispositivos. No se necesita para las aplicaciones normales."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"cambiar la orientación de la pantalla"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Admite una aplicación que cambia la rotación de la pantalla en cualquier momento. Se debe evitar utilizarlo en aplicaciones normales."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"cambiar velocidad del puntero"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Permite que una aplicación modifique la velocidad del puntero del mouse o del trackpad en cualquier momento. Las aplicaciones normales nunca deberían necesitar este permiso."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"enviar señales de Linux a las aplicaciones"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Admite que la aplicación solicite el envío de la señal suministrada a todos los procesos continuos."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"hacer que siempre se ejecute la aplicación"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Se redirigió la aplicación"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> se está ejecutando ahora."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> se inició originalmente."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"La aplicación <xliff:g id="APPLICATION">%1$s</xliff:g> (proceso <xliff:g id="PROCESS">%2$s</xliff:g>) ha violado su política StrictMode autoimpuesta."</string>
     <string name="smv_process" msgid="5120397012047462446">"El proceso <xliff:g id="PROCESS">%1$s</xliff:g> ha violado su política StrictMode autoimpuesta."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> en ejecución"</string>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index dced2c1..06ab109 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite enviar intentos a un administrador de dispositivos. Este permiso nunca debería ser necesario para las aplicaciones normales."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"cambiar orientación de la pantalla"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Permite que una aplicación cambie la rotación de la pantalla en cualquier momento. No debería ser necesario nunca para las aplicaciones normales."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"cambiar velocidad del puntero"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Permite que una aplicación modifique la velocidad del puntero del trackpad o del ratón en cualquier momento. Las aplicaciones normales nunca deberían necesitar este permiso."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"enviar señales Linux a aplicaciones"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Permite que la aplicación solicite que la señal suministrada se envíe a todos los procesos persistentes."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"hacer que la aplicación se ejecute siempre"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Aplicación redireccionada"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> se está ejecutando."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Inicialmente, se inició la aplicación <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"La aplicación <xliff:g id="APPLICATION">%1$s</xliff:g> (proceso <xliff:g id="PROCESS">%2$s</xliff:g>) ha infringido su política StrictMode autoaplicable."</string>
     <string name="smv_process" msgid="5120397012047462446">"El proceso <xliff:g id="PROCESS">%1$s</xliff:g> ha infringido su política StrictMode autoaplicable."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> en ejecución"</string>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 2eee089..0c4338f 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"به نگهدارنده اجازه می دهد مفاد را به یک سرپرست دستگاه ارسال کند. هرگز برای برنامه های معمولی مورد نیاز نیست."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"تغییر جهت صفحه"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"به یک برنامه کاربردی اجازه می دهد چرخش صفحه را در هر زمانی تغییر دهد. هرگز برای برنامه های معمولی مورد نیاز نیست."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"تغییر سرعت اشاره گر"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"به یک برنامه کاربردی این امکان را می دهد تا سرعت اشاره گر ماوس یا پد لمسی را در هر زمان تغییر دهد. برای برنامه های معمولی به این حالت نیاز نخواهید داشت."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"ارسال سیگنال های Linux برای برنامه ها"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"به برنامه کاربردی اجازه می دهد درخواست کند که سیگنال ارائه شده را به تمام فرایندهای ثابت ارسال کند."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"برنامه همیشه اجرا شود"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"برنامه هدایت مجدد شد"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> اکنون در حال اجرا است."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> از ابتدا راه اندازی شد."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"برنامه <xliff:g id="APPLICATION">%1$s</xliff:g> (پردازش <xliff:g id="PROCESS">%2$s</xliff:g>) خط مشی StrictMode اجرای خودکار را نقض کرده است."</string>
     <string name="smv_process" msgid="5120397012047462446">"فرآیند <xliff:g id="PROCESS">%1$s</xliff:g> خط مشی StrictMode اجرای خودکار خود را نقض کرده است."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> در حال اجرا"</string>
diff --git a/core/res/res/values-fi/strings.xml b/core/res/res/values-fi/strings.xml
index 5690a26..dbbeeae 100644
--- a/core/res/res/values-fi/strings.xml
+++ b/core/res/res/values-fi/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Antaa sovelluksen lähettää kyselyitä laitteen järjestelmänvalvojalle. Ei tavallisten sovelluksien käyttöön."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"muuta näytön suuntaa"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Antaa sovelluksen vaihtaa näytön suuntaa milloin tahansa. Ei tavallisten sovelluksien käyttöön."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"muuta osoittimen nopeutta"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Antaa sovelluksen muuttaa hiiren tai ohjauslevyn osoittimen nopeutta milloin tahansa. Ei tavallisten sovelluksien käyttöön."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"lähettää sovelluksiin Linux-signaaleja"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Antaa sovelluksen pyytää, että signaali lähetetään kaikille kiinteille prosesseille."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"aseta sovellus olemaan jatkuvasti käynnissä"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Sovellus uudelleenohjasi"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> on nyt käynnissä."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> käynnistettiin alun perin."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Sovellus <xliff:g id="APPLICATION">%1$s</xliff:g> (prosessi <xliff:g id="PROCESS">%2$s</xliff:g>) on rikkonut itse käyttöön ottamaansa StrictMode-käytäntöä."</string>
     <string name="smv_process" msgid="5120397012047462446">"Prosessi <xliff:g id="PROCESS">%1$s</xliff:g> on rikkonut itse käyttöön ottamaansa StrictMode-käytäntöä."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> käynnissä"</string>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index 8d9f168..c2d8500 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permet à l\'application d\'envoyer des intentions à l\'administrateur de l\'appareil. Les applications standard ne devraient jamais avoir recours à cette fonctionnalité."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"Changement d\'orientation de l\'écran"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Permet à une application de modifier la rotation de l\'écran à tout moment. Les applications normales ne devraient jamais avoir recours à cette fonctionnalité."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"changer la vitesse du pointeur"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Permet à une application de modifier la vitesse du pointeur de la souris ou du pavé tactile à tout moment. Cette autorisation ne devrait jamais être nécessaire pour les applications standards."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"Envoi de signaux Linux aux applications"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Permet à une application de demander que le signal fourni soit envoyé à tous les processus persistants."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"Exécution de l\'application en continu"</string>
@@ -486,8 +488,8 @@
     <string name="policydesc_setGlobalProxy" msgid="6387497466660154931">"Indiquer le proxy global à utiliser pour ce mobile lorsque les règles sont activées. Seul l\'administrateur principal du mobile peut définir le proxy global utilisé."</string>
     <string name="policylab_expirePassword" msgid="885279151847254056">"Définir exp. mot passe verr."</string>
     <string name="policydesc_expirePassword" msgid="4844430354224822074">"Contrôler la fréquence de modification du mot de passe de verrouillage de l\'écran"</string>
-    <string name="policylab_encryptedStorage" msgid="8901326199909132915">"Définir cryptage du stockage"</string>
-    <string name="policydesc_encryptedStorage" msgid="2504984732631479399">"Exiger que les données d\'application stockées soient cryptées"</string>
+    <string name="policylab_encryptedStorage" msgid="8901326199909132915">"Définir chiffrement du stockage"</string>
+    <string name="policydesc_encryptedStorage" msgid="2504984732631479399">"Exiger que les données d\'application stockées soient chiffrées"</string>
   <string-array name="phoneTypes">
     <item msgid="8901098336658710359">"Domicile"</item>
     <item msgid="869923650527136615">"Mobile"</item>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Application redirigée"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> est maintenant lancée."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Application lancée initialement : <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"L\'application <xliff:g id="APPLICATION">%1$s</xliff:g> (processus <xliff:g id="PROCESS">%2$s</xliff:g>) a enfreint ses propres règles du mode strict."</string>
     <string name="smv_process" msgid="5120397012047462446">"Le processus <xliff:g id="PROCESS">%1$s</xliff:g> a enfreint ses propres règles du mode strict."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> en cours d\'exécution"</string>
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index abff655..8f37331 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Nositelju omogućuje slanje namjera administratoru uređaja. Nikad ne bi trebalo koristiti za uobičajene aplikacije."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"promjena orijentacije zaslona"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Aplikaciji omogućuje promjenu rotacije zaslona u svakom trenutku. Nikad ne bi trebalo koristiti za uobičajene aplikacije."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"promjena brzine pokazivača"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Omogućuje aplikaciji promjenu brzine pokazivača miša ili dodirne pločice u bilo koje vrijeme. Ne bi smjelo biti potrebno za normalne aplikacije."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"slanje Linux signala u aplikaciju"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Aplikacijama omogućuje traženje zahtjeva da se dobiveni signal pošalje na sve trajne postupke."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"uvijek pokrenuta aplikacija"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Aplikacija preusmjerena"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> se izvodi sada."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Aplikacija <xliff:g id="APP_NAME">%1$s</xliff:g> pokrenuta je prva."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Aplikacija <xliff:g id="APPLICATION">%1$s</xliff:g> (proces <xliff:g id="PROCESS">%2$s</xliff:g>) prekršila je svoje vlastito pravilo StrictMode."</string>
     <string name="smv_process" msgid="5120397012047462446">"Proces <xliff:g id="PROCESS">%1$s</xliff:g> prekršio je svoje vlastito pravilo StrictMode."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Izvodi se <xliff:g id="APP">%1$s</xliff:g>"</string>
diff --git a/core/res/res/values-hu/strings.xml b/core/res/res/values-hu/strings.xml
index 4119ec1..0d0322e 100644
--- a/core/res/res/values-hu/strings.xml
+++ b/core/res/res/values-hu/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Lehetővé teszi a használó számára, hogy célokat küldjön egy eszközkezelőnek. A normál alkalmazásoknak erre soha nincs szüksége."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"képernyő irányának módosítása"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Lehetővé teszi egy alkalmazás számára a képernyő elforgatásának módosítását. A normál alkalmazásoknak erre soha nincs szüksége."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"mutató sebességének módosítása"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Lehetővé teszi, hogy az alkalmazás bármikor megváltoztassa az egér vagy az érintőpad mutatójának sebességét. Normál alkalmazásoknak soha nem lehet rá szükségük."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"Linux jelek küldése alkalmazásoknak"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Lehetővé teszi az alkalmazás számára, hogy a megadott jelet elküldje az összes állandó folyamatnak."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"alkalmazások folyamatos futtatása"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Alk. átirányítva"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> éppen fut."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> volt eredetileg elindítva."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"<xliff:g id="APPLICATION">%1$s</xliff:g> alkalmazás (<xliff:g id="PROCESS">%2$s</xliff:g> folyamat) megsértette az általa kényszerített Szigorú üzemmód irányelvet."</string>
     <string name="smv_process" msgid="5120397012047462446">"<xliff:g id="PROCESS">%1$s</xliff:g> folyamat megsértette az általa kényszerített Szigorú üzemmód irányelvet."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> fut"</string>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index 431ef11..fcc288a 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Mengizinkan pemegang mengirimkan tujuan kepada administrator perangkat. Tidak diperlukan untuk aplikasi normal."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"ubah orientasi layar"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Mengizinkan aplikasi mengubah rotasi layar kapan saja. Tidak diperlukan untuk aplikasi normal."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"ubah kecepatan penunjuk"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Memungkinkan aplikasi mengubah kecepatan penunjuk mouse atau trackpad kapan saja. Tidak diperlukan untuk aplikasi normal."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"kirim sinyal Linux ke aplikasi"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Mengizinkan aplikasi meminta sinyal yang diberikan untuk dikirimkan ke semua proses yang ada."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"jadikan aplikasi selalu berjalan"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Aplikasi dialihkan"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> sedang berjalan."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> telah diluncurkan aslinya."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Aplikasi <xliff:g id="APPLICATION">%1$s</xliff:g> (proses <xliff:g id="PROCESS">%2$s</xliff:g>) telah melanggar kebijakan StrictMode yang diberlakukan secara otomatis."</string>
     <string name="smv_process" msgid="5120397012047462446">"Proses <xliff:g id="PROCESS">%1$s</xliff:g> telah melanggar kebijakan StrictMode yang diberlakukan secara otomatis."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> berjalan"</string>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index bfdf34f..3fd7ec3 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Consente l\'invio di intent a un amministratore del dispositivo. L\'autorizzazione non deve mai essere necessaria per le normali applicazioni."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"modifica orientamento dello schermo"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Consente a un\'applicazione di cambiare la rotazione dello schermo in qualsiasi momento. Non dovrebbe essere mai necessario per le normali applicazioni."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"cambio velocità del puntatore"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Consente a un\'applicazione di modificare la velocità del puntatore del mouse o del trackpad in qualsiasi momento. Non dovrebbe mai essere necessario per le normali applicazioni."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"invio segnali Linuz alle applicazioni"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Consente all\'applicazione di richiedere l\'invio del segnale fornito a tutti i processi persistenti."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"esecuzione permanente delle applicazioni"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Applicazione reindirizzata"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> è ora in esecuzione."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> già avviata."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"L\'applicazione <xliff:g id="APPLICATION">%1$s</xliff:g> (processo <xliff:g id="PROCESS">%2$s</xliff:g>) ha violato la norma StrictMode autoimposta."</string>
     <string name="smv_process" msgid="5120397012047462446">"Il processo <xliff:g id="PROCESS">%1$s</xliff:g> ha violato la norma StrictMode autoimposta."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> in esecuzione"</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 8e44d85..b24ad33 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"מאפשר למשתמש לשלוח כוונות למנהל התקן. לא אמור להידרש לעולם ביישומים רגילים."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"שנה את כיוון המסך"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"מאפשר ליישום לשנות את סיבוב המסך בכל עת. לא אמור להידרש לעולם ביישומים רגילים."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"שינוי מהירות המצביע"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"מאפשר ליישום לשנות את מהירות מצביע העכבר או משטח העקיבה בכל עת. הגדרה זו אף פעם לא נחוצה עבור יישומים רגילים."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"שלח אותות Linux ליישומים"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"מאפשר ליישום לבקש שהאות המסופק יישלח לכל התהליכים המתמשכים."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"הגדר את היישום לפעול תמיד"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"היישום נותב מחדש"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> פועל כעת."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> הופעל במקור."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"היישום <xliff:g id="APPLICATION">%1$s</xliff:g> (תהליך <xliff:g id="PROCESS">%2$s</xliff:g>) הפר את מדיניות StrictMode באכיפה עצמית."</string>
     <string name="smv_process" msgid="5120397012047462446">"התהליך <xliff:g id="PROCESS">%1$s</xliff:g> הפר את מדיניות StrictMode באכיפה עצמית."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> פועל"</string>
diff --git a/core/res/res/values-ja/strings.xml b/core/res/res/values-ja/strings.xml
index e55b512..5a87b30 100644
--- a/core/res/res/values-ja/strings.xml
+++ b/core/res/res/values-ja/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"デバイス管理者へのintentの送信を所有者に許可します。通常のアプリケーションでは不要です。"</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"画面の向きの変更"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"いつでも画面の回転を変更することをアプリケーションに許可します。通常のアプリケーションにはまったく必要ありません。"</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"ポインタの速度の変更"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"マウスまたはトラックパッドのポインタの速度をいつでも変更することをアプリケーションに許可します。通常のアプリケーションではまったく必要ありません。"</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"Linuxのシグナルをアプリケーションに送信"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"受信した電波を継続プロセスに送信することをアプリケーションに許可します。"</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"アプリケーションを常に実行する"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"アプリのリダイレクト"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g>が実行中です。"</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g>が最初に起動していました。"</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"アプリケーション<xliff:g id="APPLICATION">%1$s</xliff:g>(プロセス<xliff:g id="PROCESS">%2$s</xliff:g>)でStrictModeポリシー違反がありました。"</string>
     <string name="smv_process" msgid="5120397012047462446">"プロセス<xliff:g id="PROCESS">%1$s</xliff:g>でStrictModeポリシー違反がありました。"</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g>を実行中"</string>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index be29419..e1d163b 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"보유자가 기기 관리자에게 인텐트를 보낼 수 있도록 합니다. 일반 애플리케이션에는 절대로 필요하지 않습니다."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"화면 방향 변경"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"애플리케이션이 언제든지 화면 회전을 변경할 수 있도록 합니다. 일반 애플리케이션에는 절대로 필요하지 않습니다."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"포인터 속도 변경"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"애플리케이션이 언제든지 마우스 또는 트랙패드 포인터의 속도를 변경할 수 있도록 합니다. 일반 애플리케이션에는 절대로 필요하지 않습니다."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"애플리케이션에 Linux 시그널 보내기"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"애플리케이션이 제공된 시그널을 모든 영구 프로세스로 보내도록 요청할 수 있도록 합니다."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"애플리케이션이 항상 실행되도록 설정"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"애플리케이션 리디렉션됨"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g>이(가) 실행 중입니다."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"원래 <xliff:g id="APP_NAME">%1$s</xliff:g>을(를) 실행했습니다."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"애플리케이션 <xliff:g id="APPLICATION">%1$s</xliff:g>(프로세스 <xliff:g id="PROCESS">%2$s</xliff:g>)이(가) 자체 시행 StrictMode 정책을 위반했습니다."</string>
     <string name="smv_process" msgid="5120397012047462446">"프로세스(<xliff:g id="PROCESS">%1$s</xliff:g>)가 자체 시행 StrictMode 정책을 위반했습니다."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> 실행 중"</string>
diff --git a/core/res/res/values-lt/strings.xml b/core/res/res/values-lt/strings.xml
index 4e92222..f2ebb7c 100644
--- a/core/res/res/values-lt/strings.xml
+++ b/core/res/res/values-lt/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Leidžia savininkui siųsti tikslus įrenginio administratoriui. Neturėtų reikėti įprastose programose."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"keisti ekrano padėtį"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Leidžia programai bet kuriuo metu keisti ekrano sukimą. Neturėtų reikėti įprastoms programoms."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"keisti žymiklio greitį"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Galima programa bet kuriuo metu pakeisti pelės ar jutiklinės planšetės žymiklio greitį. Nereikalingas naudojant įprastas programas."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"programoms siųsti „Linux“ signalus"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Leidžia programai pateikti užklausą, kad teikiamas signalas būtų siunčiamas visiems nuolatiniams procesams."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"nustatyti, kad programa būtų visada paleista"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Programa nukreipta"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"„<xliff:g id="APP_NAME">%1$s</xliff:g>“ dabar vykdoma."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"„<xliff:g id="APP_NAME">%1$s</xliff:g>“ buvo iš pradžių paleista."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Programa „<xliff:g id="APPLICATION">%1$s</xliff:g>“ (procesas „<xliff:g id="PROCESS">%2$s</xliff:g>“) pažeidė savo vykdomą „StrictMode“ politiką."</string>
     <string name="smv_process" msgid="5120397012047462446">"„<xliff:g id="PROCESS">%1$s</xliff:g>“ procesas pažeidė savo vykdomą „StrictMode“ politiką."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Vykdoma „<xliff:g id="APP">%1$s</xliff:g>“"</string>
diff --git a/core/res/res/values-lv/strings.xml b/core/res/res/values-lv/strings.xml
index a569845..301d9aa 100644
--- a/core/res/res/values-lv/strings.xml
+++ b/core/res/res/values-lv/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Ļauj īpašniekam sūtīt nolūkus ierīces administratoram. Nekad nav nepieciešams parastajām lietojumprogrammām."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"mainīt ekrāna orientāciju"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Ļauj lietojumprogrammai jebkurā brīdī mainīt ekrāna pagriešanas iestatījumu. Parastajām lietojumprogrammām nekad nav nepieciešama."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"Rādītāja ātruma mainīšana"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Ļauj lietojumprogrammai jebkurā laikā mainīt peles vai skārienpaliktņa rādītāja ātrumu. Parastās lietojumprogrammās šī funkcija nav nepieciešama."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"sūtīt Linux signālus uz lietojumprogrammām"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Ļauj lietojumprogrammai pieprasīt, lai piegādātais signāls tiktu sūtīts uz visiem pastāvīgajiem procesiem."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"likt lietojumprogrammai vienmēr darboties"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Lietojumpr. ir novirzīta"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> tagad darbojas."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Sākotnēji tika palaista lietojumprogramma <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Lietojumprogramma <xliff:g id="APPLICATION">%1$s</xliff:g> (process <xliff:g id="PROCESS">%2$s</xliff:g>) ir pārkāpusi savu pašieviesto StrictMode politiku."</string>
     <string name="smv_process" msgid="5120397012047462446">"Process <xliff:g id="PROCESS">%1$s</xliff:g> ir pārkāpis savu pašieviesto StrictMode politiku."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> darbojas"</string>
diff --git a/core/res/res/values-nb/strings.xml b/core/res/res/values-nb/strings.xml
index a02b762..2c2a701 100644
--- a/core/res/res/values-nb/strings.xml
+++ b/core/res/res/values-nb/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Tillater innehaveren å sende hensikter til enhetsadministrator. Bør aldri være nødvendig for normale programmer."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"snu skjermen"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Lar applikasjonen rotere skjermen når som helst. Vanlige applikasjoner bør aldri trenge dette."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"endre pekerhastighet"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Tillater at en applikasjon endrer hastigheten til musen eller styreflatepekeren til enhver tid. Skal aldri være nødvendig ved normal bruk."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"sende Linux-signaler til applikasjoner"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Lar applikasjonen spørre om at et gitt signal blir sendt til alle varige prosesser."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"forbli kjørende"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Programmet er omdirigert"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> kjører nå."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> ble opprinnelig startet."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Programmet <xliff:g id="APPLICATION">%1$s</xliff:g> (prosessen <xliff:g id="PROCESS">%2$s</xliff:g>) har brutt de selvpålagte StrictMode-retningslinjene."</string>
     <string name="smv_process" msgid="5120397012047462446">"Prosessen<xliff:g id="PROCESS">%1$s</xliff:g> har brutt de selvpålagte StrictMode-retningslinjene."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> kjører"</string>
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 0dedb46..86342c0 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Staat de houder toe intenties te verzenden naar een apparaatbeheerder. Nooit vereist voor normale toepassingen."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"schermstand wijzigen"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Hiermee kan een app op elk gewenst moment de oriëntatie van het scherm wijzigen. Nooit vereist voor normale apps."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"aanwijzersnelheid wijzigen"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Hiermee kan een app de snelheid van de muis- of trackpadaanwijzer op elk moment wijzigen. Dit zou voor normale apps niet nodig moeten zijn."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"Linux-signalen verzenden naar toepassingen"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Hiermee kan de app ervoor zorgen dat het geleverde signaal wordt verzonden naar alle persistente processen."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"app altijd laten uitvoeren"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"App omgeleid"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> is nu actief."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> was het eerst gestart."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"De app <xliff:g id="APPLICATION">%1$s</xliff:g> (proces <xliff:g id="PROCESS">%2$s</xliff:g>) heeft het zelf afgedwongen StrictMode-beleid geschonden."</string>
     <string name="smv_process" msgid="5120397012047462446">"Het proces <xliff:g id="PROCESS">%1$s</xliff:g> heeft het zelf afgedwongen StrictMode-beleid geschonden."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> wordt uitgevoerd"</string>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 815d278..8187595 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Zezwala posiadaczowi na wysyłanie informacji o zamiarach do administratora urządzenia. Opcja nie powinna być nigdy potrzebna w przypadku zwykłych aplikacji."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"zmienianie orientacji ekranu"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Pozwala aplikacji na zmianę orientacji ekranu w dowolnym momencie. Nigdy nie powinno być potrzeby stosowania w normalnych aplikacjach."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"zmiana szybkości wskaźnika"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Umożliwia aplikacji zmianę szybkości poruszania wskaźnikiem myszy lub panelu dotykowego w dowolnym momencie. Nie powinno to być nigdy wymagane przez zwykłe aplikacje."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"wysyłanie sygnałów systemu Linux do aplikacji"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Pozwala aplikacjom żądać, aby dostarczany sygnał był wysyłany do wszystkich trwających procesów."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"sprawianie, że aplikacja jest cały czas uruchomiona"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Aplikacja przekierowana"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"Aplikacja <xliff:g id="APP_NAME">%1$s</xliff:g> jest uruchomiona."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Aplikacja <xliff:g id="APP_NAME">%1$s</xliff:g> została pierwotnie uruchomiona."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Aplikacja <xliff:g id="APPLICATION">%1$s</xliff:g> (proces <xliff:g id="PROCESS">%2$s</xliff:g>) naruszyła wymuszone przez siebie zasady StrictMode."</string>
     <string name="smv_process" msgid="5120397012047462446">"Proces <xliff:g id="PROCESS">%1$s</xliff:g> naruszył wymuszone przez siebie zasady StrictMode."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Działa <xliff:g id="APP">%1$s</xliff:g>"</string>
diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml
index 352d278..87492e5 100644
--- a/core/res/res/values-pt-rPT/strings.xml
+++ b/core/res/res/values-pt-rPT/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite ao titular enviar intenções para um administrador do dispositivo. Nunca deverá ser necessário para aplicações normais."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"mudar orientação do ecrã"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Permite a uma aplicação mudar a rotação do ecrã em qualquer momento. Nunca deve ser necessário para aplicações normais."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"alterar a veloc. do ponteiro"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Permite que uma aplicação mude a velocidade do ponteiro do rato ou do trackpad a qualquer momento. Não deverá ser necessário em aplicações normais."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"enviar sinais Linux para aplicações"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Permite à aplicação pedir que o sinal fornecido seja enviado a todos os processos persistentes."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"fazer com que a aplicação seja sempre executada"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Aplicação redireccionada"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> está agora a ser executado."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> foi originalmente iniciado."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"A aplicação <xliff:g id="APPLICATION">%1$s</xliff:g> (processo <xliff:g id="PROCESS">%2$s</xliff:g>) violou a política StrictMode auto-imposta."</string>
     <string name="smv_process" msgid="5120397012047462446">"O processo <xliff:g id="PROCESS">%1$s</xliff:g> violou a política StrictMode auto-imposta."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> em execução"</string>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 2de9780..c3d2088 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite que o detentor envie tentativas ao administrador de um dispositivo. Não é necessário para aplicativos normais."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"alterar orientação da tela"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Permite que um aplicativo altere a rotação da tela a qualquer momento. Aplicativos normais não devem precisar disso em momento algum."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"alterar velocidade do ponteiro"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Permite que um aplicativo altere a velocidade do ponteiro do mouse ou do trackpad a qualquer momento. Nunca será necessário para aplicativos normais."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"enviar sinais de Linux para os aplicativos"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Permite que o aplicativo solicite que o sinal fornecido seja enviado a todos os processos persistentes."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"executar sempre o aplicativo"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Aplicativo redirecionado"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> não está em execução."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> foi iniciado."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"O aplicativo <xliff:g id="APPLICATION">%1$s</xliff:g> (processo <xliff:g id="PROCESS">%2$s</xliff:g>) violou a política StrictMode imposta automaticamente."</string>
     <string name="smv_process" msgid="5120397012047462446">"O processo <xliff:g id="PROCESS">%1$s</xliff:g> violou a política StrictMode imposta automaticamente."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> em execução"</string>
diff --git a/core/res/res/values-rm/strings.xml b/core/res/res/values-rm/strings.xml
index f98d57e..9d82f43 100644
--- a/core/res/res/values-rm/strings.xml
+++ b/core/res/res/values-rm/strings.xml
@@ -267,6 +267,10 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permetta al possessur da trametter intenziuns a l\'administratur dal apparat periferic. Betg previs per applicaziuns normalas."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"midar l\'orientaziun dal visur"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Permetta a l\'applicaziun da midar da tut temp la orientaziun dal visur. Betg previs per applicaziuns normalas."</string>
+    <!-- no translation found for permlab_setPointerSpeed (9175371613322562934) -->
+    <skip />
+    <!-- no translation found for permdesc_setPointerSpeed (137436038503379864) -->
+    <skip />
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"trametter signals Linux a las applicaziuns"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Permetta a l\'applicaziun da pretender ch\'il signal furnì vegnia tramess a tut ils process persistents."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"exequir permanentamain applicaziuns"</string>
@@ -887,6 +891,12 @@
     <skip />
     <!-- no translation found for launch_warning_original (188102023021668683) -->
     <skip />
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"L\'applicaziun <xliff:g id="APPLICATION">%1$s</xliff:g> (process <xliff:g id="PROCESS">%2$s</xliff:g>) ha violà sia atgna directiva StrictMode."</string>
     <string name="smv_process" msgid="5120397012047462446">"Il process <xliff:g id="PROCESS">%1$s</xliff:g> ha violà sia atgna directiva StrictMode."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> vegn exequida"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 74d77e6..93f7a25 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Permite proprietarului să trimită intenţii către un administrator al dispozitivului. Nu ar trebui să fie niciodată necesară pentru aplicaţiile obişnuite."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"modificare orientare ecran"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Permite unei aplicaţii să modifice rotaţia ecranului în orice moment. Nu ar trebui să fie niciodată necesară pentru aplicaţiile obişnuite."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"modifică viteza indicatorului"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Permite unei aplicaţii să modifice oricând viteza indicatorului mouse-ului sau a trackpadului. Nu ar trebui să fie necesară pentru aplicaţiile obişnuite."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"trimitere semnale Linux către aplicaţii"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Permite aplicaţiei să solicite trimiterea semnalului furnizat către toate procesele persistente."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"rulare întotdeauna a aplicaţiei"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Aplicaţie redirecţionată"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> funcţionează acum."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> a fost lansată iniţial."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Aplicaţia <xliff:g id="APPLICATION">%1$s</xliff:g> (procesul <xliff:g id="PROCESS">%2$s</xliff:g>) a încălcat propria politică StrictMode."</string>
     <string name="smv_process" msgid="5120397012047462446">"Procesul <xliff:g id="PROCESS">%1$s</xliff:g> a încălcat propria politică StrictMode."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Rulează <xliff:g id="APP">%1$s</xliff:g>"</string>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index b2c4c27..5a4e934 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Позволяет владельцу отправлять целевые значения администратору устройства. Никогда не используется обычными приложениями."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"изменять ориентацию экрана"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Позволяет приложению изменять ориентацию экрана в любое время. Не требуется для обычных приложений."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"изменять скорость указателя"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Позволяет приложению изменять скорость указателя мыши или трекпада. Для большинства приложений это не требуется."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"отправлять приложениям сигналы Linux"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Позволяет приложению направлять запрос на передачу предоставленного сигнала всем постоянным процессам."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"запускать постоянную работу приложения"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Приложение перенаправлено"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"Приложение <xliff:g id="APP_NAME">%1$s</xliff:g> выполняется."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Изначально было запущено приложение <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Приложение <xliff:g id="APPLICATION">%1$s</xliff:g> (процесс <xliff:g id="PROCESS">%2$s</xliff:g>) нарушило собственную политику StrictMode."</string>
     <string name="smv_process" msgid="5120397012047462446">"Процесс <xliff:g id="PROCESS">%1$s</xliff:g> нарушил собственную политику StrictMode."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Приложение <xliff:g id="APP">%1$s</xliff:g> запущено"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 567f184..a26145e 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Umožňuje držiteľovi odosielať informácie správcovi zariadenia. Bežné aplikácie by toto oprávnenie nemali nikdy požadovať."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"zmena orientácie obrazovky"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Umožňuje aplikácii kedykoľvek zmeniť orientáciu obrazovky. Bežné aplikácie by toto nastavenie nemali vôbec využívať."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"zmena rýchlosti ukazovateľa"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Umožňuje aplikácii kedykoľvek zmeniť rýchlosť ukazovateľa myši alebo trackpadu. Bežné aplikácie by toto oprávnenie nemali nikdy požadovať."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"odoslanie signálov systému Linux aplikáciám"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Umožňuje aplikácii vyžiadať zaslanie poskytnutého signálu všetkým trvalým procesom."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"trvalé spustenie aplikácie"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Aplikácia bola presmerov."</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"Je spustená aplikácia <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Pôvodne bola spustená aplikácia <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Aplikácia <xliff:g id="APPLICATION">%1$s</xliff:g> (proces <xliff:g id="PROCESS">%2$s</xliff:g>) porušila svoje vlastné vynútené pravidlá StrictMode."</string>
     <string name="smv_process" msgid="5120397012047462446">"Proces <xliff:g id="PROCESS">%1$s</xliff:g> porušil svoje vlastné vynútené pravidlá StrictMode."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Spustená aplikácia: <xliff:g id="APP">%1$s</xliff:g>"</string>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index be34700..51c254c 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Dovoljuje lastniku, da pošlje namere skrbniku naprave. Nikoli se ne uporablja za navadne programe."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"spreminjanje usmerjenosti zaslona"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Dovoljuje, da program kadar koli spremeni smer sukanja zaslona. Tega nikoli ni treba uporabiti za navadne programe."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"spreminjanje hitrosti kazalca"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Dovoli programu, da kadar koli spremeni hitrost kazalca miške ali sledilne ploščice. Tega nikoli ni treba uporabiti za navadne programe."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"pošiljanje signalov Linuxa programom"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Dovoljuje, da program zahteva, da je posredovan signal poslan vsem trajnim procesom."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"neprekinjeno izvajanje programov"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Preusmeritev programa"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> se izvaja."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Prvotno je bil zagnan program <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Program <xliff:g id="APPLICATION">%1$s</xliff:g> (proces <xliff:g id="PROCESS">%2$s</xliff:g>) krši svoj samoizvedljivi pravilnik o strogem načinu."</string>
     <string name="smv_process" msgid="5120397012047462446">"Proces <xliff:g id="PROCESS">%1$s</xliff:g> krši svoj samoizvedljivi pravilnik o strogem načinu."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> se izvaja"</string>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 2d2002d..184f713d 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Омогућава власнику да шаље своје намере администратору уређаја. Обичне апликације никада не би требало да је користе."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"промена положаја екрана"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Омогућава да апликација у сваком тренутку промени ротацију екрана. Обичне апликације никада не би требало да је користе."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"промена брзине показивача"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Дозвољава апликацији да у било ком тренутку промени брзину показивача миша или показивачког уређаја са плочицом. Никада не би требало да буде потребно за обичне апликације."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"слање Linux сигнала апликацијама"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Омогућава да апликација захтева да испоручени сигнал буде послат свим трајним процесима."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"омогућавање непрекидне активности апликације"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Апликација је преусмерена"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"Апликација <xliff:g id="APP_NAME">%1$s</xliff:g> је сада покренута."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Првобитно је покренута апликација <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Апликација <xliff:g id="APPLICATION">%1$s</xliff:g> (процес <xliff:g id="PROCESS">%2$s</xliff:g>) је прекршила самонаметнуте StrictMode смернице."</string>
     <string name="smv_process" msgid="5120397012047462446">"Процес <xliff:g id="PROCESS">%1$s</xliff:g> је прекршио самонаметнуте StrictMode смернице."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Апликација <xliff:g id="APP">%1$s</xliff:g> је покренута"</string>
diff --git a/core/res/res/values-sv/strings.xml b/core/res/res/values-sv/strings.xml
index 51d1558..ff59b5f 100644
--- a/core/res/res/values-sv/strings.xml
+++ b/core/res/res/values-sv/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Tillåter att innehavaren skickar avsikter till en enhetsadministratör. Vanliga program behöver aldrig göra detta."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"ändra bildskärmens rikting"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Tillåter att ett program när som helst ändrar skärmens rotering. Behövs inte för vanliga program."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"ändra markörens hastighet"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Tillåter att en app när som helst ändrar hastigheten för musens eller styrplattans markör. Ska inte behövas för vanliga appar."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"skicka Linux-signaler till appar"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Tillåter att programmet begär att den angivna signalen skickas till alla beständiga processer."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"se till att programmet alltid körs"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Programmet omdirigerades"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> körs."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> startades först."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Programmet <xliff:g id="APPLICATION">%1$s</xliff:g> (processen <xliff:g id="PROCESS">%2$s</xliff:g>) har brutit mot sin egen StrictMode-policy."</string>
     <string name="smv_process" msgid="5120397012047462446">"Processen <xliff:g id="PROCESS">%1$s</xliff:g> har brutit mot sin egen StrictMode-policy."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> körs"</string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index e04415f..943428a4 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"อนุญาตให้ผู้ถือส่งเนื้อหาไปยังโปรแกรมควบคุมอุปกรณ์ ไม่ควรต้องใช้สำหรับแอปพลิเคชันทั่วไป"</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"เปลี่ยนการวางแนวหน้าจอ"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"อนุญาตให้แอปพลิเคชันเปลี่ยนการหมุนหน้าจอได้ตลอดเวลา ไม่ควรต้องใช้สำหรับแอปพลิเคชันทั่วไป"</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"เปลี่ยนความเร็วของตัวชี้"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"อนุญาตให้แอปพลิเคชันเปลี่ยนความเร็วของตัวชี้ของเมาส์หรือแทร็กแพดได้ตลอดเวลา ไม่จำเป็นสำหรับแอปพลิเคชันทั่วไป"</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"ส่งสัญญาณ Linux ไปยังแอปพลิเคชัน"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"อนุญาตให้แอปพลิเคชันร้องขอให้ส่งสัญญาณแจ้งไปยังกระบวนการที่ยังทำงานอยู่ทั้งหมด"</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"ทำให้แอปพลิเคชันทำงานตลอดเวลา"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"เปลี่ยนเส้นทางแอปพลิเคชัน"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> กำลังทำงานอยู่ในขณะนี้"</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> เปิดใช้ไว้แล้ว"</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"แอปพลิเคชัน <xliff:g id="APPLICATION">%1$s</xliff:g> (กระบวนการ <xliff:g id="PROCESS">%2$s</xliff:g>) ละเมิดนโยบาย StrictMode ที่บังคับใช้ด้วยตัวเอง"</string>
     <string name="smv_process" msgid="5120397012047462446">"กระบวนการ <xliff:g id="PROCESS">%1$s</xliff:g> ละเมิดนโยบาย StrictMode ที่บังคับใช้ด้วยตัวเอง"</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> กำลังทำงาน"</string>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index deb39f2..3cf8704 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Pinapayagan ang holder na magpadala ng mga intensyon sa administrator ng device. Hindi kailanman dapat kailanganin para sa mga normal na application."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"baguhin ang orientation ng screen"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Pinapayagan ang isang application na baguhin ang pag-rotate ng screen anumang oras. Hindi kailanman dapat kailanganin para sa mga normal na application."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"baguhin ang bilis ng pointer"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Pinapayagan ang isang application na baguhin ang bilis ng mouse o trackpad pointer anumang oras. Dapat na hindi kailanman kailanganin para sa mga normal na application."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"magpadala ng mga Linux signal sa mga application"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Pinapayagan ang application na hilinging ipadala ang na-supply na signal sa lahat ng mga paulit-ulit na proseso."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"palaging patakbuhin ang mga application"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Ni-redirect application"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"Tumatakbo na ngayon ang <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Orihinal na nalunsad ang <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Ang application na <xliff:g id="APPLICATION">%1$s</xliff:g> (prosesong <xliff:g id="PROCESS">%2$s</xliff:g>) ay lumabag sa sarili nitong ipinapatupad na patakarang StrictMode."</string>
     <string name="smv_process" msgid="5120397012047462446">"Ang prosesong <xliff:g id="PROCESS">%1$s</xliff:g> ay lumabag sa sarili nitong ipinapatupad na patakarang StrictMode."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Tumatakbo ang <xliff:g id="APP">%1$s</xliff:g>"</string>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 5d9405a..6668c47 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Cihazın sahibinin cihaz yöneticisine amaç göndermesine izin verir. Normal uygulamalarda hiçbir zaman gerek duyulmamalıdır."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"ekran yönünü değiştir"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Uygulamaların ekran yönünü istedikleri zaman değiştirmesine izin verir. Normal uygulamalarda hiçbir zaman gerekmemelidir."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"işaretçi hızını değiştir"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Bir uygulamanın herhangi bir zamanda fare veya izleme yüzeyi işaretleme hızını değiştirmesine izin verir. Normal uygulamalar tarafından hiçbir zaman kullanılması gerekmez."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"uygulamalara Linux sinyalleri gönder"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Uygulamaların, sağlanan sinyalin tüm kalıcı işlemlere gönderilmesini istemesine izin verir."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"uygulamayı her zaman çalıştır"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Uygulama yönlendirildi"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> şimdi çalışıyor."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"İlk olarak <xliff:g id="APP_NAME">%1$s</xliff:g> başlatıldı."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"<xliff:g id="APPLICATION">%1$s</xliff:g> uygulaması (<xliff:g id="PROCESS">%2$s</xliff:g> işlemi) kendiliğinden uyguladığı StrictMode politikasını ihlal etti."</string>
     <string name="smv_process" msgid="5120397012047462446">"<xliff:g id="PROCESS">%1$s</xliff:g> işlemi kendiliğinden uyguladığı StrictMode politikasını ihlal etti."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> çalışıyor"</string>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index 78f3ac7..f95c6f9 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Дозволяє власнику надсилати цілі адміністратору пристрою. Ніколи не потрібний для звичайних програм."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"змінювати орієнтацію екрана"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Дозволяє програмі будь-коли змінювати обертання екрана. Ніколи не потрібний для звичайних програм."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"змінювати швидкість указівника"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Дозволяє програмі будь-коли змінювати швидкість вказівника миші чи сенсорної панелі. Ніколи не застосовується для звичайних програм."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"надсилати сигнали Linux програмам"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Дозволяє програмі подавати запит щодо надсилання наданого сигналу всім постійним процесам."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"збер. програму завжди запущ."</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Програму переадресовано"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"Зараз працює <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"Спочатку було запущено <xliff:g id="APP_NAME">%1$s</xliff:g>."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Програма <xliff:g id="APPLICATION">%1$s</xliff:g> (процес <xliff:g id="PROCESS">%2$s</xliff:g>) порушила свою самозастосовну політику StrictMode."</string>
     <string name="smv_process" msgid="5120397012047462446">"Процес <xliff:g id="PROCESS">%1$s</xliff:g> порушив свою самозастосовну політику StrictMode."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"Працює <xliff:g id="APP">%1$s</xliff:g>"</string>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index e35b085..7b939ed 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"Cho phép chủ nhân gửi các ý định đến quản trị viên thiết bị. Không cần thiết cho các ứng dụng thông thường."</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"thay đổi hướng màn hình"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"Cho phép ứng dụng thay đổi việc xoay màn hình bất kỳ khi nào. Không cần thiết cho các ứng dụng thông thường."</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"thay đổi tốc độ con trỏ"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"Cho phép ứng dụng thay đổi tốc độ chuột hoặc con trỏ ô di chuột vào bất kỳ lúc nào. Không bao giờ cần cho các ứng dụng thông thường."</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"gửi tín hiệu Linux đến ứng dụng"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Cho phép ứng dụng yêu cầu tín hiệu đã cung cấp được gửi đến tất cả các quá trình liên tục."</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"đặt ứng dụng luôn chạy"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"Ứng dụng đã được chuyển hướng"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g> hiện đang chạy."</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g> được khởi chạy trước tiên."</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"Ứng dụng <xliff:g id="APPLICATION">%1$s</xliff:g> (quá trình <xliff:g id="PROCESS">%2$s</xliff:g>) đã vi phạm chính sách StrictMode tự thi hành của mình."</string>
     <string name="smv_process" msgid="5120397012047462446">"Quá trình <xliff:g id="PROCESS">%1$s</xliff:g> đã vi phạm chính sách StrictMode tự thi hành của mình."</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> đang hoạt động"</string>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index aecd857d..b919601 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"允许持有对象将意向发送到设备管理器。普通的应用程序一律无需此权限。"</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"更改屏幕显示方向"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"允许应用程序随时更改屏幕的旋转方向。普通应用程序从不需要使用此权限。"</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"更改指针速度"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"允许应用程序随时更改鼠标或触摸板的指针速度。普通应用程序不需要此权限。"</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"向应用程序发送 Linux 信号"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"允许应用程序请求将所提供的信号发送给所有持久进程。"</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"让应用程序始终运行"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"应用程序已重定向"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"<xliff:g id="APP_NAME">%1$s</xliff:g>目前正在运行。"</string>
     <string name="launch_warning_original" msgid="188102023021668683">"<xliff:g id="APP_NAME">%1$s</xliff:g>已启动。"</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"应用程序<xliff:g id="APPLICATION">%1$s</xliff:g>(<xliff:g id="PROCESS">%2$s</xliff:g> 进程)违反了自我强制执行的严格模式 (StrictMode) 政策。"</string>
     <string name="smv_process" msgid="5120397012047462446">"进程 <xliff:g id="PROCESS">%1$s</xliff:g> 违反了自我强制执行的严格模式 (StrictMode) 政策。"</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g>正在运行"</string>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 6da6252..5849115 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -261,6 +261,8 @@
     <string name="permdesc_bindDeviceAdmin" msgid="8714424333082216979">"允許應用程式將調用請求 (intent) 傳送至裝置管理員;一般應用程式不需使用此選項。"</string>
     <string name="permlab_setOrientation" msgid="3365947717163866844">"變更螢幕顯示方向"</string>
     <string name="permdesc_setOrientation" msgid="6335814461615851863">"允許應用程式可隨時變更螢幕旋轉方向。一般應用不應使用這項功能。"</string>
+    <string name="permlab_setPointerSpeed" msgid="9175371613322562934">"變更指標速度"</string>
+    <string name="permdesc_setPointerSpeed" msgid="137436038503379864">"允許應用程式可以隨時變更滑鼠或觸控板指標的移動速度,一般應用程式不需使用這個選項。"</string>
     <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"傳送 Linux 訊號到應用程式"</string>
     <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"允許應用程式要求將支援的訊號傳送到所有持續的程序。"</string>
     <string name="permlab_persistentActivity" msgid="8659652042401085862">"設定應用程式持續執行"</string>
@@ -830,6 +832,12 @@
     <string name="launch_warning_title" msgid="8323761616052121936">"應用程式已重新導向"</string>
     <string name="launch_warning_replace" msgid="6202498949970281412">"「<xliff:g id="APP_NAME">%1$s</xliff:g>」現在正在執行。"</string>
     <string name="launch_warning_original" msgid="188102023021668683">"「<xliff:g id="APP_NAME">%1$s</xliff:g>」原先已啟動。"</string>
+    <!-- no translation found for screen_compat_mode_scale (3202955667675944499) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_show (4013878876486655892) -->
+    <skip />
+    <!-- no translation found for screen_compat_mode_hint (2953716574198046484) -->
+    <skip />
     <string name="smv_application" msgid="295583804361236288">"應用程式 <xliff:g id="APPLICATION">%1$s</xliff:g> (處理程序 <xliff:g id="PROCESS">%2$s</xliff:g>) 已違反其自行強制實施的嚴格模式 (StrictMode) 政策。"</string>
     <string name="smv_process" msgid="5120397012047462446">"處理程序 <xliff:g id="PROCESS">%1$s</xliff:g> 已違反其自行強制實施的嚴格模式 (StrictMode) 政策。"</string>
     <string name="heavy_weight_notification" msgid="9087063985776626166">"<xliff:g id="APP">%1$s</xliff:g> 執行中"</string>
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index 41c4c29..38790ea 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -1035,6 +1035,17 @@
              used with this attribute are 320 for a phone screen, 600 for a
              7" tablet, and 720 for a 10" tablet. -->
         <attr name="compatibleWidthLimitDp" format="integer" />
+        <!-- Starting with {@link android.os.Build.VERSION_CODES#HONEYCOMB_MR2},
+             this is the new way to specify the screens an application is
+             compatible with.  This attribute provides the maximum
+             "smallest screen width" (as per the -swNNNdp resource configuration)
+             that the application can work well on.  If this value is smaller than
+             the "smallest screen width" of the device it is running on, the
+             application will be forced in to screen compatibility mode with
+             no way for the user to turn it off.  Currently the compatibility mode
+             only emulates phone screens, so even if this value is larger than 320
+             the width the app runs in will be a 320 phone dimension. -->
+        <attr name="largestWidthLimitDp" format="integer" />
         <!-- Indicates whether the application supports smaller screen form-factors.
              A small screen is defined as one with a smaller aspect ratio than
              the traditional HVGA screen; that is, for a portrait screen, less
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 27ca952..27b87df 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1651,9 +1651,53 @@
 
 
 <!-- ===============================================================
-     Resources added in version 13 of the platform (Honeycomb MR 2)
+     Resources added in version 13 of the platform (Honeycomb MR 2 / 3.2)
      =============================================================== -->
   <eat-comment />
   <public type="attr" name="requiresSmallestWidthDp" id="0x01010364" />
-  <public type="attr" name="compatibleWidthLimitDp" />
+  <public type="attr" name="compatibleWidthLimitDp" id="0x01010365" />
+  <public type="attr" name="largestWidthLimitDp" id="0x01010366" />
+
+  <public type="style" name="Theme.Holo.Light.NoActionBar" id="0x010300f0" />
+  <public type="style" name="Theme.Holo.Light.NoActionBar.Fullscreen" id="0x010300f1" />
+
+  <public type="style" name="Widget.ActionBar.TabView" id="0x010300f2" />
+  <public type="style" name="Widget.ActionBar.TabText" id="0x010300f3" />
+  <public type="style" name="Widget.ActionBar.TabBar" id="0x010300f4" />
+  <public type="style" name="Widget.Holo.ActionBar.TabView" id="0x010300f5" />
+  <public type="style" name="Widget.Holo.ActionBar.TabText" id="0x010300f6" />
+  <public type="style" name="Widget.Holo.ActionBar.TabBar" id="0x010300f7" />
+  <public type="style" name="Widget.Holo.Light.ActionBar.TabView" id="0x010300f8" />
+  <public type="style" name="Widget.Holo.Light.ActionBar.TabText" id="0x010300f9" />
+  <public type="style" name="Widget.Holo.Light.ActionBar.TabBar" id="0x010300fa" />
+  <public type="style" name="TextAppearance.Holo" id="0x010300fb" />
+  <public type="style" name="TextAppearance.Holo.Inverse" id="0x010300fc" />
+  <public type="style" name="TextAppearance.Holo.Large" id="0x010300fd" />
+  <public type="style" name="TextAppearance.Holo.Large.Inverse" id="0x010300fe" />
+  <public type="style" name="TextAppearance.Holo.Medium" id="0x010300ff" />
+  <public type="style" name="TextAppearance.Holo.Medium.Inverse" id="0x01030100" />
+  <public type="style" name="TextAppearance.Holo.Small" id="0x01030101" />
+  <public type="style" name="TextAppearance.Holo.Small.Inverse" id="0x01030102" />
+  <public type="style" name="TextAppearance.Holo.SearchResult.Title" id="0x01030103" />
+  <public type="style" name="TextAppearance.Holo.SearchResult.Subtitle" id="0x01030104" />
+  <public type="style" name="TextAppearance.Holo.Widget" id="0x01030105" />
+  <public type="style" name="TextAppearance.Holo.Widget.Button" id="0x01030106" />
+  <public type="style" name="TextAppearance.Holo.Widget.IconMenu.Item" id="0x01030107" />
+  <public type="style" name="TextAppearance.Holo.Widget.TabWidget" id="0x01030108" />
+  <public type="style" name="TextAppearance.Holo.Widget.TextView" id="0x01030109" />
+  <public type="style" name="TextAppearance.Holo.Widget.TextView.PopupMenu" id="0x0103010a" />
+  <public type="style" name="TextAppearance.Holo.Widget.DropDownHint" id="0x0103010b" />
+  <public type="style" name="TextAppearance.Holo.Widget.DropDownItem" id="0x0103010c" />
+  <public type="style" name="TextAppearance.Holo.Widget.TextView.SpinnerItem" id="0x0103010d" />
+  <public type="style" name="TextAppearance.Holo.Widget.EditText" id="0x0103010e" />
+  <public type="style" name="TextAppearance.Holo.Widget.PopupMenu" id="0x0103010f" />
+  <public type="style" name="TextAppearance.Holo.Widget.PopupMenu.Large" id="0x01030110" />
+  <public type="style" name="TextAppearance.Holo.Widget.PopupMenu.Small" id="0x01030111" />
+  <public type="style" name="TextAppearance.Holo.Widget.ActionBar.Title" id="0x01030112" />
+  <public type="style" name="TextAppearance.Holo.Widget.ActionBar.Subtitle" id="0x01030113" />
+  <public type="style" name="TextAppearance.Holo.Widget.ActionMode.Title" id="0x01030114" />
+  <public type="style" name="TextAppearance.Holo.Widget.ActionMode.Subtitle" id="0x01030115" />
+  <public type="style" name="TextAppearance.Holo.WindowTitle" id="0x01030116" />
+  <public type="style" name="TextAppearance.Holo.DialogWindowTitle" id="0x01030117" />
+
 </resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index d5affae..b92bf88 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -699,6 +699,13 @@
         the rotation of the screen at any time. Should never be needed for
         normal applications.</string>
 
+    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=30] -->
+    <string name="permlab_setPointerSpeed">change pointer speed</string>
+    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=NONE] -->
+    <string name="permdesc_setPointerSpeed">Allows an application to change
+        the mouse or trackpad pointer speed at any time. Should never be needed for
+        normal applications.</string>
+
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
     <string name="permlab_signalPersistentProcesses">send Linux signals to applications</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index b9c0a60..3e6f4f5 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -1103,16 +1103,16 @@
         <item name="android:src">?android:attr/actionModeCloseDrawable</item>
     </style>
 
-    <style name="Widget.ActionBarView_TabView">
+    <style name="Widget.ActionBar.TabView" parent="Widget">
         <item name="android:background">@drawable/minitab_lt</item>
         <item name="android:paddingLeft">4dip</item>
         <item name="android:paddingRight">4dip</item>
     </style>
 
-    <style name="Widget.ActionBarView_TabBar">
+    <style name="Widget.ActionBar.TabBar" parent="Widget">
     </style>
 
-    <style name="Widget.ActionBarView_TabText">
+    <style name="Widget.ActionBar.TabText" parent="Widget">
         <item name="android:textAppearance">@style/TextAppearance.Widget.TextView.PopupMenu</item>
         <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
         <item name="android:textSize">18sp</item>
@@ -1753,19 +1753,19 @@
     <style name="Widget.Holo.ActionButton.TextButton" parent="Widget.Holo.ButtonBar.Button">
     </style>
 
-    <style name="Widget.Holo.ActionBarView_TabView" parent="Widget.ActionBarView_TabView">
+    <style name="Widget.Holo.ActionBar.TabView" parent="Widget.ActionBar.TabView">
         <item name="android:background">@drawable/tab_indicator_holo</item>
         <item name="android:paddingLeft">16dip</item>
         <item name="android:paddingRight">16dip</item>
     </style>
 
-    <style name="Widget.Holo.Tab" parent="Widget.Holo.ActionBarView_TabView">
+    <style name="Widget.Holo.Tab" parent="Widget.Holo.ActionBar.TabView">
     </style>
 
-    <style name="Widget.Holo.ActionBarView_TabBar" parent="Widget.ActionBarView_TabBar">
+    <style name="Widget.Holo.ActionBar.TabBar" parent="Widget.ActionBar.TabBar">
     </style>
 
-    <style name="Widget.Holo.ActionBarView_TabText" parent="Widget.ActionBarView_TabText">
+    <style name="Widget.Holo.ActionBar.TabText" parent="Widget.ActionBar.TabText">
         <item name="android:textAppearance">@style/TextAppearance.Holo.Medium</item>
         <item name="android:textColor">?android:attr/textColorPrimary</item>
         <item name="android:textSize">18sp</item>
@@ -2084,16 +2084,16 @@
         <item name="android:paddingRight">16dip</item>
     </style>
 
-    <style name="Widget.Holo.Light.ActionBarView_TabView" parent="Widget.Holo.ActionBarView_TabView">
+    <style name="Widget.Holo.Light.ActionBar.TabView" parent="Widget.Holo.ActionBar.TabView">
     </style>
 
-    <style name="Widget.Holo.Light.Tab" parent="Widget.Holo.Light.ActionBarView_TabView">
+    <style name="Widget.Holo.Light.Tab" parent="Widget.Holo.Light.ActionBar.TabView">
     </style>
 
-    <style name="Widget.Holo.Light.ActionBarView_TabBar" parent="Widget.Holo.ActionBarView_TabBar">
+    <style name="Widget.Holo.Light.ActionBar.TabBar" parent="Widget.Holo.ActionBar.TabBar">
     </style>
 
-    <style name="Widget.Holo.Light.ActionBarView_TabText" parent="Widget.Holo.ActionBarView_TabText">
+    <style name="Widget.Holo.Light.ActionBar.TabText" parent="Widget.Holo.ActionBar.TabText">
     </style>
 
     <style name="Widget.Holo.Light.ActionMode" parent="Widget.Holo.ActionMode">
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index fa31928..84dfe3e 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -266,9 +266,9 @@
         <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</item>
-        <item name="actionBarTabStyle">@style/Widget.ActionBarView_TabView</item>
-        <item name="actionBarTabBarStyle">@style/Widget.ActionBarView_TabBar</item>
-        <item name="actionBarTabTextStyle">@style/Widget.ActionBarView_TabText</item>
+        <item name="actionBarTabStyle">@style/Widget.ActionBar.TabView</item>
+        <item name="actionBarTabBarStyle">@style/Widget.ActionBar.TabBar</item>
+        <item name="actionBarTabTextStyle">@style/Widget.ActionBar.TabText</item>
         <item name="actionModeStyle">@style/Widget.ActionMode</item>
         <item name="actionModeCloseButtonStyle">@style/Widget.ActionButton.CloseMode</item>
         <item name="actionBarStyle">@android:style/Widget.ActionBar</item>
@@ -1011,9 +1011,9 @@
         <item name="actionOverflowButtonStyle">@android:style/Widget.Holo.ActionButton.Overflow</item>
         <item name="actionModeBackground">@android:drawable/cab_background_holo_dark</item>
         <item name="actionModeCloseDrawable">@android:drawable/cab_ic_close_holo</item>
-        <item name="actionBarTabStyle">@style/Widget.Holo.ActionBarView_TabView</item>
-        <item name="actionBarTabBarStyle">@style/Widget.Holo.ActionBarView_TabBar</item>
-        <item name="actionBarTabTextStyle">@style/Widget.Holo.ActionBarView_TabText</item>
+        <item name="actionBarTabStyle">@style/Widget.Holo.ActionBar.TabView</item>
+        <item name="actionBarTabBarStyle">@style/Widget.Holo.ActionBar.TabBar</item>
+        <item name="actionBarTabTextStyle">@style/Widget.Holo.ActionBar.TabText</item>
         <item name="actionModeStyle">@style/Widget.Holo.ActionMode</item>
         <item name="actionModeCloseButtonStyle">@style/Widget.Holo.ActionButton.CloseMode</item>
         <item name="actionBarStyle">@android:style/Widget.Holo.ActionBar</item>
@@ -1296,9 +1296,9 @@
         <item name="actionOverflowButtonStyle">@android:style/Widget.Holo.Light.ActionButton.Overflow</item>
         <item name="actionModeBackground">@android:drawable/cab_background_holo_light</item>
         <item name="actionModeCloseDrawable">@android:drawable/cab_ic_close_holo</item>
-        <item name="actionBarTabStyle">@style/Widget.Holo.Light.ActionBarView_TabView</item>
-        <item name="actionBarTabBarStyle">@style/Widget.Holo.Light.ActionBarView_TabBar</item>
-        <item name="actionBarTabTextStyle">@style/Widget.Holo.Light.ActionBarView_TabText</item>
+        <item name="actionBarTabStyle">@style/Widget.Holo.Light.ActionBar.TabView</item>
+        <item name="actionBarTabBarStyle">@style/Widget.Holo.Light.ActionBar.TabBar</item>
+        <item name="actionBarTabTextStyle">@style/Widget.Holo.Light.ActionBar.TabText</item>
         <item name="actionModeStyle">@style/Widget.Holo.Light.ActionMode</item>
         <item name="actionModeCloseButtonStyle">@style/Widget.Holo.Light.ActionButton.CloseMode</item>
         <item name="actionBarStyle">@android:style/Widget.Holo.Light.ActionBar</item>
diff --git a/data/etc/android.hardware.faketouch.multitouch.distinct.xml b/data/etc/android.hardware.faketouch.multitouch.distinct.xml
new file mode 100644
index 0000000..b6e8d09
--- /dev/null
+++ b/data/etc/android.hardware.faketouch.multitouch.distinct.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- This is the standard set of features for a indirect touch input device that supports
+     independently-trackable multiple-finger multitouch. -->
+<permissions>
+    <feature name="android.hardware.faketouch.multitouch" />
+    <feature name="android.hardware.faketouch.multitouch.distinct" />
+    <feature name="android.hardware.faketouch" />
+</permissions>
diff --git a/data/etc/android.hardware.faketouch.multitouch.jazzhand.xml b/data/etc/android.hardware.faketouch.multitouch.jazzhand.xml
new file mode 100644
index 0000000..7f0e70b
--- /dev/null
+++ b/data/etc/android.hardware.faketouch.multitouch.jazzhand.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- This is the standard set of features for an indirect touch input device that supports
+     independently-trackable multiple-finger multitouch. -->
+<permissions>
+    <feature name="android.hardware.faketouch.multitouch" />
+    <feature name="android.hardware.faketouch.multitouch.distinct" />
+    <feature name="android.hardware.faketouch.multitouch.jazzhand" />
+    <feature name="android.hardware.faketouch" />
+</permissions>
diff --git a/data/etc/android.hardware.faketouch.xml b/data/etc/android.hardware.faketouch.xml
new file mode 100644
index 0000000..cb99097
--- /dev/null
+++ b/data/etc/android.hardware.faketouch.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- This is the standard set of features for a devices that does not have
+     a touch screen, but does have some other indirect input device such as
+     a track pad. -->
+<permissions>
+    <feature name="android.hardware.faketouch" />
+</permissions>
diff --git a/data/etc/handheld_core_hardware.xml b/data/etc/handheld_core_hardware.xml
index 7f87b79..9d2a0cb 100644
--- a/data/etc/handheld_core_hardware.xml
+++ b/data/etc/handheld_core_hardware.xml
@@ -31,6 +31,8 @@
     <feature name="android.hardware.bluetooth" />
     <feature name="android.hardware.touchscreen" />
     <feature name="android.hardware.microphone" />
+    <feature name="android.hardware.screen.portrait" />
+    <feature name="android.hardware.screen.landscape" />
     <!-- devices with GPS must include android.hardware.location.gps.xml -->
     <!-- devices with an autofocus camera and/or flash must include either
          android.hardware.camera.autofocus.xml or 
diff --git a/data/etc/tablet_core_hardware.xml b/data/etc/tablet_core_hardware.xml
index 952d0782..bf29fe4 100644
--- a/data/etc/tablet_core_hardware.xml
+++ b/data/etc/tablet_core_hardware.xml
@@ -32,6 +32,8 @@
     <feature name="android.hardware.touchscreen.multitouch" />
     <feature name="android.hardware.touchscreen.multitouch.distinct" />
     <feature name="android.hardware.microphone" />
+    <feature name="android.hardware.screen.portrait" />
+    <feature name="android.hardware.screen.landscape" />
     <!-- devices with GPS must include android.hardware.location.gps.xml -->
     <!-- devices with a rear-facing camera must include one of these as appropriate:
          android.hardware.camera.xml or 
diff --git a/docs/html/guide/developing/debugging/debugging-ui.jd b/docs/html/guide/developing/debugging/debugging-ui.jd
index d2c42d5..22748be 100644
--- a/docs/html/guide/developing/debugging/debugging-ui.jd
+++ b/docs/html/guide/developing/debugging/debugging-ui.jd
@@ -31,10 +31,29 @@
         </li>
         <li><a href="#layoutopt">Optimizing Layouts with <code>layoutopt</code></a></li>
       </ol>
+      <h2>Related videos</h2>
+          <ol>
+              <li>
+<iframe title="Hierarchyviewer" 
+    width="272" height="234" 
+    src="http://www.youtube.com/embed/PAgE7saQUUY?rel=0&amp;hd=1" 
+    frameborder="0" allowfullscreen>
+</iframe>
+              </li>
+              <li>
+<iframe title="Pixel Perfect" 
+    width="272" height="234" 
+    src="http://www.youtube.com/embed/C45bMZGdN7Y?rel=0&amp;hd=1" 
+    frameborder="0" 
+    allowfullscreen>
+</iframe>
+              </li>
+          </ol>
     </div>
   </div>
 
-  <p>Sometimes your application's layout can slow down your application.
+  <p>
+Sometimes your application's layout can slow down your application.
   To help debug issues in your layout, the Android SDK provides the Hierarchy Viewer and
   <code>layoutopt</code> tools.
   </p>
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index 916da09..55d711f 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -244,9 +244,6 @@
           <li><a href="<?cs var:toroot ?>guide/topics/graphics/opengl.html">
                 <span class="en">3D with OpenGL</span>
               </a></li>
-          <li><a href="<?cs var:toroot ?>guide/topics/graphics/renderscript.html">
-                <span class="en">3D with Renderscript</span>
-              </a></li>
           <li><a href="<?cs var:toroot ?>guide/topics/graphics/animation.html">
                 <span class="en">Property Animation</span>
               </a></li>
@@ -255,6 +252,23 @@
               </a></li>
         </ul>
       </li>
+      <li class="toggle-list">
+	        <div><a href="<?cs var:toroot ?>guide/topics/renderscript/index.html">
+	            <span class="en">RenderScript</span>
+	          </a>
+	          <span class="new-child">new!</span></div>
+	        <ul>
+	          <li><a href="<?cs var:toroot ?>guide/topics/renderscript/graphics.html">
+	                <span class="en">3D Graphics</span>
+	              </a>
+	          </li>
+	          <li><a href="<?cs var:toroot ?>guide/topics/renderscript/compute.html">
+	                <span class="en">Compute</span>
+	              </a>
+	          </li>         
+	        </ul>
+  	  </li>
+
       <li><a href="<?cs var:toroot ?>guide/topics/media/index.html">
             <span class="en">Audio and Video</span>
           </a></li>
diff --git a/docs/html/guide/topics/appwidgets/index.jd b/docs/html/guide/topics/appwidgets/index.jd
index e589292..78b5b51 100644
--- a/docs/html/guide/topics/appwidgets/index.jd
+++ b/docs/html/guide/topics/appwidgets/index.jd
@@ -213,7 +213,7 @@
 <p class="note"><strong>Note:</strong> To make your app widget portable across
 devices, your app widget's minimum size should never be larger than 4 x 4 cells.
 See the <a
-href="{@docRoot}guide/practices/ui_guidelines/widget_design.htmll#sizes">App
+href="{@docRoot}guide/practices/ui_guidelines/widget_design.html#sizes">App
 Widget Design Guidelines</a> for more discussion of Home screen cell sizes.</p>
   </li>
   <li>The <code>updatePeriodMillis</code> attribute defines how often the App
diff --git a/docs/html/guide/topics/fundamentals/services.jd b/docs/html/guide/topics/fundamentals/services.jd
index a9dd315..d3ef70a 100644
--- a/docs/html/guide/topics/fundamentals/services.jd
+++ b/docs/html/guide/topics/fundamentals/services.jd
@@ -49,6 +49,13 @@
       LocalService}</a></li>
 </ol>
 
+<h2>Articles</h2>
+<ol>
+  <li><a href="{@docRoot}resources/articles/multitasking-android-way.html">Multitasking the Android Way</a></li>
+  <li><a href="{@docRoot}resources/articles/service-api-changes-starting-with.html">Service API changes starting
+      with Android 2.0</a></li>
+</ol>
+
 <h2>See also</h2>
 <ol>
 <li><a href="{@docRoot}guide/topics/fundamentals/bound-services.html">Bound Services</a></li>
@@ -663,7 +670,7 @@
 either stopped or removed from the foreground.</p>
 
 <p>For example, a music player that plays music from a service should be set to run in the
-foreground, because the user it explicitly aware
+foreground, because the user is explicitly aware
 of its operation. The notification in the status bar might indicate the current song and allow
 the user to launch an activity to interact with the music player.</p>
 
diff --git a/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd b/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd
index bd542bd..95ee129 100644
--- a/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd
+++ b/docs/html/guide/topics/fundamentals/tasks-and-back-stack.jd
@@ -10,8 +10,8 @@
   <li>All activities belong to a task</li>
   <li>A task contains a collection of activities in the order in which the user interacts with
 them</li>
-  <li>Tasks can move to the background and retain the state of each activity in order for the user
-to perform other tasks without loosing their work</li>
+  <li>Tasks can move to the background and retain the state of each activity in order for users
+to perform other tasks without losing their work</li>
 </ul>
 
 <h2>In this document</h2>
@@ -27,6 +27,11 @@
 </li>
 </ol>
 
+<h2>Articles</h2>
+<ol>
+  <li><a href="{@docRoot}resources/articles/multitasking-android-way.html">Multitasking the Android Way</a></li>
+</ol>
+
 <h2>See also</h2>
 <ol>
   <li><a><a href="{@docRoot}videos/index.html#v=fL6gSd4ugSI">Application Lifecycle video</a></li>
@@ -301,7 +306,7 @@
 and D on top (the stack is A-B-C-D; D is on top). An intent arrives for an activity of type D.
 If D has the default {@code "standard"} launch mode, a new instance of the class is launched and the
 stack becomes A-B-C-D-D. However, if D's launch mode is {@code "singleTop"}, the existing instance
-of D is deliverd the intent through {@link
+of D receives the intent through {@link
 android.app.Activity#onNewIntent onNewIntent()}, because it's at the top of the stack&mdash;the
 stack remains A-B-C-D. However, if an intent arrives for an activity of type B, then a new
 instance of B is added to the stack, even if its launch mode is {@code "singleTop"}.</p>
@@ -358,7 +363,7 @@
 
 <p class="note"><strong>Note:</strong> The behaviors that you specify for your activity with the <a
 href="{@docRoot}guide/topics/manifest/activity-element.html#lmode">{@code launchMode}</a> attribute
-can be overriden by flags included with the intent that start your activity, as discussed in the
+can be overridden by flags included with the intent that start your activity, as discussed in the
 next section.</p>
 
 
@@ -566,4 +571,4 @@
 respond, continue with the <b><a
 href="{@docRoot}guide/topics/intents/intents-filters.html">Intents and Intent
 Filters</a></b> document.</p>
--->
\ No newline at end of file
+-->
diff --git a/docs/html/guide/topics/graphics/animation.jd b/docs/html/guide/topics/graphics/animation.jd
index e10ab3e..31e7c4b 100644
--- a/docs/html/guide/topics/graphics/animation.jd
+++ b/docs/html/guide/topics/graphics/animation.jd
@@ -81,6 +81,12 @@
   If view animation accomplishes everything that you need to do, or if your existing code already
   works the way you want, there is no need to use the property animation system.</p>
   
+    <p class="note"><strong>Tip:</strong> To see how the ADT layout editor allows you to develop and
+preview animations in your layout, watch the <a
+href="http://www.youtube.com/watch?v=Oq05KqjXTvs&feature=player_detailpage#t=1709s">Android
+Developer Tools session</a> from Google I/O '11</p>
+
+
   <h2 id="what">What is Property Animation?</h2>
   A property animation changes a property's (a field in
   an object) value over a specified length of time. To animate something, you specify the
@@ -108,6 +114,7 @@
     default is set to  refresh every 10 ms, but the speed in which your application can refresh frames is
     ultimately dependent on how busy the system is overall and how fast the system can service the underlying timer.</li>
   </ul>
+  
 
   <h3 id="how">How the property animation system works</h3>
 
@@ -868,10 +875,22 @@
 For more information on creating animators, see the sections on animating with
 <a href="#value-animator">ValueAnimator</a> and <a href="#object-animator">ObjectAnimator</a>
 
-  <h2 id="declaring-xml">Declaring Animations in XML</h2>
+
+<h2 id="declaring-xml">Declaring Animations in XML</h2>
 
   <p>The property animation system lets you declare property animations with XML instead of doing
-  it programmatically. The following Android classes have XML declaration support with the
+  it programmatically. By defining your animations in XML, you can easily reuse your animations
+in multiple activities and more easily edit the animation sequence.</p>
+  
+<p>To distinguish animation files that use the new property animation APIs from those that use the
+legacy <a href="{@docRoot}guide/topics/graphics/view-animation.html">view animation</a> framework,
+starting with Android 3.1, you should save the XML files for property animations in the {@code
+res/animator/} directory (instead of {@code res/anim/}). Using the {@code animator} directory name
+is optional, but necessary if you want to use the layout editor tools in the Eclipse ADT plugin (ADT
+11.0.0+), because ADT only searches the {@code res/animator/} directory for property animation
+resources.</p>
+
+<p>The following property animation classes have XML declaration support with the
   following XML tags:</p>
 
   <ul>
@@ -882,91 +901,5 @@
     <li>{@link android.animation.AnimatorSet} - <code>&lt;set&gt;</code></li>
   </ul>
 
-  <p>Both <code>&lt;animator&gt;</code> ({@link android.animation.ValueAnimator}) and
-  <code>&lt;objectAnimator&gt;</code> ({@link android.animation.ObjectAnimator}) have the following
-  attributes:</p>
+<p>See <a href="{@docRoot}guide/topics/resources/animation-resource.html#Property">Animation Resources</a>
 
-  <dl>
-    <dt><code>android:duration</code></dt>
-
-    <dd>The number of milliseconds that the animation runs. The default is 300 ms.</dd>
-
-    <dt><code>android:valueFrom</code> and <code>android:valueTo</code></dt>
-
-    <dd>The values being animated between. These are restricted to numbers (<code>float</code> or
-    <code>int</code>) and color values (such as #00ff00). They can be <code>float</code>, <code>int</code>, colors, 
-    or any kind of <code>Object</code> when creating animations programmatically.</dd>
-
-    <dt><code>android:valueType</code></dt>
-
-    <dd>Set to either <code>"floatType"</code> or <code>"intType"</code>. The default is 
-    <code>"floatType"</code> unless you specify something else or if the <code>valuesFrom</code>
-    and <code>valuesTo</code> values are colors.</dd>
-
-    <dt><code>android:startOffset</code></dt>
-
-    <dd>The delay, in milliseconds, before the animation begins playing (after calling {@link
-    android.animation.ValueAnimator#start start()}).</dd>
-
-    <dt><code>android:repeatCount</code></dt>
-
-    <dd>How many times to repeat an animation. Set to <code>"-1"</code> to infinitely repeat or
-    to a positive integer. For example, a value of <code>"1"</code> means that the animation is
-    repeated once after the initial run of the animation, so the animation plays a total of two
-    times. The default value is <code>"0"</code>, which means no repetition.</dd>
-
-    <dt><code>android:repeatMode</code></dt>
-
-    <dd>How an animation behaves when it reaches the end of the animation.
-    <code>android:repeatCount</code> must be set to a positive integer or <code>"-1"</code> for
-    this attribute to have an effect. Set to <code>"reverse"</code> to have the animation reverse
-    direction with each iteration or <code>"repeat"</code> to have the animation loop from the
-    beginning each time.</dd>
-  </dl>
-
-  <p>The <code>objectAnimator</code> ({@link android.animation.ObjectAnimator}) element has the
-  additional attribute <code>propertyName</code>, that lets you specify the name of the property
-  being animated. The <code>objectAnimator</code> element does not expose a <code>target</code>
-  attribute, however, so you cannot set the object to animate in the XML declaration. You have to
-  inflate the XML resource by calling {@link android.animation.AnimatorInflater#loadAnimator
-  loadAnimator()} and call {@link android.animation.ObjectAnimator#setTarget setTarget()} to set
-  the target object unlike the underlying {@link android.animation.ObjectAnimator},
-  before calling {@link android.animation.ObjectAnimator#start start()}.</p>
-
-  <p>The <code>set</code> element ({@link android.animation.AnimatorSet}) exposes a single
-  attribute, <code>ordering</code>. Set this attribute to <code>together</code> (default) to play
-  all the animations in this set at once. Set this attribute to <code>sequentially</code> to play
-  the animations in the order they are declared.</p>
-
-  <p>You can specify nested <code>set</code> tags to further group animations together. The
-  animations that you want to group together should be children of the <code>set</code> tag and can
-  define their own <code>ordering</code> attribute.</p>
-
-  <p>As an example, this XML code creates an {@link android.animation.AnimatorSet} object that
-  animates x and y at the same time, then runs an animation that fades an object out:</p>
-  <pre>
-&lt;set android:ordering="sequentially"&gt;
-    &lt;set&gt;
-        &lt;objectAnimator
-            android:propertyName="x"
-            android:duration="500"
-            android:valueTo="400"
-            android:valueType="int"/&gt;
-        &lt;objectAnimator
-            android:propertyName="y"
-            android:duration="500"
-            android:valueTo="300"
-            android:valueType="int"/&gt;
-    &lt;/set&gt;
-    &lt;objectAnimator
-        android:propertyName="alpha"
-        android:duration="500"
-        android:valueTo="0f"/&gt;
-&lt;/set&gt;
-</pre>
-
-  <p>In order to run this animation, you must inflate the XML resources in your code to an {@link
-  android.animation.AnimatorSet} object, and then set the target objects for all of the animations
-  before starting the animation set. Calling {@link android.animation.AnimatorSet#setTarget
-  setTarget()} sets a single target object for all children of the {@link
-  android.animation.AnimatorSet}.</p>
\ No newline at end of file
diff --git a/docs/html/guide/topics/graphics/renderscript.html b/docs/html/guide/topics/graphics/renderscript.html
new file mode 100644
index 0000000..454d392
--- /dev/null
+++ b/docs/html/guide/topics/graphics/renderscript.html
@@ -0,0 +1,10 @@
+<html>
+<head>
+<meta http-equiv="refresh" content="0;url=http://developer.android.com/guide/topics/renderscript/index.html">
+<title>Redirecting...</title>
+</head>
+<body>
+<p>You should be redirected. Please <a
+href="http://developer.android.com/guide/topics/renderscript/index.html">click here</a>.</p>
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/html/guide/topics/graphics/renderscript.jd b/docs/html/guide/topics/graphics/renderscript.jd
deleted file mode 100644
index 60bffdb..0000000
--- a/docs/html/guide/topics/graphics/renderscript.jd
+++ /dev/null
@@ -1,716 +0,0 @@
-page.title=3D Rendering and Computation with Renderscript
-parent.title=Graphics
-parent.link=index.html
-@jd:body
-
-  <div id="qv-wrapper">
-    <div id="qv">
-      <h2>In this document</h2>
-
-      <ol>
-        <li><a href="#overview">Renderscript System Overview</a></li>
-
-        <li>
-          <a href="#api">API Overview</a>
-
-          <ol>
-            <li><a href="#native-api">Native Renderscript APIs</a></li>
-
-            <li><a href="#reflective-api">Reflected layer APIs</a></li>
-
-            <li><a href="#graphics-api">Graphics APIs</a></li>
-          </ol>
-        </li>
-
-        <li>
-          <a href="#developing">Developing a Renderscript application</a>
-
-          <ol>
-            <li><a href="#hello-graphics">The Hello Graphics application</a></li>
-          </ol>
-        </li>
-      </ol>
-      <h2>Related Samples</h2>
-      <ol>
-            <li><a href="{@docRoot}resources/samples/Renderscript/Balls/index.html">Balls</a></li>
-            <li><a href="{@docRoot}resources/samples/Renderscript/Fountain/index.html">Fountain</a></li>
-            <li><a href="{@docRoot}resources/samples/Renderscript/HelloCompute/index.html">Hello Compute</a></li>
-            <li><a href="{@docRoot}resources/samples/Renderscript/HelloWorld/index.html">Hello World</a></li>
-            <li><a href="{@docRoot}resources/samples/Renderscript/Samples/index.html">Samples</a></li>
-          </ol>
-    </div>
-  </div>
-
-  <p>The Renderscript system offers high performance 3D rendering and mathematical computation at
-  the native level. The Renderscript APIs are intended for developers who are comfortable with
-  developing in C (C99 standard) and want to maximize performance in their applications. The
-  Renderscript system improves performance by running as native code on the device, but it also
-  features cross-platform functionality. To achieve this, the Android build tools compile your
-  Renderscript <code>.rs</code> file to intermediate bytecode and package it inside your
-  application's <code>.apk</code> file. On the device, the bytecode is compiled (just-in-time) to
-  machine code that is further optimized for the device that it is running on. This eliminates the
-  need to target a specific architecture during the development process. The compiled code on the
-  device is cached, so subsequent uses of the Renderscript enabled application do not recompile the
-  intermediate code.</p>
-
-  <p>The disadvantage of the Renderscript system is that it adds complexity to the development and
-  debugging processes. Debugging visibility can be limited, because the
-  Renderscript system can execute on processors other than the main CPU (such as the GPU), so if
-  this occurs, debugging becomes more difficult. The target use is for performance
-  critical code where the traditional framework APIs (such as using {@link android.opengl}) are not sufficient.
-  If what you are rendering or computing is very simple and does not require much processing power, you should still use the
-  traditional framework APIs for ease of development. Remember the tradeoffs between development and
-  debugging complexity versus performance when deciding to use Renderscript. </p>
-
-  <p>For an example of Renderscript in action, see the 3D carousel view in the Android 3.0 versions
-  of Google Books and YouTube or install the Renderscript sample applications that are shipped with
-  the SDK in <code>&lt;sdk_root&gt;/samples/android-11/Renderscript</code>.</p>
-
-  <h2 id="overview">Renderscript System Overview</h2>
-
-  <p>The Renderscript system adopts a control and slave architecture where the low-level native
-  code is controlled by the higher level Android system that runs in the virtual machine (VM). When
-  you use the Renderscript system, there are three layers that exist:</p>
-
-  <ul>
-    <li>The native Renderscript layer consists of native libraries that are packaged with the SDK.
-    The native Renderscript <code>.rs</code> files compute mathematical operations, render graphics,
-    or both. This layer does the intensive computation or graphics rendering and returns the result
-    back to the Android VM through the reflected layer.</li>
-
-    <li>The reflected layer is a set of generated Android framework classes reflected from
-    the native Renderscript code that you wrote. This layer acts as a bridge between the native
-    Renderscript layer and the Android system layer. The Android build tools automatically generate
-    the classes for this layer during the build process. This layer also includes a set of Android
-    framework APIs that provide the memory and resource allocation classes to support this layer.</li>
-
-    <li>The Android system layer consists of the traditional framework APIs, which include the Renderscript
-    APIs in {@link android.renderscript}. This layer handles things such as the Activity lifecycle
-    management of your application and calls the reflected layer to communicate with the native Renderscript code.</li>
-  </ul>
-
-  <p>To fully understand how the Renderscript system works, you must understand how the reflected
-  layer is generated and how it interacts with the native Renderscript layer and Android system
-  layer. The reflected layer provides the entry points into the native code, enabling the Android
-  system to give high level commands like, "rotate the view" or "filter the bitmap" to the
-  native layer, which does the heavy lifting. To accomplish this, you need to create logic
-  to hook together all of these layers so that they can correctly communicate.</p>
-
-  <p>At the root of everything is your Renderscript, which is the actual C code that you write and
-  save to a <code>.rs</code> file in your project. There are two kinds of Renderscripts: compute
-  and graphics. A compute Renderscript does not do any graphics rendering while a graphics
-  Renderscript does.</p>
-
-  <p>When you create Renderscript <code>.rs</code> files, equivalent, reflected classes
-  are generated by the build tools and expose the native functions and data types and structures
-  to the Android system. The following list describes the major components of your native Renderscript
-  code that is reflected:</p>
-
-  <ul>
-    <li>The non-static functions in your Renderscript (<code>.rs</code> file) are reflected into
-    <code><em>ScriptC_renderscript_filename</em></code> of type {@link
-    android.renderscript.ScriptC}.</li>
-
-    <li>Any non-static, global Renderscript variables are reflected into
-    <code><em>ScriptC_renderscript_filename</em></code>.
-    Accessor methods are generated, so the Android system layer can access the values.
-    The <code>get</code> method comes with a one-way communication restriction. 
-    The Android system layer always caches the last value that is set and returns that during a call to a <code>get</code> method.
-    If the native Renderscript code changes the value, the change does not propagate back to the Android system layer.
-    If the global variables are initialized in the native Renderscript code, those values are used
-    to initialize the corresponding values in the Android system. If global variables are marked as <code>const</code>,
-    then a <code>set</code> method is not generated.
-    </li>
-
-    <li>Structs are reflected into their own classes, one for each struct, into a class named
-    <code>ScriptField_<em>struct_name</em></code> of type {@link
-    android.renderscript.Script.FieldBase}.</li>
-    
-    <li>Global pointers have a special property. They provide attachment points where the Android system can attach allocations. 
-    If the global pointer is a user defined structure type, it must be a type that is legal for reflection (primitives
-    or Renderscript data types). The Android system can call the reflected class to allocate memory and
-    optionally populate data, then attach it to the Renderscript.
-    For arrays of basic types, the procedure is similar, except a reflected class is not needed.
-    Renderscripts should not directly set the exported global pointers.</li>
-     </ul>
-
-  <p>The Android framework API also has a corresponding Renderscript context object, {@link
-  android.renderscript.RenderScript} (for a compute Renderscript) or {@link
-  android.renderscript.RenderScriptGL} (for a graphics Renderscript). This context object allows
-  you to bind to the reflected Renderscript class, so that the Renderscript context knows what its
-  corresponding native Renderscript is. If you have a graphics Renderscript context, you can also
-  specify a variety of Programs (stages in the graphics pipeline) to tweek how your graphics are
-  rendered. A graphics Renderscript context also needs a surface to render on, {@link
-  android.renderscript.RSSurfaceView}, which gets passed into its constructor.</p>
-
-  <h2 id="api">API overview</h2>
-
-  <p>Renderscript code is compiled and executed in a compact and well defined runtime, which has
-  access to a limited amount of functions. Renderscript cannot use the NDK or standard C functions,
-  because these functions are assumed to be running on a standard CPU. The Renderscript runtime
-  chooses the best processor to execute the code, which may not be the CPU, so it cannot guarantee
-  support for standard C libraries. What Renderscript does offer is an API that supports intensive
-  computation with an extensive collection of math APIs. The following sections group the APIs
-  into three distinct categories.</p>
-
-
-  <h3 id="native-api">Native Renderscript APIs</h3>
-
-  <p>The Renderscript headers are located in the <code>include</code> and
-  <code>clang-include</code> directories in the
-  <code>&lt;sdk_root&gt;/platforms/android-11/renderscript</code> directory of the Android SDK.
-  The headers are automatically included for you, except for the graphics specific header,
-  which you can define as follows:</p>
-  
-<pre>#include "rs_graphics.rsh"</pre>
-
-<p>Some key features of the native Renderscript libraries include:
-  <ul>
-    <li>A large collection of math functions with both scalar and vector typed overloaded versions
-    of many common routines. Operations such as adding, multiplying, dot product, and cross product
-    are available.</li>
-    <li>Conversion routines for primitive data types and vectors, matrix routines, date and time
-    routines, and graphics routines.</li>
-    <li>Logging functions</li>
-    <li>Graphics rendering functions</li>
-    <li>Memory allocation request features</li>
-    <li>Data types and structures to support the Renderscript system such as
-    Vector types for defining two-, three-, or four-vectors.</li>
-  </ul>
-
-  <h3 id="reflective-api">Reflected layer APIs</h3>
-
-  <p>These classes are mainly used by the reflected classes that are generated from your native Renderscript
-  code. They allocate and manage memory for your Renderscript on the Android system side. 
-  You normally do not need to call these classes directly.</p> 
-  
-  <p>Because of the constraints of the Renderscript native layer, you cannot do any dynamic
-  memory allocation in your Renderscript <code>.rs</code> file.
-  The native Renderscript layer can request memory from the Android system layer, which allocates memory
-  for you and does reference counting to figure out when to free the memory. A memory allocation
-  is taken care of by the {@link android.renderscript.Allocation} class and memory is requested
-  in your Renderscript code with the <code>the rs_allocation</code> type.
-  All references to Renderscript objects are counted, so when your Renderscript native code
-  or system code no longer references a particular {@link android.renderscript.Allocation}, it destroys itself.
-  Alternatively, you can call {@link android.renderscript.Allocation#destroy destroy()} from the
-  Android system level, which decreases the reference to the {@link android.renderscript.Allocation}.
-  If no references exist after the decrease, the {@link android.renderscript.Allocation} destroys itself.
-  The Android system object, which at this point is just an empty shell, is eventually garbage collected.
-  </p>
-
-  <p>The following classes are mainly used by the reflected layer classes:</p>
-
-  <table>
-    <tr>
-      <th>Android Object Type</th>
-
-      <th>Renderscript Native Type</th>
-
-      <th>Description</th>
-    </tr>
-
-    <tr>
-      <td>{@link android.renderscript.Element}</td>
-
-      <td>rs_element</td>
-
-      <td>
-        An {@link android.renderscript.Element} is the most basic element of a memory type. An
-        element represents one cell of a memory allocation. An element can have two forms: Basic or
-        Complex. They are typically created from C structures in your Renderscript
-        code during the reflection process. Elements cannot contain pointers or nested arrays. 
-        The other common source of elements is bitmap formats.
-
-        <p>A basic element contains a single component of data of any valid Renderscript data type.
-        Examples of basic element data types include a single float value, a float4 vector, or a
-        single RGB-565 color.</p>
-
-        <p>Complex elements contain a list of sub-elements and names that is basically a reflection
-        of a C struct. You access the sub-elements by name from a script or vertex program. The
-        most basic primitive type determines the data alignment of the structure. For example, a
-        float4 vector is alligned to <code>sizeof(float)</code> and not
-        <code>sizeof(float4)</code>. The ordering of the elements in memory are the order in which
-        they were added, with each component aligned as necessary.</p>
-      </td>
-    </tr>
-
-    <tr>
-      <td>{@link android.renderscript.Type}</td>
-
-      <td>rs_type</td>
-
-      <td>A Type is an allocation template that consists of an element and one or more dimensions.
-      It describes the layout of the memory but does not allocate storage for the data that it
-      describes. A Type consists of five dimensions: X, Y, Z, LOD (level of detail), and Faces (of
-      a cube map). You can assign the X,Y,Z dimensions to any positive integer value within the
-      constraints of available memory. A single dimension allocation has an X dimension of greater
-      than zero while the Y and Z dimensions are zero to indicate not present. For example, an
-      allocation of x=10, y=1 is considered two dimensional and x=10, y=0 is considered one
-      dimensional. The LOD and Faces dimensions are booleans to indicate present or not
-      present.</td>
-    </tr>
-
-    <tr>
-      <td>{@link android.renderscript.Allocation}</td>
-
-      <td>rs_allocation</td>
-
-      <td>
-        <p>An {@link android.renderscript.Allocation} provides the memory for applications. An {@link
-        android.renderscript.Allocation} allocates memory based on a description of the memory that
-        is represented by a {@link android.renderscript.Type}. The type describes an array of elements that
-        represent the memory to be allocated. Allocations are the primary way data moves into and
-        out of scripts.</p>
-
-        <p>Memory is user-synchronized and it's possible for allocations to exist in multiple
-        memory spaces concurrently. For example, if you make a call to the graphics card to load a
-        bitmap, you give it the bitmap to load from in the system memory. After that call returns,
-        the graphics memory contains its own copy of the bitmap so you can choose whether or not to
-        maintain the bitmap in the system memory. If the Renderscript system modifies an allocation
-        that is used by other targets, it must call {@link android.renderscript#syncAll syncAll()} to push the updates to
-        the memory. Otherwise, the results are undefined.</p>
-
-        <p>Allocation data is uploaded in one of two primary ways: type checked and type unchecked.
-        For simple arrays there are <code>copyFrom()</code> functions that take an array from the
-        Android system and copy it to the native layer memory store. Both type checked and
-        unchecked copies are provided. The unchecked variants allow the Android system to copy over
-        arrays of structures because it does not support structures. For example, if
-        there is an allocation that is an array n floats, you can copy the data contained in a
-        float[n] array or a byte[n*4] array.</p>
-      </td>
-    </tr>
-
-    <tr>
-      <td>{@link android.renderscript.Script}</td>
-
-      <td>rs_script</td>
-
-      <td>Renderscript scripts do much of the work in the native layer. This class is generated
-      from a Renderscript file that has the <code>.rs</code> file extension. This class is named
-      <code>ScriptC_<em>rendersript_filename</em></code> when it gets generated.</td>
-    </tr>
-  </table>
-
-  <h3 id="graphics-api">Graphics API</h3>
-
-  <p>Renderscript provides a number of graphics APIs for hardware-accelerated 3D rendering. The
-  Renderscript graphics APIs include a stateful context, {@link
-  android.renderscript.RenderScriptGL} that contains the current rendering state. The primary state
-  consists of the objects that are attached to the rendering context, which are the graphics Renderscript
-  and the four program types. The main working function of the graphics Renderscript is the code that is
-  defined in the <code>root()</code> function. The <code>root()</code> function is called each time the surface goes through a frame
-  refresh. The four program types mirror a traditional graphical rendering pipeline and are:</p>
-
-  <ul>
-    <li>Vertex</li>
-
-    <li>Fragment</li>
-
-    <li>Store</li>
-
-    <li>Raster</li>
-  </ul>
-
-  <p>Graphical scripts have more properties beyond a basic computational script, and they call the
-  'rsg'-prefixed functions defined in the <code>rs_graphics.rsh</code> header file. A graphics
-  Renderscript can also set four pragmas that control the default bindings to the {@link
-  android.renderscript.RenderScriptGL} context when the script is executing:</p>
-
-  <ul>
-    <li>stateVertex</li>
-
-    <li>stateFragment</li>
-
-    <li>stateRaster</li>
-
-    <li>stateStore</li>
-  </ul>
-
-  <p>The possible values are <code>parent</code> or <code>default</code> for each pragma. Using
-  <code>default</code> says that when a script is executed, the bindings to the graphical context
-  are the system defaults. Using <code>parent</code> says that the state should be the same as it
-  is in the calling script. If this is a root script, the parent
-  state is taken from the bind points as set in the {@link android.renderscript.RenderScriptGL}
-  bind methods in the control environment (VM environment).</p>
-
-  <p>For example, you can define this at the top of your native graphics Renderscript code:</p>
-  <pre>
-#pragma stateVertex(parent)
-#pragma stateStore(parent)
-</pre>
-
-  <p>The following table describes the major graphics specific APIs that are available to you:</p>
-
-  <table>
-    <tr>
-      <th>Android Object Type</th>
-
-      <th>Renderscript Native Type</th>
-
-      <th>Description</th>
-    </tr>
-
-    <tr>
-      <td>{@link android.renderscript.ProgramVertex}</td>
-
-      <td>rs_program_vertex</td>
-
-      <td>
-        <p>The Renderscript vertex program, also known as a vertex shader, describes the stage in the
-        graphics pipeline responsible for manipulating geometric data in a user-defined way. The
-        object is constructed by providing Renderscript with the following data:</p>
-
-        <ul>
-          <li>An Element describing its varying inputs or attributes</li>
-
-          <li>GLSL shader string that defines the body of the program</li>
-
-          <li>a Type that describes the layout of an Allocation containing constant or uniform
-          inputs</li>
-        </ul>
-
-        <p>Once the program is created, bind it to the {@link android.renderscript.RenderScriptGL} 
-        graphics context by calling 
-        {@link android.renderscript.RenderScriptGL#bindProgramVertex bindProgramVertex()}. It is then used for all
-        subsequent draw calls until you bind a new program. If the program has constant inputs, the
-        user needs to bind an allocation containing those inputs. The allocation's type must match
-        the one provided during creation. The Renderscript library then does all the necessary
-        plumbing to send those constants to the graphics hardware. Varying inputs to the shader,
-        such as position, normal, and texture coordinates are matched by name between the input
-        Element and the Mesh object being drawn. The signatures don't have to be exact or in any
-        strict order. As long as the input name in the shader matches a channel name and size
-        available on the mesh, the run-time would take care of connecting the two. Unlike OpenGL,
-        there is no need to link the vertex and fragment programs.</p>
-        <p>  To bind shader constructs to the Program, declare a struct containing the necessary shader constants in your native Renderscript code.
-  This struct is generated into a reflected class that you can use as a constant input element
-  during the Program's creation. It is an easy way to create an instance of this struct as an allocation.
-  You would then bind this Allocation to the Program and the Renderscript system sends the data that
-  is contained in the struct to the hardware when necessary. To update shader constants, you change the values
-  in the Allocation and notify the native Renderscript code of the change.</p>
-      </td>
-    </tr>
-
-    <tr>
-      <td>{@link android.renderscript.ProgramFragment}</td>
-
-      <td>rs_program_fragment</td>
-
-      <td><p>The Renderscript fragment program, also known as the fragment shader, is responsible for
-      manipulating pixel data in a user-defined way. It's constructed from a GLSL shader string
-      containing the program body, textures inputs, and a Type object describing the constants used
-      by the program. Like the vertex programs, when an allocation with constant input values is
-      bound to the shader, its values are sent to the graphics program automatically. Note that the
-      values inside the allocation are not explicitly tracked. If they change between two draw
-      calls using the same program object, notify the runtime of that change by calling
-      rsgAllocationSyncAll so it could send the new values to hardware. Communication between the
-      vertex and fragment programs is handled internally in the GLSL code. For example, if the
-      fragment program is expecting a varying input called varTex0, the GLSL code inside the
-      program vertex must provide it.</p>
-      <p>  To bind shader constructs to the this Program, declare a struct containing the necessary shader constants in your native Renderscript code.
-  This struct is generated into a reflected class that you can use as a constant input element
-  during the Program's creation. It is an easy way to create an instance of this struct as an allocation.
-  You would then bind this Allocation to the Program and the Renderscript system sends the data that
-  is contained in the struct to the hardware when necessary. To update shader constants, you change the values
-  in the Allocation and notify the native Renderscript code of the change.</p></td>
-    </tr>
-
-    <tr>
-      <td>{@link android.renderscript.ProgramStore}</td>
-
-      <td>rs_program_store</td>
-
-      <td>The Renderscript ProgramStore contains a set of parameters that control how the graphics
-      hardware writes to the framebuffer. It could be used to enable and disable depth writes and
-      testing, setup various blending modes for effects like transparency and define write masks
-      for color components.</td>
-    </tr>
-
-    <tr>
-      <td>{@link android.renderscript.ProgramRaster}</td>
-
-      <td>rs_program_raster</td>
-
-      <td>Program raster is primarily used to specify whether point sprites are enabled and to
-      control the culling mode. By default back faces are culled.</td>
-    </tr>
-
-    <tr>
-      <td>{@link android.renderscript.Sampler}</td>
-
-      <td>rs_sampler</td>
-
-      <td>A Sampler object defines how data is extracted from textures. Samplers are bound to
-      Program objects (currently only a Fragment Program) alongside the texture whose sampling they
-      control. These objects are used to specify such things as edge clamping behavior, whether
-      mip-maps are used and the amount of anisotropy required. There may be situations where
-      hardware limitations prevent the exact behavior from being matched. In these cases, the
-      runtime attempts to provide the closest possible approximation. For example, the user
-      requested 16x anisotropy, but only 8x was set because it's the best available on the
-      hardware.</td>
-    </tr>
-
-    <tr>
-      <td>{@link android.renderscript.Mesh}</td>
-
-      <td>rs_mesh</td>
-
-      <td>A collection of allocations that represent vertex data (positions, normals, texture
-      coordinates) and index data such as triangles and lines. Vertex data can be interleaved
-      within one allocation, provided separately as multiple allocation objects, or done as a
-      combination of the above. The layout of these allocations will be extracted from their
-      Elements. When a vertex channel name matches an input in the vertex program, Renderscript
-      automatically connects the two. Moreover, even allocations that cannot be directly mapped to
-      graphics hardware can be stored as part of the mesh. Such allocations can be used as a
-      working area for vertex-related computation and will be ignored by the hardware. Parts of the
-      mesh could be rendered with either explicit index sets or primitive types.</td>
-    </tr>
-
-    <tr>
-      <td>{@link android.renderscript.Font}</td>
-
-      <td>rs_font</td>
-
-      <td>
-        <p>This class gives you a way to draw hardware accelerated text. Internally, the glyphs are
-        rendered using the Freetype library, and an internal cache of rendered glyph bitmaps is
-        maintained. Each font object represents a combination of a typeface and point sizes.
-        Multiple font objects can be created to represent faces such as bold and italic and to
-        create different font sizes. During creation, the framework determines the device screen's
-        DPI to ensure proper sizing across multiple configurations.</p>
-
-        <p>Font rendering can impact performance. Even though though the state changes are
-        transparent to the user, they are happening internally. It is more efficient to render
-        large batches of text in sequence, and it is also more efficient to render multiple
-        characters at once instead of one by one.</p>
-
-        <p>Font color and transparency are not part of the font object and can be freely modified
-        in the script to suit the your needs. Font colors work as a state machine, and every new
-        call to draw text will use the last color set in the script.</p>
-      </td>
-    </tr>
-  </table>
-
-
-  <h2 id="developing">Developing a Renderscript application</h2>
-
-  <p>The basic workflow of developing a Renderscript application is:</p>
-
-  <ol>
-    <li>Analyze your application's requirements and figure out what you want to develop with
-    Renderscript. To take full advantage of the Renderscript system, you want to use it when the computation
-    or graphics performance you're getting with the traditional framework APIs is
-    insufficient.</li>
-
-    <li>Design the interface of your Renderscript code and implement it using the native
-    Renderscript APIs that are included in the Android SDK in
-    <code>&lt;sdk_root&gt;/platforms/android-11/renderscript</code>.</li>
-
-    <li>Create an Android project as you would normally, in Eclipse or with the
-    <code>android</code> tool.</li>
-
-    <li>Place your Renderscript files in <code>src</code> folder of the Android project so that the
-    build tools can generate the reflected layer classes.</li>
-
-    <li>Create your application, calling the Renderscript through the reflected class layer when
-    you need to.</li>
-
-    <li>Build, install, and run your application as you would normally.</li>
-  </ol>
-
-  <p>To see how a simple Renderscript application is put together, see the 
-  <a href="{@docRoot}resources/samples/Renderscript/index.html">Renderscript samples</a>
-  and <a href="#hello-graphics">The Hello Graphics Application</a> section of the documentation.</p>
-
-  <h3 id="hello-graphics">The Hello Graphics Application</h3>
-
-  <p>This small application demonstrates the structure of a simple Renderscript application. You
-  can model your Renderscript application after the basic structure of this application. You can
-  find the complete source in the SDK in the
-  <code>&lt;android-sdk&gt;/samples/android-11/HelloWorldRS directory</code>. The
-  application uses Renderscript to draw the string, "Hello World!" to the screen and redraws the
-  text whenever the user touches the screen at the location of the touch. This application is only
-  a demonstration and you should not use the Renderscript system to do something this trivial. The
-  application contains the following source files:</p>
-
-  <ul>
-    <li><code>HelloWorld</code>: The main Activity for the application. This class is present to
-    provide Activity lifecycle management. It mainly delegates work to HelloWorldView, which is the
-    Renderscript surface that the sample actually draws on.</li>
-
-    <li><code>HelloWorldView</code>: The Renderscript surface that the graphics render on. If you
-    are using Renderscript for graphics rendering, you must have a surface to render on. If you are
-    using it for computatational operations only, then you do not need this.</li>
-
-    <li><code>HelloWorldRS</code>: The class that calls the native Renderscript code through high
-    level entry points that are generated by the Android build tools.</li>
-
-    <li><code>helloworld.rs</code>: The Renderscript native code that draws the text on the
-    screen.</li>
-
-    <li>
-      <p>The <code>&lt;project_root&gt;/gen</code> directory contains the reflected layer classes
-      that are generated by the Android build tools. You will notice a
-      <code>ScriptC_helloworld</code> class, which is the reflective version of the Renderscript
-      and contains the entry points into the <code>helloworld.rs</code> native code. This file does
-      not appear until you run a build.</p>
-    </li>
-  </ul>
-
-  <p>Each file has its own distinct use. The following files comprise the main parts of the sample and
-  demonstrate in detail how the sample works:</p>
-
-  <dl>
-    <dt><code>helloworld.rs</code></dt>
-
-    <dd>
-      The native Renderscript code is contained in the <code>helloworld.rs</code> file. Every
-      <code>.rs</code> file must contain two pragmas that define the version of Renderscript
-      that it is using (1 is the only version for now), and the package name that the reflected
-      classes should be generated with. For example:
-<pre>
-#pragma version(1)
-
-#pragma rs java_package_name(com.my.package.name)
-</pre>      
-      <p>An <code>.rs</code> file can also declare two special functions:</p>
-
-      <ul>
-        <li>
-          <code>init()</code>: This function is called once for each instance of this Renderscript
-          file that is loaded on the device, before the script is accessed in any other way by the
-          Renderscript system. The <code>init()</code> is ideal for doing one time setup after the
-          machine code is loaded such as initializing complex constant tables. The
-          <code>init()</code> function for the <code>helloworld.rs</code> script sets the initial
-          location of the text that is rendered to the screen:
-          <pre>
-void init(){
-    gTouchX = 50.0f;
-    gTouchY = 50.0f;
-}
-</pre>
-        </li>
-
-        <li>
-          <code>root()</code>: This function is the default worker function for this Renderscript
-          file. For graphics Renderscript applications, like this one, the Renderscript system
-          expects this function to render the frame that is going to be displayed. It is called
-          every time the frame refreshes. The <code>root()</code> function for the
-          <code>helloworld.rs</code> script sets the background color of the frame, the color of
-          the text, and then draws the text where the user last touched the screen:
-<pre>
-int root(int launchID) {
-    // Clear the background color
-    rsgClearColor(0.0f, 0.0f, 0.0f, 0.0f);
-    // Tell the runtime what the font color should be
-    rsgFontColor(1.0f, 1.0f, 1.0f, 1.0f);
-    // Introduce ourselves to the world by drawing a greeting
-    // at the position that the user touched on the screen
-    rsgDrawText("Hello World!", gTouchX, gTouchY);
-          
-    // Return value tells RS roughly how often to redraw
-    // in this case 20 ms
-    return 20;
-}
-</pre>
-
-          <p>The return value, <code>20</code>, is the desired frame refresh rate in milliseconds.
-          The real screen refresh rate depends on the hardware, computation, and rendering
-          complexity that the <code>root()</code> function has to execute. A value of
-          <code>0</code> tells the screen to render only once and to only render again when a
-          change has been made to one of the properties that are being modified by the Renderscript
-          code.</p>
-
-          <p>Besides the <code>init()</code> and <code>root()</code> functions, you can define the
-          other native functions, structs, data types, and any other logic for your Renderscript.
-          You can even define separate header files as <code>.rsh</code> files.</p>
-        </li>
-      </ul>
-    </dd>
-
-    <dt><code>ScriptC_helloworld</code></dt>
-
-    <dd>This class is generated by the Android build tools and is the reflected version of the
-    <code>helloworld.rs</code> Renderscript. It provides a a high level entry point into the
-    <code>helloworld.rs</code> native code by defining the corresponding methods that you can call
-    from the traditional framework APIs.</dd>
-
-    <dt><code>helloworld.bc</code> bytecode</dt>
-
-    <dd>This file is the intermediate, platform-independent bytecode that gets compiled on the
-    device when the Renderscript application runs. It is generated by the Android build tools and
-    is packaged with the <code>.apk</code> file and subsequently compiled on the device at runtime.
-    This file is located in the <code>&lt;project_root&gt;/res/raw/</code> directory and is named
-    <code>rs_filename.bc</code>. You need to bind these files to your Renderscript context before
-    call any Renderscript code from your Android application. You can reference them in your code
-    with <code>R.id.rs_filename</code>.</dd>
-
-    <dt><code>HelloWorldView</code> class</dt>
-
-    <dd>
-      This class represents the Surface View that the Renderscript graphics are drawn on. It does
-      some administrative tasks in the <code>ensureRenderScript()</code> method that sets up the
-      Renderscript system. This method creates a {@link android.renderscript.RenderScriptGL}
-      object, which represents the context of the Renderscript and creates a default surface to
-      draw on (you can set the surface properties such as alpha and bit depth in the {@link
-      android.renderscript.RenderScriptGL.SurfaceConfig} class ). When a {@link
-      android.renderscript.RenderScriptGL} is instantiated, this class calls the
-      <code>HelloRS</code> class and creates the instance of the actual Renderscript graphics
-      renderer.
-      <pre>
-// Renderscipt context
-private RenderScriptGL mRS;
-// Script that does the rendering
-private HelloWorldRS mRender;
-
-    private void ensureRenderScript() {
-        if (mRS == null) {
-            // Initialize Renderscript with desired surface characteristics.
-            // In this case, just use the defaults
-            RenderScriptGL.SurfaceConfig sc = new RenderScriptGL.SurfaceConfig();
-            mRS = createRenderScriptGL(sc);
-
-            // Create an instance of the Renderscript that does the rendering
-            mRender = new HelloWorldRS();
-            mRender.init(mRS, getResources());
-        }
-    }
-</pre>
-
-      <p>This class also handles the important lifecycle events and relays touch events to the
-      Renderscript renderer. When a user touches the screen, it calls the renderer,
-      <code>HelloWorldRS</code> and asks it to draw the text on the screen at the new location.</p>
-      <pre>
-public boolean onTouchEvent(MotionEvent ev) {
-    // Pass touch events from the system to the rendering script
-    if (ev.getAction() == MotionEvent.ACTION_DOWN) {
-        mRender.onActionDown((int)ev.getX(), (int)ev.getY());
-        return true;
-    }
-    return false;
-}
-</pre>
-    </dd>
-
-    <dt><code>HelloWorldRS</code></dt>
-
-    <dd>
-      This class represents the Renderscript renderer for the <code>HelloWorldView</code> Surface
-      View. It interacts with the native Renderscript code that is defined in
-      <code>helloworld.rs</code> through the interfaces exposed by <code>ScriptC_helloworld</code>.
-      To be able to call the native code, it creates an instance of the Renderscript reflected
-      class, <code>ScriptC_helloworld</code>. The reflected Renderscript object binds the
-      Renderscript bytecode (<code>R.raw.helloworld</code>) and the Renderscript context, {@link
-      android.renderscript.RenderScriptGL}, so the context knows to use the right Renderscript to
-      render its surface.
-      <pre>
-private Resources mRes;
-private RenderScriptGL mRS;
-private ScriptC_helloworld mScript;
-
-private void initRS() {
-    mScript = new ScriptC_helloworld(mRS, mRes, R.raw.helloworld);
-    mRS.bindRootScript(mScript);
-}
-</pre>
-    </dd>
-  </dl>
\ No newline at end of file
diff --git a/docs/html/guide/topics/renderscript/compute.jd b/docs/html/guide/topics/renderscript/compute.jd
new file mode 100644
index 0000000..e4c2283
--- /dev/null
+++ b/docs/html/guide/topics/renderscript/compute.jd
@@ -0,0 +1,38 @@
+page.title=Compute
+parent.title=RenderScript
+parent.link=index.html 
+@jd:body
+
+  <div id="qv-wrapper">
+    <div id="qv">
+
+      <h2>Related Samples</h2>
+
+      <ol>
+        <li><a href="{@docRoot}resources/samples/RenderScript/HelloCompute/index.html">Hello
+        Compute</a></li>
+        <li><a href="{@docRoot}resources/samples/RenderScript/Balls/index.html">Balls</a></li>
+      </ol>
+    </div>
+  </div>
+
+  <p>RenderScript exposes a set of compute APIs that you can use to do intensive computational operations.
+  You can use the compute APIs in the context of a graphics RenderScript such as calculating the
+  transformation of many geometric objects in a scene. You can also create a standalone compute RenderScript that does not
+  draw anything to the screen such as bitmap image processing for a photo editor application.
+  The RenderScript compute APIs are mainly defined in the <code>rs_cl.rsh</code> header</p>
+  
+  <p>Compute RenderScripts are simpler to setup and implement as there is no graphics rendering involved.
+  You can offload computational aspects of your application to RenderScript by creating a native RenderScript
+  file (.rs) and using the generated reflected layer class to call functions in the <code>.rs</code> file. 
+
+  <p>See the <a href="{@docRoot}resources/samples/RenderScript/HelloCompute/index.html">HelloCompute</a>
+  sample in the Android SDK for more
+  information on how to create a simple compute RenderScript.</p>
+  <p>  
+  See the <a href="{@docRoot}resources/samples/RenderScript/Balls/index.html">Balls</a>
+  sample in the Android SDK for more
+  information on how to create a compute RenderScript that is used in a graphics RenderScript.
+  The compute RenderScript is contained in 
+  <a href="{@docRoot}resources/samples/RenderScript/Balls/src/com/example/android/rs/balls/ball_physics.html">balls_physics.rs</a>.
+  </p>
\ No newline at end of file
diff --git a/docs/html/guide/topics/renderscript/graphics.jd b/docs/html/guide/topics/renderscript/graphics.jd
new file mode 100644
index 0000000..d8be85f
--- /dev/null
+++ b/docs/html/guide/topics/renderscript/graphics.jd
@@ -0,0 +1,619 @@
+page.title=3D Graphics
+parent.title=RenderScript 
+parent.link=index.html
+@jd:body
+
+  <div id="qv-wrapper">
+    <div id="qv">
+      <h2>In this document</h2>
+
+      <ol>
+        <li>
+          <a href="#developing">Developing a RenderScript application</a>
+
+          <ol>
+            <li><a href="#hello-graphics">The Hello Graphics application</a></li>
+          </ol>
+        </li>
+      </ol>
+
+      <h2>Related Samples</h2>
+
+      <ol>
+        <li><a href="{@docRoot}resources/samples/RenderScript/Balls/index.html">Balls</a></li>
+
+        <li><a href=
+        "{@docRoot}resources/samples/Renderscript/Fountain/index.html">Fountain</a></li>
+
+        <li><a href="{@docRoot}resources/samples/RenderScript/HelloWorld/index.html">Hello
+        World</a></li>
+
+        <li><a href="{@docRoot}resources/samples/RenderScript/Samples/index.html">Samples</a></li>
+      </ol>
+    </div>
+  </div>
+
+  <p>RenderScript provides a number of graphics APIs for 3D rendering, both at the Android
+  framework level as well as at the native level. For instance, the Android framework APIs let you
+  create meshes and define shaders to customize the graphical rendering pipeline. The native
+  RenderScript graphics APIs lets you draw the actual meshes to render your scene. In general, you
+  will need to be familiar with APIs to appropriately render 3D graphics on an Android-powered
+  device.</p>
+
+  <h2>Creating a Graphics RenderScript</h2>
+
+  <p>Because of the various layers of code when writing a RenderScript application, it is useful to
+  create the following files for a scene that you want to render:</p>
+
+  <ul>
+    <li>The native RenderScript <code>.rs</code> file. This file contains the logic to do the
+    graphics rendering.</li>
+
+    <li>The RenderScript entry point class that allows your view to interact with the code defined
+    in the <code>.rs</code> file. This class contains a RenderScript object(instance of
+    <code>ScriptC_<em>renderscript_file</em></code>), which allows your Android framework code to
+    call the native RenderScript code. This class also creates the {@link
+    android.renderscript.RenderScriptGL} context object, which contains the current rendering state
+    of the RenderScript such as programs (vertex and fragment shaders, for example) that you want
+    to define and bind to the graphics pipeline. The context object attaches to the RenderScript
+    object (instance of <code><em>ScriptC_renderscript_file</em></code>) that does the rendering.
+    Our example names this class <code>HelloWorldRS</code>.</li>
+
+    <li>Create a class that extends {@link android.renderscript.RSSurfaceView} to provide a surface
+    to render on. If you want to implement callbacks from events inherited from {@link
+    android.view.View}, such as {@link android.view.View#onTouchEvent onTouchEvent()} and {@link
+    android.view.View#onKeyDown onKeyDown()}, do so in this class as well.</li>
+
+    <li>Create a class that is the main Activity class, like you would with any Android
+    application. This class sets your {@link android.renderscript.RSSurfaceView} as the content
+    view for this Activity.</li>
+  </ul>
+
+  <p>The following sections describe how to implement these three classes by using the HelloWorld
+  RenderScript sample that is provided in the SDK as a guide (some code has been modified from its
+  original form for simplicity).</p>
+
+  <h3>Creating the native RenderScript file</h3>
+
+  <p>Your native RenderScript code resides in a <code>.rs</code> file in the
+  <code>&lt;project_root&gt;/src/</code> directory. You can also define <code>.rsh</code> header
+  files. This code contains the logic to render your graphics and declares all necessary variables
+  and pointers. Every graphics <code>.rs</code> file generally contains the following items:</p>
+
+  <ul>
+    <li>A pragma (<code>#pragma rs java_package_name(<em>package.name</em>)</code>) that declares
+    the package name of the <code>.java</code> reflection of this RenderScript.</li>
+
+    <li>A pragma (<code>#pragma version(1)</code>) that declares the version of RenderScript that
+    you are using (1 is the only value for now).</li>
+
+    <li>A <code>#include</code> of the rs_graphics.rsh header file.</li>
+
+    <li>A <code>root()</code> function. This is the main worker function for your RenderScript and
+    calls RenderScript graphics APIs to draw meshes to the surface. This function is called every
+    time a frame refresh occurs, which is specified as its return value. A <code>0</code> specified
+    for the return value says to only render the frame when a property of the scene that you are
+    rendering changes. A non-zero positive integer specifies the refresh rate of the frame in
+    milliseconds.
+
+      <p class="note"><strong>Note:</strong> The RenderScript runtime makes its best effort to
+      refresh the frame at the specified rate. For example, if you are creating a live wallpaper
+      and set the return value to 50, the runtime renders the wallpaper at 20fps if it has just
+      enough or more resources to do so, and renders as fast as it can if it does not.</p>
+      
+      <p>For more
+      information on using the RenderScript graphics functions, see <a href=
+      "using-graphics-api">Using the Graphics APIs</a>.</p>
+    </li>
+
+    <li>An <code>init()</code> function. This allows you to do any initialization of your
+    RenderScript before the <code>root()</code> function runs, such as initializing variables. This
+    function runs once and is called automatically when the RenderScript starts, before anything
+    else in your RenderScript. Creating this function is optional.</li>
+
+    <li>Any variables, pointers, and structures that you wish to use in your RenderScript code (can
+    be declared in <code>.rsh</code> files if desired)</li>
+  </ul>
+
+  <p>The following code shows how the <code>helloworld.rs</code> file is implemented:</p>
+  <pre>
+#pragma version(1)
+
+// Tell which java package name the reflected files should belong to
+#pragma rs java_package_name(com.android.rs.helloworld)
+
+// Built-in header with graphics APIs
+#include "rs_graphics.rsh"
+
+// gTouchX and gTouchY are variables that are reflected for use
+// by the Android framework API. This RenderScript uses them to be notified of touch events.
+int gTouchX;
+int gTouchY;
+
+// This is invoked automatically when the script is created and initializes the variables
+// in the Android framework layer as well.
+void init() {
+    gTouchX = 50.0f;
+    gTouchY = 50.0f;
+}
+
+int root(int launchID) {
+
+    // Clear the background color
+    rsgClearColor(0.0f, 0.0f, 0.0f, 0.0f);
+    // Tell the runtime what the font color should be
+    rsgFontColor(1.0f, 1.0f, 1.0f, 1.0f);
+    // Introuduce ourselves to the world by drawing a greeting
+    // at the position user touched on the screen
+    rsgDrawText("Hello World!", gTouchX, gTouchY);
+
+    // Return value tells RS roughly how often to redraw
+    // in this case 20 ms
+    return 20;
+}
+</pre>
+
+  <h3>Creating the RenderScript entry point class</h3>
+
+  <p>When you create a RenderScript (<code>.rs</code>) file, it is helpful to create a
+  corresponding Android framework class that is an entry point into the <code>.rs</code> file. In
+  this entry point class, you create a RenderScript object by instantiating a
+  <code>ScriptC_<em>rs_filename</em></code> and binding it to the RenderScript context. The
+  RenderScript object is attached to the RenderScript bytecode, which is platform-independent and
+  gets compiled on the device when the RenderScript application runs. Both the
+  <code>ScriptC_<em>rs_filename</em></code> class and bytecode is generated by the Android build
+  tools and is packaged with the <code>.apk</code> file. The bytecode file is located in the
+  <code>&lt;project_root&gt;/res/raw/</code> directory and is named <code>rs_filename.bc</code>.
+  You refer to the bytecode as a resource (<code>R.raw.<em>rs_filename</em></code>). when creating
+  the RenderScript object..</p>
+
+  <p>You then bind the RenderScript object to the RenderScript context, so that the surface view
+  knows what code to use to render graphics. The following code shows how the
+  <code>HelloWorldRS</code> class is implemented:</p>
+  <pre>
+package com.android.rs.helloworld;
+
+import android.content.res.Resources;
+import android.renderscript.*;
+
+public class HelloWorldRS {
+    //context and resources are obtained from RSSurfaceView, which calls init()
+    private Resources mRes;
+    private RenderScriptGL mRS;
+
+    //Declare the RenderScript object
+    private ScriptC_helloworld mScript;
+
+    public HelloWorldRS() {
+    }
+
+    /**
+     * This provides us with the RenderScript context and resources
+     * that allow us to create the RenderScript object
+     */
+    public void init(RenderScriptGL rs, Resources res) {
+        mRS = rs;
+        mRes = res;
+        initRS();
+    }
+    /**
+     * Calls native RenderScript functions (set_gTouchX and set_gTouchY)
+     * through the reflected layer class ScriptC_helloworld to pass in
+     * touch point data.
+     */
+    public void onActionDown(int x, int y) {
+        mScript.set_gTouchX(x);
+        mScript.set_gTouchY(y);
+    }
+    /**
+     * Binds the RenderScript object to the RenderScript context
+     */
+    private void initRS() {
+        //create the RenderScript object
+        mScript = new ScriptC_helloworld(mRS, mRes, R.raw.helloworld);
+        //bind the RenderScript object to the RenderScript context
+        mRS.bindRootScript(mScript);
+    }
+}
+
+</pre>
+
+  <h3>Creating the surface view</h3>
+
+  <p>To create a surface view to render graphics on, create a class that extends {@link
+  android.renderscript.RSSurfaceView}. This class also creates a RenderScript context object
+  ({@link android.renderscript.RenderScriptGL} and passes it to the Rendscript entry point class to
+  bind the two. The following code shows how the <code>HelloWorldView</code> class is
+  implemented:</p>
+  <pre>
+package com.android.rs.helloworld;
+
+import android.renderscript.RSSurfaceView;
+import android.renderscript.RenderScriptGL;
+import android.content.Context;
+import android.view.MotionEvent;
+
+public class HelloWorldView extends RSSurfaceView {
+    // RenderScript context
+    private RenderScriptGL mRS;
+    // RenderScript entry point object that does the rendering
+    private HelloWorldRS mRender;
+
+    public HelloWorldView(Context context) {
+        super(context);
+        initRS();
+    }
+
+    private void initRS() {
+        if (mRS == null) {
+            // Initialize RenderScript with default surface characteristics.
+            RenderScriptGL.SurfaceConfig sc = new RenderScriptGL.SurfaceConfig();
+            //Create the RenderScript context
+            mRS = createRenderScriptGL(sc);
+            // Create an instance of the RenderScript entry point class
+            mRender = new HelloWorldRS();
+            // Call the entry point class to bind it to this context
+            mRender.init(mRS, getResources());
+        }
+    }
+
+    /**
+     * Rebind everything when the window becomes attached
+     */
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        initRS();
+    }
+
+    /**
+     * Stop rendering when window becomes detached
+     */
+    protected void onDetachedFromWindow() {
+        // Handle the system event and clean up
+        mRender = null;
+        if (mRS != null) {
+            mRS = null;
+            destroyRenderScriptGL();
+        }
+    }
+
+    /**
+     * Use callbacks to relay data to RenderScript entry point class
+     */
+    public boolean onTouchEvent(MotionEvent ev) {
+        // Pass touch events from the system to the rendering script
+        if (ev.getAction() == MotionEvent.ACTION_DOWN) {
+            mRender.onActionDown((int)ev.getX(), (int)ev.getY());
+            return true;
+        }
+
+        return false;
+    }
+}
+
+</pre>
+
+  <h3>Creating the Activity</h3>
+
+  <p>Applications that use RenderScript still adhere to activity lifecyle, and are part of the same
+  view hierarchy as traditional Android applications, which is handled by the Android VM. This
+  Activity class sets its view to be the {@link android.renderscript.RSSurfaceView} and handles
+  lifecycle callback events appropriately. The following code shows how the <code>HelloWorld</code>
+  class is implemented:</p>
+  <pre>
+public class HelloWorldActivity extends Activity {
+
+    //Custom view to use with RenderScript
+    private HelloWorldView view;
+
+    public void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+        // Create surface view and set it as the content of our Activity
+        mView = new HelloWorldView(this);
+        setContentView(view);
+    }
+
+    protected void onResume() {
+        // Ideally an app should implement onResume() and onPause()
+        // to take appropriate action when the activity loses focus
+        super.onResume();
+        view.resume();
+    }
+
+    protected void onPause() {
+        // Ideally an app should implement onResume() and onPause()
+        // to take appropriate action when the activity loses focus
+        super.onPause();
+        view.pause();
+    }
+}
+</pre>
+
+  <h2>Drawing</h2>
+
+  <h3>Drawing using the rsgDraw functions</h3>
+
+  <p>The native RenderScript APIs provide a few convenient functions to easily draw a polygon to
+  the screen. You call these in your <code>root()</code> function to have them render to the
+  surface view. These functions are available for simple drawing and should not be used for complex
+  graphics rendering:</p>
+
+  <ul>
+    <li><code>rsgDrawRect()</code>: Sets up a mesh and draws a rectangle to the screen. It uses the
+    top left vertex and bottom right vertex of the rectangle to draw.</li>
+
+    <li><code>rsgDrawQuad()</code>: Sets up a mesh and draws a quadrilateral to the screen.</li>
+
+    <li><code>rsgDrawQuadTexCoords()</code>: Sets up a mesh and draws a textured quadrilateral to
+    the screen.</li>
+  </ul>
+
+  <h3>Drawing with a mesh</h3>
+
+  <p>When you want to draw complex shapes and textures to the screen, instantiate a {@link
+  android.renderscript.Mesh} and draw it to the screen with <code>rsgDrawMesh()</code>. A {@link
+  android.renderscript.Mesh} is a collection of allocations that represent vertex data (positions,
+  normals, texture coordinates) and index data such as triangles and lines. You can build a Mesh in
+  three different ways:</p>
+
+  <ul>
+    <li>Build the mesh with the {@link android.renderscript.Mesh.TriangleMeshBuilder} class, which
+    allows you to specify a set of vertices and indices for each triangle that you want to draw.
+    The downside of doing it this way is there is no way to specify the vertices in your native
+    RenderScript code.</li>
+
+    <li>Build the mesh using an {@link android.renderscript.Allocation} or a set of {@link
+    android.renderscript.Allocation}s with the {@link android.renderscript.Mesh.AllocationBuilder}
+    class. This allows you to build a mesh with vertices already stored in memory, which allows you
+    to set the vertices in native or Android code.</li>
+
+    <li>Build the mesh with the {@link android.renderscript.Mesh.Builder} class. This is a
+    convenience method for when you know what data types you want to use to build your mesh, but
+    don't want to make separate memory allocations like with {@link
+    android.renderscript.Mesh.AllocationBuilder}. You can specify the types that you want and this
+    mesh builder automatically creates the memory allocations for you.</li>
+  </ul>
+
+  <p>To create a mesh using the {@link android.renderscript.Mesh.TriangleMeshBuilder}, you need to
+  supply it with a set of vertices and the indices for the vertices that comprise the triangle. For
+  example, the following code specifies three vertices, which are added to an internal array,
+  indexed in the order they were added. The call to {@link
+  android.renderscript.Mesh.TriangleMeshBuilder#addTriangle addTriangle()} draws the triangle with
+  vertex 0, 1, and 2 (the vertices are drawn counter-clockwise).</p>
+  <pre>
+int float2VtxSize = 2;
+Mesh.TriangleMeshBuilder triangle = new Mesh.TriangleMeshBuilder(renderscriptGL,
+float2VtxSize, Mesh.TriangleMeshBuilder.COLOR);
+triangles.addVertex(300.f, 300.f);
+triangles.addVertex(150.f, 450.f);
+triangles.addVertex(450.f, 450.f);
+triangles.addTriangle(0 , 1, 2);
+Mesh smP = triangle.create(true);
+script.set_mesh(smP);
+</pre>
+
+  <p>To draw a mesh using the {@link android.renderscript.Mesh.AllocationBuilder}, you need to
+  supply it with one or more allocations that contain the vertex data:</p>
+  <pre>
+Allocation vertices;
+
+...
+Mesh.AllocationBuilder triangle = new Mesh.AllocationBuilder(mRS);
+smb.addVertexAllocation(vertices.getAllocation());
+smb.addIndexSetType(Mesh.Primitive.TRIANGLE);
+Mesh smP = smb.create();
+script.set_mesh(smP);
+</pre>
+
+  <p>In your native RenderScript code, draw the built mesh to the screen:</p>
+  <pre>
+rs_mesh mesh;
+...
+
+int root(){
+...
+rsgDrawMesh(mesh);
+...
+return 0; //specify a non zero, positive integer to specify the frame refresh.
+          //0 refreshes the frame only when the mesh changes.
+}
+</pre>
+
+  <h2 id="shaders">Shaders</h2>
+
+  <p>You can attach four program objects to the {@link android.renderscript.RenderScriptGL} context
+  to customize the rendering pipeline. For example, you can create vertex and fragment shaders in
+  GLSL or build a raster program object with provided methods without writing GLSL code. The four
+  program objects mirror a traditional graphical rendering pipeline:</p>
+
+  <table>
+    <tr>
+      <th>Android Object Type</th>
+
+      <th>RenderScript Native Type</th>
+
+      <th>Description</th>
+    </tr>
+
+    <tr>
+      <td>{@link android.renderscript.ProgramVertex}</td>
+
+      <td>rs_program_vertex</td>
+
+      <td>
+        <p>The RenderScript vertex program, also known as a vertex shader, describes the stage in
+        the graphics pipeline responsible for manipulating geometric data in a user-defined way.
+        The object is constructed by providing RenderScript with the following data:</p>
+
+        <ul>
+          <li>An Element describing its varying inputs or attributes</li>
+
+          <li>GLSL shader string that defines the body of the program</li>
+
+          <li>a Type that describes the layout of an Allocation containing constant or uniform
+          inputs</li>
+        </ul>
+
+        <p>Once the program is created, bind it to the {@link android.renderscript.RenderScriptGL}
+        graphics context by calling {@link android.renderscript.RenderScriptGL#bindProgramVertex
+        bindProgramVertex()}. It is then used for all subsequent draw calls until you bind a new
+        program. If the program has constant inputs, the user needs to bind an allocation
+        containing those inputs. The allocation's type must match the one provided during creation.
+        The RenderScript library then does all the necessary plumbing to send those constants to
+        the graphics hardware. Varying inputs to the shader, such as position, normal, and texture
+        coordinates are matched by name between the input Element and the Mesh object being drawn.
+        The signatures don't have to be exact or in any strict order. As long as the input name in
+        the shader matches a channel name and size available on the mesh, the run-time would take
+        care of connecting the two. Unlike OpenGL, there is no need to link the vertex and fragment
+        programs.</p>
+
+        <p>To bind shader constructs to the Program, declare a struct containing the necessary
+        shader constants in your native RenderScript code. This struct is generated into a
+        reflected class that you can use as a constant input element during the Program's creation.
+        It is an easy way to create an instance of this struct as an allocation. You would then
+        bind this Allocation to the Program and the RenderScript system sends the data that is
+        contained in the struct to the hardware when necessary. To update shader constants, you
+        change the values in the Allocation and notify the native RenderScript code of the
+        change.</p>
+      </td>
+    </tr>
+
+    <tr>
+      <td>{@link android.renderscript.ProgramFragment}</td>
+
+      <td>rs_program_fragment</td>
+
+      <td>
+        <p>The RenderScript fragment program, also known as the fragment shader, is responsible for
+        manipulating pixel data in a user-defined way. It's constructed from a GLSL shader string
+        containing the program body, textures inputs, and a Type object describing the constants
+        used by the program. Like the vertex programs, when an allocation with constant input
+        values is bound to the shader, its values are sent to the graphics program automatically.
+        Note that the values inside the allocation are not explicitly tracked. If they change
+        between two draw calls using the same program object, notify the runtime of that change by
+        calling rsgAllocationSyncAll so it could send the new values to hardware. Communication
+        between the vertex and fragment programs is handled internally in the GLSL code. For
+        example, if the fragment program is expecting a varying input called varTex0, the GLSL code
+        inside the program vertex must provide it.</p>
+
+        <p>To bind shader constants to this program, declare a struct containing the necessary
+        shader constants in your native RenderScript code. This struct is generated into a
+        reflected class that you can use as a constant input element during the Program's creation.
+        It is an easy way to create an instance of this struct as an allocation. You would then
+        bind this Allocation to the Program and the RenderScript system sends the data that is
+        contained in the struct to the hardware when necessary. To update shader constants, you
+        change the values in the Allocation and notify the native RenderScript code of the
+        change.</p>
+      </td>
+    </tr>
+
+    <tr>
+      <td>{@link android.renderscript.ProgramStore}</td>
+
+      <td>rs_program_store</td>
+
+      <td>The RenderScript ProgramStore contains a set of parameters that control how the graphics
+      hardware writes to the framebuffer. It could be used to enable and disable depth writes and
+      testing, setup various blending modes for effects like transparency and define write masks
+      for color components.</td>
+    </tr>
+
+    <tr>
+      <td>{@link android.renderscript.ProgramRaster}</td>
+
+      <td>rs_program_raster</td>
+
+      <td>Program raster is primarily used to specify whether point sprites are enabled and to
+      control the culling mode. By default back faces are culled.</td>
+    </tr>
+  </table>
+
+  <p>The following example defines a vertex shader in GLSL and binds it to the RenderScript:</p>
+  <pre>
+    private RenderScriptGL glRenderer;      //rendering context
+    private ScriptField_Point mPoints;      //vertices
+    private ScriptField_VpConsts mVpConsts; //shader constants
+
+    ...
+
+     ProgramVertex.Builder sb = new ProgramVertex.Builder(glRenderer);
+        String t =  "varying vec4 varColor;\n" +
+                    "void main() {\n" +
+                    "  vec4 pos = vec4(0.0, 0.0, 0.0, 1.0);\n" +
+                    "  pos.xy = ATTRIB_position;\n" +
+                    "  gl_Position = UNI_MVP * pos;\n" +
+                    "  varColor = vec4(1.0, 1.0, 1.0, 1.0);\n" +
+                    "  gl_PointSize = ATTRIB_size;\n" +
+                    "}\n";
+        sb.setShader(t);
+        sb.addConstant(mVpConsts.getType());
+        sb.addInput(mPoints.getElement());
+        ProgramVertex pvs = sb.create();
+        pvs.bindConstants(mVpConsts.getAllocation(), 0);
+        glRenderer.bindProgramVertex(pvs);
+
+
+</pre>
+
+  <p>The <a href=
+  "{@docRoot}resources/samples/RenderScript/MiscSamples/src/com/example/android/rs/miscsamples/RsRenderStatesRS.html">
+  RsRenderStatesRS</a> sample has many examples on how to create a shader without writing GLSL.</p>
+
+  <h3>Shader bindings</h3>
+
+  <p>You can also set four pragmas that control the shaders' default bindings to the {@link
+  android.renderscript.RenderScriptGL} context when the script is executing:</p>
+
+  <ul>
+    <li>stateVertex</li>
+
+    <li>stateFragment</li>
+
+    <li>stateRaster</li>
+
+    <li>stateStore</li>
+  </ul>
+
+  <p>The possible values for each pragma are <code>parent</code> or <code>default</code>. Using
+  <code>default</code> binds the shaders to the graphical context with the system defaults. The
+  default shader is defined below:</p>
+  <pre>
+("varying vec4 varColor;\n");
+("varying vec2 varTex0;\n");
+("void main() {\n");
+(" gl_Position = UNI_MVP * ATTRIB_position;\n");
+(" gl_PointSize = 1.0;\n");
+(" varColor = ATTRIB_color;\n");
+(" varTex0 = ATTRIB_texture0;\n");
+("}\n");
+</pre>
+
+  <p>Using <code>parent</code> binds the shaders in the same manner as it is bound in the calling
+  script. If this is the root script, the parent state is taken from the bind points that are set
+  by the {@link android.renderscript.RenderScriptGL} bind methods.</p>
+
+  <p>For example, you can define this at the top of your native graphics RenderScript code to have
+  the Vertex and Store shaders inherent the bind properties from their parent scripts:</p>
+  <pre>
+#pragma stateVertex(parent)
+#pragma stateStore(parent)
+</pre>
+
+  <h3>Defining a sampler</h3>
+
+  <p>A {@link android.renderscript.Sampler} object defines how data is extracted from textures.
+  Samplers are bound to Program objects (currently only a Fragment Program) alongside the texture
+  whose sampling they control. These objects are used to specify such things as edge clamping
+  behavior, whether mip-maps are used, and the amount of anisotropy required. There might be
+  situations where hardware does not support the desired behavior of the sampler. In these cases,
+  the runtime attempts to provide the closest possible approximation. For example, the user
+  requested 16x anisotropy, but only 8x was set because it's the best available on the
+  hardware.</p>
+
+  <p>The <a href=
+  "{@docRoot}resources/samples/RenderScript/MiscSamples/src/com/example/android/rs/miscsamples/RsRenderStatesRS.html">
+  RsRenderStatesRS</a> sample has many examples on how to create a sampler and bind it to a
+  Fragment program.</p>
+  
+</body>
+</html>
diff --git a/docs/html/guide/topics/renderscript/index.jd b/docs/html/guide/topics/renderscript/index.jd
new file mode 100644
index 0000000..eb77310
--- /dev/null
+++ b/docs/html/guide/topics/renderscript/index.jd
@@ -0,0 +1,640 @@
+page.title=RenderScript
+@jd:body
+
+  <div id="qv-wrapper">
+    <div id="qv">
+      <h2>In this document</h2>
+
+      <ol>
+        <li><a href="#overview">RenderScript System Overview</a></li>
+        <li>
+          <ol>
+            <li><a href="#native">Native RenderScript layer</a></li>
+
+            <li><a href="#reflected">Reflected layer</a></li>
+
+            <li><a href="#framework">Android framework layer</a></li>
+          </ol>
+        </li>
+
+        <li>
+          <a href="#mem-allocation">Memory Allocation APIs</a>
+        </li>
+        <li>
+          <a href="#dynamic">Dynamic Memory Allocations</a>
+          <ol>
+            <li><a href="#pointers">Declaring pointers</a></li>
+
+            <li><a href="#struct-pointer-reflection">How pointers are reflected</a></li>
+
+            <li><a href="#binding">Allocating and binding memory to the RenderScript</a></li>
+
+            <li><a href="#read-write-dynamic">Reading and writing to memory</a></li>
+
+          </ol>
+        </li>
+        <li>
+          <a href="#static">Static Memory Allocations</a>
+        </li>
+      </ol>
+    </div>
+  </div>
+
+  <p>RenderScript offers a high performance 3D graphics rendering and compute API at the native
+  level, which you write in the C (C99 standard). The main advantages of RenderScript are:</p>
+  <ul>
+    <li>Portability: RenderScript is designed to run on many types of devices with different CPU
+    and GPU architectures. It supports all of these architectures without having to target each
+    device, because the code is compiled and cached on the device at runtime.</li>
+
+    <li>Performance: RenderScript provides similar performance to OpenGL with the NDK while
+    offering the portability of the OpenGL APIs provided by the Android framework ({@link
+    android.opengl}). In addition, it also offers a high performance compute API that is not
+    offered by OpenGL.</li>
+
+    <li>Usability: RenderScript simplifies development when possible, such as eliminating JNI glue code
+    and simplifying mesh setup.</li>
+  </ul>
+
+  <p>The main disadvantages are:</p>
+
+  <ul>
+    <li>Development complexity: RenderScript introduces a new set of APIs that you have to learn.
+    RenderScript also handles memory differently compared to OpenGL with the Android framework APIs
+    or NDK.</li>
+
+    <li>Debugging visibility: RenderScript can potentially execute (planned feature for later releases)
+    on processors other than the main CPU (such as the GPU), so if this occurs, debugging becomes more difficult. 
+    </li>
+
+    <li>Less features: RenderScript does not provide as many features as OpenGL such as all the compressed
+    texture formats or GL extensions.</li>
+  </ul>
+
+  <p>You need to consider all of the aspects of RenderScript before deciding when to use it. The following list describes
+  general guidelines on when to use OpenGL (framework APIs or NDK) or RenderScript:</p>
+  <ul>
+    <li>If you are doing simple graphics rendering and performance is not critical, you probably want to use the
+  Android framework OpenGL APIs, which still provide adequate performance, to eliminate the added coding and debugging complexity of
+  RenderScript.</li>
+
+  <li>If you want the most flexibility and features while maintaining relatively good debugging
+  support, you probably want to use OpenGL and the NDK. Applications that require this are high end
+  or complicated games, for example.</li>
+ 
+  <li>If you want a solution that is portable, has good performance,
+  and you don't need the full feature set of OpenGL, RenderScript is a good solution. If you also
+  need a high performance compute language, then RenderScript offers that as well.
+  Good candidates for RenderScript are graphics intensive UIs that require 3D rendering, live wallpapers,
+  or applications that require intensive mathematical computation.</li>
+  </ul>
+
+  <p>For an example of RenderScript in action, install the RenderScript sample applications that
+  are shipped with the SDK in <code>&lt;sdk_root&gt;/samples/android-11/RenderScript</code>.
+  You can also see a typical use of RenderScript with the 3D carousel view in the Android 3.x
+  versions of Google Books and YouTube.</p>
+
+  <h2 id="overview">RenderScript System Overview</h2>
+
+  <p>The RenderScript system adopts a control and slave architecture where the low-level native
+  code is controlled by the higher level Android system that runs in a virtual machine (VM). The
+  Android VM still retains all control of memory and lifecycle management and calls the native
+  RenderScript code when necessary. The native code is compiled to intermediate bytecode (LLVM) and
+  packaged inside your application's <code>.apk</code> file. On the device, the bytecode is
+  compiled (just-in-time) to machine code that is further optimized for the device that it is
+  running on. The compiled code on the device is cached, so subsequent uses of the RenderScript
+  enabled application do not recompile the intermediate code. RenderScript has three layers of code
+  to enable communication between the native and Android framework code:</p>
+
+  <ul>
+    <li>The native RenderScript layer does the intensive computation or graphics rendering. You
+    define your native code in <code>.rs</code> and <code>.rsh</code> files.</li>
+
+    <li>The reflected layer is a set of classes that are reflected from the native code. It is basically
+    a wrapper around the native code that allows the Android framework to interact with native RenderScripts.
+    The Android build tools automatically generate the classes for this layer during
+    the build process and eliminates the need to write JNI glue code, like with the NDK.</li>
+
+    <li>The Android framework layer is comprised of the Android framework
+     APIs, which include the {@link android.renderscript} package. This layer gives high level commands
+     like, "rotate the view" or "filter the bitmap", by calling the reflected layer, which in turn calls
+     the native layer. </li>
+  </ul>
+
+  <h3 id="native">Native RenderScript layer</h3>
+
+  <p>The native RenderScript layer consists of your RenderScript code, which is compiled and
+  executed in a compact and well defined runtime. Your RenderScript code has access to a limited
+  amount of functions because it cannot access the NDK or standard C functions, since they must be guaranteed to
+  run on a standard CPU. The RenderScript runtime was designed to run on different types of processors,
+  which may not be the CPU, so it cannot guarantee support for standard C libraries. What
+  RenderScript does offer is an API that supports intensive computation and graphics rendering with a collection of math
+  and graphics APIs.</p>
+
+  <p>Some key features of the native RenderScript libraries include:</p>
+
+  <ul>
+    <li>A large collection of math functions with both scalar and vector typed overloaded versions
+    of many common routines. Operations such as adding, multiplying, dot product, and cross product
+    are available.</li>
+
+    <li>Conversion routines for primitive data types and vectors, matrix routines, date and time
+    routines, and graphics routines.</li>
+
+    <li>Logging functions</li>
+
+    <li>Graphics rendering functions</li>
+
+    <li>Memory allocation request features</li>
+
+    <li>Data types and structures to support the RenderScript system such as Vector types for
+    defining two-, three-, or four-vectors.</li>
+  </ul>
+
+  <p>The <a href="{@docRoot}guide/topics/renderscript/rs-api/files.html">RenderScript header files</a>
+  and LLVM front-end libraries are located in the <code>include</code> and
+  <code>clang-include</code> directories in the
+  <code>&lt;sdk_root&gt;/platforms/android-11/renderscript</code> directory of the Android SDK. The
+  headers are automatically included for you, except for the RenderScript graphics specific header file, which
+  you can include as follows:</p>
+  <pre>
+#include "rs_graphics.rsh"
+</pre>
+
+  <h3 id="reflected">Reflected layer</h3>
+
+  <p>The reflected layer is a set of classes that the Android build tools generate to allow access
+  to the native RenderScript code from the Android VM. This layer defines entry points for
+  RenderScript functions and variables, so that you can interact with them with the Android
+  framework. This layer also provides methods and constructors that allow you to allocate memory
+  for pointers that are defined in your RenderScript code. The following list describes the major
+  components that are reflected:</p>
+
+  <ul>
+    <li>Every <code>.rs</code> file that you create is generated into a class named
+    <code>ScriptC_<em>renderscript_filename</em></code> of type {@link
+    android.renderscript.ScriptC}. This is the <code>.java</code> version of your <code>.rs</code>
+    file, which you can call from the Android framework. This class contains the following
+    reflections:
+
+      <ul>
+        <li>Non-static functions in your <code>.rs</code> file.</li>
+
+        <li>Non-static, global RenderScript variables. Accessor methods are generated for each
+        variable, so you can read and write the natively declared variables from the Android
+        framework. The <code>get</code> method comes with a one-way communication restriction. The
+        last value that is set from the Android framework is always returned during a call to a
+        <code>get</code> method. If the native RenderScript code changes the value, the change does
+        not propagate back to the Android framework layer.
+        If the global variables are initialized
+        in the native RenderScript code, those values are used to initialize the corresponding
+        values in the Android framework layer. If global variables are marked as
+        <code>const</code>, then a <code>set</code> method is not generated.</li>
+        <li>Global pointers generate a special method named <code>bind_<em>pointer_name</em></code>
+        instead of a <code>set()</code> method. This method allows you to bind the memory that is
+        allocated in the Android VM for the pointer to the native RenderScript (you cannot allocate
+        memory in your <code>.rs</code> file). You can read and write to this memory from both the
+        Android framework and RenderScript code. For more information, see <a href="mem-mgmt">Working
+        with Memory and Data</a></li>
+      </ul>
+    </li>
+
+    <li>A <code>struct</code> is reflected into its own class named
+    <code>ScriptField_<em>struct_name</em></code>, which extends {@link
+    android.renderscript.Script.FieldBase}. This class represents an array of the
+    <code>struct</code>, which allows you to allocate memory for one or more instances of this
+    <code>struct</code>.</li>
+  </ul>
+
+  <h3 id="framework">Android framework layer</h3>
+
+  <p>The Android framework layer consists of the usual Android framework APIs, which include the
+    RenderScript APIs in {@link android.renderscript}. This layer handles things such as the
+    Activity lifecycle and memory management of your application. It issues high level commands to
+    the native RenderScript code through the reflected layer and receives events from the user such
+    as touch and input events and relays them to your RenderScript code, if needed.
+  </p>
+
+  <h2 id="mem-allocation">Memory Allocation APIs</h2>
+
+  <p>Before you begin writing your first RenderScript application, you must understand how 
+  memory is allocated for your RenderScript code and how data is shared between the native and VM
+  spaces. RenderScript allows you to access allocated memory in both the native layer
+  and Android system layer. All dynamic and static memory is allocated by the Android VM.
+  The Android VM also does reference counting and garbage collection for you. 
+  You can also explicitly free memory that you no longer need.</p>
+
+  <p class="note"><strong>Note:</strong> To declare temporary memory in your native RenderScript
+  code without allocating it in the Android VM, you can still do things like instantiate a scratch
+  buffer using an array.</p>
+
+  <p>The following classes support the memory management features of RenderScript in the Android
+  VM. You normally do not need to work with these classes directly, because the reflected layer
+  classes provide constructors and methods that set up the memory allocation for you. There are
+  some situations where you would want to use these classes directly to allocate memory on your
+  own, such as loading a bitmap from a resource or when you want to allocate memory for pointers to
+  primitive types.</p>
+
+  <table id="mem-mgmt-table">
+    <tr>
+      <th>Android Object Type</th>
+
+      <th>Description</th>
+    </tr>
+
+    <tr>
+      <td>{@link android.renderscript.Element}</td>
+
+      <td>
+        <p>An element represents one cell of a memory allocation and can have two forms: Basic or
+        Complex.</p>
+
+        <p>A basic element contains a single component of data of any valid RenderScript data type.
+        Examples of basic element data types include a single float value, a float4 vector, or a
+        single RGB-565 color.</p>
+
+        <p>Complex elements contain a list of basic elements and are created from
+        <code>struct</code>s that you declare in your RenderScript code. The most basic primitive
+        type determines the data alignment of the memory. For example, a float4 vector subelement
+        is alligned to <code>sizeof(float)</code> and not <code>sizeof(float4)</code>. The ordering
+        of the elements in memory are the order in which they were added, with each component
+        aligned as necessary.</p>
+      </td>
+    </tr>
+
+    <tr>
+      <td>{@link android.renderscript.Type}</td>
+
+      <td>
+        A type is a memory allocation template and consists of an element and one or more
+        dimensions. It describes the layout of the memory (basically an array of {@link
+        android.renderscript.Element}s) but does not allocate the memory for the data that it
+        describes.
+
+        <p>A type consists of five dimensions: X, Y, Z, LOD (level of detail), and Faces (of a cube
+        map). You can assign the X,Y,Z dimensions to any positive integer value within the
+        constraints of available memory. A single dimension allocation has an X dimension of
+        greater than zero while the Y and Z dimensions are zero to indicate not present. For
+        example, an allocation of x=10, y=1 is considered two dimensional and x=10, y=0 is
+        considered one dimensional. The LOD and Faces dimensions are booleans to indicate present
+        or not present.</p>
+      </td>
+    </tr>
+
+    <tr>
+      <td>{@link android.renderscript.Allocation}</td>
+
+      <td>
+        <p>An allocation provides the memory for applications based on a description of the memory
+        that is represented by a {@link android.renderscript.Type}. Allocated memory can exist in
+        many memory spaces concurrently. If memory is modified in one space, you must explicitly
+        synchronize the memory, so that it is updated in all the other spaces that it exists
+        in.</p>
+
+        <p>Allocation data is uploaded in one of two primary ways: type checked and type unchecked.
+        For simple arrays there are <code>copyFrom()</code> functions that take an array from the
+        Android system and copy it to the native layer memory store. The unchecked variants allow
+        the Android system to copy over arrays of structures because it does not support
+        structures. For example, if there is an allocation that is an array of n floats, the data
+        contained in a float[n] array or a byte[n*4] array can be copied.</p>
+      </td>
+    </tr>
+  </table>
+
+  <h2 id="dynamic">Working with dynamic memory allocations</h2>
+
+  <p>RenderScript has support for pointers, but you must allocate the memory in your Android framework
+  code. When you declare a global pointer in your <code>.rs</code> file, you allocate memory
+  through the appropriate reflected layer class and bind that memory to the native
+  RenderScript layer. You can read and write to this memory from the Android framework layer as well as the
+  RenderScript layer, which offers you the flexibility to modify variables in the most appropriate
+  layer. The following sections show you how to work with pointers, allocate memory for them, and
+  read and write to the memory.</p>
+
+  <h3 id="pointers">Declaring pointers</h3>
+
+  <p>Because RenderScript is written in C99, declaring a pointer is done in a familiar way. You can
+  declare pointers to a <code>struct</code> or a primitive type, but a <code>struct</code> cannot
+  contain pointers or nested arrays. The following code declares a <code>struct</code>, a pointer
+  to that <code>struct</code>, and a pointer of primitive type <code>int32_t</code> in an <code>.rs</code> file:</p>
+  <pre>
+#pragma version(1)
+#pragma rs java_package_name(com.example.renderscript)
+
+...
+
+typedef struct Point {
+      float2 point;
+  } Point_t;
+
+  Point_t *touchPoints;
+  int32_t *intPointer;
+
+...
+</pre>
+
+<p>You cannot allocate memory for these pointers in your RenderScript code, but the Android
+build tools generate classes for you that allow you to allocate memory in the Android VM for use by
+your RenderScript code. These classes also let you read and write to the memory. The next section
+describes how these classes are generated through reflection.</p>
+
+  <h3>How pointers are reflected</h3>
+
+  <p>Global variables have a getter and setter method generated. A global pointer generates a
+  <code>bind_pointerName()</code> method instead of a set() method. This method allows you to bind
+  the memory that is allocated in the Android VM to the native RenderScript. For example, the two
+  pointers in the previous section generate the following accessor methods in the <code>ScriptC_<em>rs_filename</em></code> file:</p>
+  <pre>
+
+    private ScriptField_Point mExportVar_touchPoints;
+    public void bind_touchPoints(ScriptField_Point v) {
+        mExportVar_touchPoints = v;
+        if (v == null) bindAllocation(null, mExportVarIdx_touchPoints);
+        else bindAllocation(v.getAllocation(), mExportVarIdx_touchPoints);
+    }
+
+    public ScriptField_Point get_touchPoints() {
+        return mExportVar_touchPoints;
+    }
+
+    private Allocation mExportVar_intPointer;
+    public void bind_intPointer(Allocation v) {
+        mExportVar_intPointer = v;
+        if (v == null) bindAllocation(null, mExportVarIdx_intPointer);
+        else bindAllocation(v, mExportVarIdx_intPointer);
+    }
+
+    public Allocation get_intPointer() {
+        return mExportVar_intPointer;
+    }
+
+</pre>
+
+  <h3>Allocating and binding memory to the RenderScript</h3>
+
+  <p>When the build tools generate the reflected layer, you can use the appropriate class
+  (<code>ScriptField_Point</code>, in our example) to allocate memory for a pointer. To do this,
+  you call the constructor for the {@link android.renderscript.Script.FieldBase} class and specify
+  the amount of structures that you want to allocate memory for. To allocate memory for a primitive
+  type pointer, you must build an allocation manually, using the memory management classes
+  described in <a href="mem-mgmt-table">Table 1</a>. The example below allocates memory for both
+  the <code>intPointer</code> and <code>touchPoints</code> pointer and binds it to the
+  RenderScript:</p>
+  <pre>
+private RenderScriptGL glRenderer;
+private ScriptC_example script;
+private Resources resources;
+
+public void init(RenderScriptGL rs, Resources res) {
+   //get the rendering context and resources from the calling method
+   glRenderer = rs; 
+   resources = res; 
+   
+   //allocate memory for the struct pointer, calling the constructor
+    ScriptField_Point touchPoints = new ScriptField_Point(glRenderer, 2); 
+    
+   //Create an element manually and allocate memory for the int pointer 
+    intPointer = Allocation.createSized(glRenderer, Element.I32(glRenderer), 2); 
+    
+    //create an instance of the RenderScript, pointing it to the bytecode resource
+    mScript = new ScriptC_example(glRenderer, resources, R.raw.example); 
+    
+    // bind the struct and int pointers to the RenderScript
+    mScript.bind_touchPoints(touchPoints); 
+    script.bind_intPointer(intPointer);
+    
+    //bind the RenderScript to the rendering context
+    glRenderer.bindRootScript(script);
+}
+</pre>
+
+  <h3>Reading and writing to memory</h3>
+
+  <p>Although you have to allocate memory within the Android VM, you can work with the memory both
+  in your native RenderScript code and in your Android code. Once memory is bound, the native
+  RenderScript can read and write to the memory directly. You can also just use the accessor
+  methods in the reflected classes to access the memory. If you modify memory in the Android
+  framework, it gets automatically synchronized to the native layer. If you modify memory in the <code>.rs</code>
+  file, these changes do not get propagated back to the Android framework.
+  For example, you can modify the struct in your Android code like this:</p>
+  <pre>
+int index = 0;
+boolean copyNow = true;
+Float2 point = new Float2(0.0f, 0.0f);
+touchPoints.set_point(index, point, copyNow);
+</pre>then read it in your native RenderScript code like this:
+  <pre>
+rsDebug("Printing out a Point", touchPoints[0].point.x, touchPoints[0].point.y);
+</pre>
+
+  <h2>Working with statically allocated memory</h2>
+
+  <p>Non-static, global primitives and structs that you declare in your RenderScript are easier to work with,
+  because the memory is statically allocated at compile time. Accessor methods to set and get these
+  variables are generated when the Android build tools generate the reflected layer classes. You
+  can get and set these variables using the provided accessor methods.
+ <p class="note"><strong>Note:</strong> The <code>get</code> method comes with a one-way communication restriction. The last value
+  that is set from the Android framework is always returned during a call to a <code>get</code>
+  method. If the native RenderScript code changes the value, the change does not propagate back to
+  the Android framework layer. If the global variables are initialized in the native RenderScript
+  code, those values are used to initialize the corresponding values in the Android framework
+  layer. If global variables are marked as <code>const</code>, then a <code>set</code> method is
+  not generated.</p>
+  </p>
+
+  <p>For example, if you declare the following primitive in your RenderScript code:</p>
+  <pre>
+  uint32_t unsignedInteger = 1;
+  
+</pre>
+<p>then the following code is generated in <code>ScriptC_<em>script_name</em>.java</code>:</p>
+  <pre>
+ private final static int mExportVarIdx_unsignedInteger = 9;
+    private long mExportVar_unsignedInteger;
+    public void set_unsignedInteger(long v) {
+        mExportVar_unsignedInteger = v;
+        setVar(mExportVarIdx_unsignedInteger, v);
+    }
+
+    public long get_unsignedInteger() {
+        return mExportVar_unsignedInteger;
+    }
+</pre>
+
+  <p class="note"><strong>Note:</strong> The mExportVarIdx_unsignedInteger variable represents the
+  index of the <code>unsignedInteger</code>'s in an array of statically allocated primitives. You do
+  not need to work with or be aware of this index.</p>
+  
+  <p>For a <code>struct</code>, the Android build tools generate a class named
+  <code>&lt;project_root&gt;/gen/com/example/renderscript/ScriptField_struct_name</code>. This
+  class represents an array of the <code>struct</code> and allows you to allocate memory for a
+  specified number of <code>struct</code>s. This class defines:</p>
+
+  <ul>
+    <li>Overloaded constructors that allow you to allocate memory. The
+    <code>ScriptField_<em>struct_name</em>(RenderScript rs, int count)</code> constructor allows
+    you to define the number of structures that you want to allocate memory for with the
+    <code>count</code> parameter. The <code>ScriptField_<em>struct_name</em>(RenderScript rs, int
+    count, int usages)</code> constructor defines an extra parameter, <code>usages</code>, that
+    lets you specify the memory space of this memory allocation. There are four memory space
+    possibilities:
+
+      <ul>
+        <li>{@link android.renderscript.Allocation#USAGE_SCRIPT}: Allocates in the script memory
+        space. This is the default memory space if you do not specify a memory space.</li>
+
+        <li>{@link android.renderscript.Allocation#USAGE_GRAPHICS_TEXTURE}: Allocates in the
+        texture memory space of the GPU.</li>
+
+        <li>{@link android.renderscript.Allocation#USAGE_GRAPHICS_VERTEX}: Allocates in the vertex
+        memory space of the GPU.</li>
+
+        <li>{@link android.renderscript.Allocation#USAGE_GRAPHICS_CONSTANTS}: Allocates in the
+        constants memory space of the GPU that is used by the various program objects.</li>
+      </ul>
+
+      <p>You can specify one or all of these memory spaces by OR'ing them together. Doing so notifies
+      the RenderScript runtime that you intend on accessing the data in the specified memory spaces. The following
+      example allocates memory for a custom data type in both the script and vertex memory spaces:</p>
+<pre>
+ScriptField_Point touchPoints = new ScriptField_Point(glRenderer, 2,
+Allocation.USAGE_SCRIPT | Allocation.USAGE_GRAPHICS_VERTEX);
+</pre>
+
+      <p>If you modify the memory in one memory space and want to push the updates to the rest of
+      the memory spaces, call <code>rsgAllocationSyncAll()</code> in your RenderScript code to
+      synchronize the memory.</p>
+    </li>
+
+    <li>A static nested class, <code>Item</code>, allows you to create an instance of the
+    <code>struct</code>, in the form of an object. This is useful if it makes more sense to work
+    with the <code>struct</code> in your Android code. When you are done manipulating the object,
+    you can push the object to the allocated memory by calling <code>set(Item i, int index, boolean
+    copyNow)</code> and setting the <code>Item</code> to the desired position in the array. The
+    native RenderScript code automatically has access to the newly written memory.
+
+    <li>Accessor methods to get and set the values of each field in a struct. Each of these
+    accessor methods have an <code>index</code> parameter to specify the <code>struct</code> in the
+    array that you want to read or write to. Each setter method also has a <code>copyNow</code>
+    parameter that specifies whether or not to immediately sync this memory to the native
+    RenderScript layer. To sync any memory that has not been synced, call <code>copyAll()</code>.</li>
+
+    <li>The createElement() method creates an object that describes the memory layout of the struct.</li>
+
+    <li>resize() works much like a <code>realloc</code>, allowing you to expand previously
+    allocated memory, maintaining the current values that were previously set.</li>
+
+    <li>copyAll() synchronizes memory that was set on the framework level to the native level. When you call
+    a set accessor method on a member, there is an optional <code>copyNow</code> boolean parameter that you can specify. Specifying
+    <code>true</code> synchronizes the memory when you call the method. If you specify false, you can call <code>copyAll()</code>
+    once, and it synchronizes memory for the all the properties that are not synchronized.</li>
+  </ul>
+
+  <p>The following example shows the reflected class, <code>ScriptField_Point.java</code> that is
+  generated from the Point <code>struct</code>.</p>
+  <pre>
+package com.example.renderscript;
+
+import android.renderscript.*;
+import android.content.res.Resources;
+
+
+public class ScriptField_Point extends android.renderscript.Script.FieldBase {
+    static public class Item {
+        public static final int sizeof = 8;
+
+        Float2 point;
+
+        Item() {
+            point = new Float2();
+        }
+
+    }
+
+    private Item mItemArray[];
+    private FieldPacker mIOBuffer;
+    public static Element createElement(RenderScript rs) {
+        Element.Builder eb = new Element.Builder(rs);
+        eb.add(Element.F32_2(rs), "point");
+        return eb.create();
+    }
+
+    public  ScriptField_Point(RenderScript rs, int count) {
+        mItemArray = null;
+        mIOBuffer = null;
+        mElement = createElement(rs);
+        init(rs, count);
+    }
+
+    public  ScriptField_Point(RenderScript rs, int count, int usages) {
+        mItemArray = null;
+        mIOBuffer = null;
+        mElement = createElement(rs);
+        init(rs, count, usages);
+    }
+
+    private void copyToArray(Item i, int index) {
+        if (mIOBuffer == null) mIOBuffer = new FieldPacker(Item.sizeof * getType().getX()/* count */);
+        mIOBuffer.reset(index * Item.sizeof);
+        mIOBuffer.addF32(i.point);
+    }
+
+    public void set(Item i, int index, boolean copyNow) {
+        if (mItemArray == null) mItemArray = new Item[getType().getX() /* count */];
+        mItemArray[index] = i;
+        if (copyNow)  {
+            copyToArray(i, index);
+            mAllocation.setFromFieldPacker(index, mIOBuffer);
+        }
+
+    }
+
+    public Item get(int index) {
+        if (mItemArray == null) return null;
+        return mItemArray[index];
+    }
+
+    public void set_point(int index, Float2 v, boolean copyNow) {
+        if (mIOBuffer == null) mIOBuffer = new FieldPacker(Item.sizeof * getType().getX()/* count */)fnati;
+        if (mItemArray == null) mItemArray = new Item[getType().getX() /* count */];
+        if (mItemArray[index] == null) mItemArray[index] = new Item();
+        mItemArray[index].point = v;
+        if (copyNow)  {
+            mIOBuffer.reset(index * Item.sizeof);
+            mIOBuffer.addF32(v);
+            FieldPacker fp = new FieldPacker(8);
+            fp.addF32(v);
+            mAllocation.setFromFieldPacker(index, 0, fp);
+        }
+
+    }
+
+    public Float2 get_point(int index) {
+        if (mItemArray == null) return null;
+        return mItemArray[index].point;
+    }
+
+    public void copyAll() {
+        for (int ct = 0; ct &lt; mItemArray.length; ct++) copyToArray(mItemArray[ct], ct);
+        mAllocation.setFromFieldPacker(0, mIOBuffer);
+    }
+
+    public void resize(int newSize) {
+        if (mItemArray != null)  {
+            int oldSize = mItemArray.length;
+            int copySize = Math.min(oldSize, newSize);
+            if (newSize == oldSize) return;
+            Item ni[] = new Item[newSize];
+            System.arraycopy(mItemArray, 0, ni, 0, copySize);
+            mItemArray = ni;
+        }
+
+        mAllocation.resize(newSize);
+        if (mIOBuffer != null) mIOBuffer = new FieldPacker(Item.sizeof * getType().getX()/* count */);
+    }
+
+}
+</pre>
+
+</body>
+</html>
diff --git a/docs/html/guide/topics/resources/animation-resource.jd b/docs/html/guide/topics/resources/animation-resource.jd
index 972dd72..3df669c 100644
--- a/docs/html/guide/topics/resources/animation-resource.jd
+++ b/docs/html/guide/topics/resources/animation-resource.jd
@@ -5,28 +5,348 @@
 
 <div id="qv-wrapper">
   <div id="qv">
+   <h2>In this document</h2>
+    <ol>
+      <li><a href="#Property">Property Animation</a></li>
+      <li><a href="#View">View Animation</a>
+        <ol>
+          <li><a href="Tween">Tween animation</li>
+          <li><a href="Frame">Frame animation</li>
+        </ol>      
+      </li>
+    </ol>
     <h2>See also</h2>
     <ol>
-      <li><a href="{@docRoot}guide/topics/graphics/2d-graphics.html#tween-animation">2D
-Graphics</a></li>
+      <li><a href="{@docRoot}guide/topics/graphics/view-animation.html">View Animation</a></li>
+      <li><a href="{@docRoot}guide/topics/graphics/animation.html">Property Animation</a></li>
     </ol>
   </div>
 </div>
 
 
 <p>An animation resource can define one of two types of animations:</p>
+
 <dl>
-  <dt><a href="#Tween">Tween Animation</a></dt>
-  <dd>Creates an animation by performing a series of transformations on a single image.
-    An {@link android.view.animation.Animation}.</dd>
-  <dt><a href="#Frame">Frame Animation</a></dt>
-  <dd>Creates an animation by showing a sequence of images in order.
-    An {@link android.graphics.drawable.AnimationDrawable}.</dd>
+  <dt><a href="#Property">Property Animation</a></dt>
+  <dd>Creates an animation by modifying an object's property values over a set period
+  of time with an {@link android.animation.Animator}.</dd>
+  <dt><a href="#View">View Animation</a></dt>
+  <dd>
+  <p>There are two types of animations that you can do with the view animation framework:</p>
+  <ul>
+    <li><a href="#Tween">Tween animation</a>: Creates an animation by performing a series of transformations on a single image
+    with an {@link android.view.animation.Animation}</li>
+    <li><a href="#Frame">Frame animation</a>: or creates an animation by showing a sequence of images in order
+    with an {@link android.graphics.drawable.AnimationDrawable}.</li>
+  </ul>
+  </dd>
 </dl>
 
 
+<h2 id="Property">Property Animation</h2>
+<p>An animation defined in XML that modifies properties of the target object, such as
+background color or alpha value, over a set amount of time.</p>
 
-<h2 id="Tween">Tween Animation</h2>
+<dl class="xml">
+
+<dt>file location:</dt>
+<dd><code>res/animator/<em>filename</em>.xml</code><br/>
+The filename will be used as the resource ID.</dd>
+
+<dt>compiled resource datatype:</dt>
+<dd>Resource pointer to a {@link android.animation.ValueAnimator}, {@link android.animation.ObjectAnimator},
+or {@link android.animation.AnimatorSet}.</dd>
+
+<dt>resource reference:</dt>
+<dd>
+In Java: <code>R.animator.<em>filename</em></code><br/>
+In XML: <code>@[<em>package</em>:]animator/<em>filename</em></code>
+</dd>
+
+<dt>syntax:</dt>
+<dd>
+<pre class="stx">
+&lt;<a href="#animator-set-element">set</a>
+  android:ordering=["together" | "sequentially"]&gt;
+
+    &lt;<a href="#obj-animator-element">objectAnimator</a>
+        android:propertyName="<em>string</em>"
+        android:duration="<em>int</em>"
+        android:valueFrom="<em>float</em> | <em>int</em> | <em>color</em>"
+        android:valueTo="<em>float</em> | <em>int</em> | <em>color</em>"
+        android:startOffset="<em>int</em>"
+        android:repeatCount="<em>int</em>"
+        android:repeatMode=["repeat" | "reverse"]
+        android:valueType=["intType" | "floatType"]/&gt;
+
+    &lt;<a href="#val-animator-element">animator</a>
+        android:duration="<em>int</em>"
+        android:valueFrom="<em>float</em> | <em>int</em> | <em>color</em>"
+        android:valueTo="<em>float</em> | <em>int</em> | <em>color</em>"
+        android:startOffset="<em>int</em>"
+        android:repeatCount="<em>int</em>"
+        android:repeatMode=["repeat" | "reverse"]
+        android:valueType=["intType" | "floatType"]/&gt;
+
+    &lt;<a href="#animator-set-element">set</a>&gt;
+        ...
+    &lt;/set&gt;
+&lt;/set&gt;
+</pre>
+
+<p>The file must have a single root element: either 
+<code>&lt;set&gt;</code>, <code>&lt;objectAnimator&gt;</code>, or <code>&lt;valueAnimator&gt;</code>. You can
+group animation elements together inside the <code>&lt;set&gt;</code> element, including other
+<code>&lt;set&gt;</code> elements.
+</p>
+</dd>
+
+<dt>elements:</dt>
+  <dd>
+  <dl class="tag-list">
+    <dt id="animator-set-element"><code>&lt;set&gt;</code></dt>
+    <dd>A container that holds other animation elements (<code>&lt;objectAnimator&gt;</code>,
+    <code>&lt;valueAnimator&gt;</code>, or other <code>&lt;set&gt;</code> elements).  Represents
+    an {@link android.animation.AnimatorSet}.
+    <p>You can specify nested <code>&lt;set&gt;</code> tags to further
+    group animations together. Each <code>&lt;set&gt;</code> can define its own 
+    <code>ordering</code> attribute.</p>
+
+      <p class="caps">attributes:</p>
+      <dl class="atn-list">
+        <dt>
+          <code>android:ordering</code>
+        </dt>
+        <dd>
+          <em>Keyword</em>. Specifies the play ordering of animations in this set.
+          <table> 
+            <tr><th>Value</th><th>Description</th></tr> 
+            <tr><td><code>sequentially</code></td><td>Play animations in this set sequentially</td></tr> 
+            <tr><td><code>together</code> (default)</td><td>Play animations in this set at the same time.</td></tr> 
+          </table> 
+        </dd>
+      </dl>
+    </dd>
+
+  <dt id="obj-animator-element"><code>&lt;objectAnimator&gt;</code></dt>
+    <dd>Animates a specific property of an object over a specific amount of time. Represents
+    an {@link android.animation.ObjectAnimator}.</p>
+    
+      <p class="caps">attributes:</p>
+      <dl class="atn-list">
+        <dt>
+          <code>android:propertyName</code> 
+        </dt>
+        <dd>
+          <em>String</em>. <strong>Required</strong>. The object's property to animate, referenced by its name. For example you can specify
+          <code>"alpha"</code> or <code>"backgroundColor"</code> for a View object.
+          The <code>objectAnimator</code> element does not expose a <code>target</code>
+          attribute, however, so you cannot set the object to animate in the XML declaration. You have to
+          inflate your animation XML resource by calling {@link android.animation.AnimatorInflater#loadAnimator
+          loadAnimator()} and call {@link android.animation.ObjectAnimator#setTarget setTarget()} to set
+          the target object that contains this property.
+        </dd>
+
+        <dt>
+          <code>android:valueTo</code>
+        </dt>
+        <dd>
+          <em>float, int, or color</em>. <strong>Required</strong>. The value where the animated property ends. Colors are represented
+          as six digit hexadecimal numbers (for example, #333333).
+        </dd>
+
+        <dt>
+          <code>android:valueFrom</code>
+        </dt>
+        <dd>
+          <em>float, int, or color</em>. The value where the animated property starts. If not
+          specified, the animation starts at the value obtained by the property's get method. Colors are represented
+          as six digit hexadecimal numbers (for example, #333333).
+        </dd>
+
+        <dt>
+          <code>android:duration</code>
+        </dt>
+        <dd>
+          <em>int</em>. The time in milliseconds of the animation. 300 milliseconds is the default.
+        </dd>
+
+        <dt>
+          <code>android:startOffset</code>
+        </dt>
+        <dd>
+          <em>int</em>. The amount of milliseconds the animation delays after
+          {@link android.animation.ObjectAnimator#start start()} is called.
+        </dd>
+
+        <dt>
+          <code>android:repeatCount</code>
+        </dt>
+        <dd>
+          <em>int</em>. How many times to repeat an animation. Set to <code>"-1"</code> to infinitely
+          repeat or to a positive integer. For example, a value of <code>"1"</code> means that the animation
+          is repeated once after the initial run of the animation, so the animation plays a total
+          of two times. The default value is <code>"0"</code>, which means no repetition.
+
+        </dd>
+
+        <dt>
+          <code>android:repeatMode</code>
+        </dt>
+        <dd>
+          <em>int</em>. How an animation behaves when it reaches the end of the animation. <code>android:repeatCount</code>
+          must be set to a positive integer or <code>"-1"</code> for this attribute to have an effect. Set to <code>"reverse"</code>
+          to have the animation reverse direction with each iteration or <code>"repeat"</code> to have the animation
+          loop from the beginning each time.
+        </dd>
+
+        <dt>
+          <code>android:valueType</code>
+        </dt>
+        <dd>
+          <em>Keyword</em>. Do not specify this attribute if the value is a color. The animation framework automatically handles color
+          values
+          <table> 
+            <tr><th>Value</th><th>Description</th></tr> 
+            <tr><td><code>intType</code></td><td>Specifies that the animated values are integers</td></tr> 
+            <tr><td><code>floatType</code> (default)</td><td>Specifies that the animated values are floats</td></tr> 
+          </table> 
+        </dd>
+
+      </dl>
+    </dd>
+
+<dt id="val-animator-element"><code>&lt;animator&gt;</code></dt>
+    <dd>Animates a over a specified amount of time.
+    Represents a {@link android.animation.ValueAnimator}.
+
+      <p class="caps">attributes:</p>
+      <dl class="atn-list">
+        <dt>
+          <code>android:valueTo</code>
+        </dt>
+        <dd>
+          <em>float, int, or color</em>. <strong>Required</strong>. The value where the animation ends. Colors are represented
+          as six digit hexadecimal numbers (for example, #333333).
+        </dd>
+
+        <dt>
+          <code>android:valueFrom</code>
+        </dt>
+        <dd>
+          <em>float, int, or color</em>. <strong>Required</strong>. The value where the animation starts. Colors are represented
+          as six digit hexadecimal numbers (for example, #333333).
+        </dd>
+
+        <dt>
+          <code>android:duration</code>
+        </dt>
+        <dd>
+          <em>int</em>. The time in milliseconds of the animation. 300ms is the default.
+        </dd>
+
+        <dt>
+          <code>android:startOffset</code>
+        </dt>
+        <dd>
+          <em>int</em>. The amount of milliseconds the animation delays after
+          {@link android.animation.ValueAnimator#start start()} is called.
+        </dd>
+
+        <dt>
+          <code>android:repeatCount</code>
+        </dt>
+        <dd>
+          <em>int</em>. How many times to repeat an animation. Set to <code>"-1"</code> to infinitely
+          repeat or to a positive integer. For example, a value of <code>"1"</code> means that the animation
+          is repeated once after the initial run of the animation, so the animation plays a total
+          of two times. The default value is <code>"0"</code>, which means no repetition.
+        </dd>
+
+        <dt>
+          <code>android:repeatMode</code>
+        </dt>
+        <dd>
+          <em>int</em>. How an animation behaves when it reaches the end of the animation. <code>android:repeatCount</code>
+          must be set to a positive integer or <code>"-1"</code> for this attribute to have an effect. Set to <code>"reverse"</code>
+          to have the animation reverse direction with each iteration or <code>"repeat"</code> to have the animation
+          loop from the beginning each time.
+        </dd>
+
+        <dt>
+          <code>android:valueType</code>
+        </dt>
+        <dd>
+          <em>Keyword</em>. Do not specify this attribute if the value is a color. The animation framework automatically handles color
+          values.
+          <table> 
+            <tr><th>Value</th><th>Description</th></tr> 
+            <tr><td><code>intType</code></td><td>Specifies that the animated values are integers</td></tr> 
+            <tr><td><code>floatType</code> (default)</td><td>Specifies that the animated values are floats</td></tr> 
+          </table> 
+        </dd>
+
+      </dl>
+    </dd>
+  </dl>
+
+</dd> <!-- end  elements and attributes -->
+
+<dt>example:</dt>
+<dd>
+  <pp>XML file saved at <code>res/animator/property_animator.xml</code>:</p>
+<pre>
+&lt;set android:ordering="sequentially"&gt;
+    &lt;set&gt;
+        &lt;objectAnimator
+            android:propertyName="x"
+            android:duration="500"
+            android:valueTo="400"
+            android:valueType="intType"/&gt;
+        &lt;objectAnimator
+            android:propertyName="y"
+            android:duration="500"
+            android:valueTo="300"
+            android:valueType="intType"/&gt;
+    &lt;/set&gt;
+    &lt;objectAnimator
+        android:propertyName="alpha"
+        android:duration="500"
+        android:valueTo="1f"/&gt;
+&lt;/set&gt;
+</pre>
+  <p>In order to run this animation, you must inflate the XML resources in your code to an {@link
+  android.animation.AnimatorSet} object, and then set the target objects for all of the animations
+  before starting the animation set. Calling {@link android.animation.AnimatorSet#setTarget
+  setTarget()} sets a single target object for all children of the {@link
+  android.animation.AnimatorSet} as a convenience. The following code shows how to do this:</p>
+  
+<pre>
+AnimatorSet set = (AnimatorSet) AnimatorInflater.loadAnimator(myContext,
+    R.anim.property_animator);
+set.setTarget(myObject);
+set.start();
+</pre>
+
+
+</dd> <!-- end example -->
+
+<dt>see also:</dt>
+<dd>
+<ul>
+  <li><a href="{@docRoot}guide/topics/graphics/animation.html">Property Animation</a></li>
+  <li><a href="http://zoso:8080/resources/samples/ApiDemos/src/com/example/android/apis/animation/index.html">API Demos</a> for examples
+  on how to use the property animation system.</li>
+</ul>
+</dd>
+
+</dl>
+
+<h2 id="View">View Animation</h2>
+The view animation framework supports both tween and frame by frame animations, which can both be declared
+in XML. The following sections describe how to use both methods.
+
+<h3 id="Tween">Tween animation</h3>
 
 <p>An animation defined in XML that performs transitions such as rotating,
 fading, moving, and stretching on a graphic.
@@ -254,18 +574,14 @@
 <dt>see also:</dt>
 <dd>
 <ul>
-  <li><a href="{@docRoot}guide/topics/graphics/2d-graphics.html#tween-animation">2D
+  <li><a href="{@docRoot}guide/topics/graphics/view-animation.html#tween-animation">2D
 Graphics: Tween Animation</a></li>
 </ul>
 </dd>
 
 </dl>
 
-
-
-
-
-<h3 id="Interpolators">Interpolators</h3>
+<h4 id="Interpolators">Interpolators</h4>
 
 <p>An interpolator is an animation modifier defined in XML that affects the rate of change in an
 animation. This allows your existing animation effects to be accelerated, decelerated, repeated,
@@ -456,22 +772,7 @@
 </dl>
 
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-<h2 id="Frame">Frame Animation</h2>
+<h3 id="Frame">Frame animation</h3>
 
 <p>An animation defined in XML that shows a sequence of images in order (like a film).
 </p>
@@ -562,7 +863,11 @@
   </dl>
 </dd> <!-- end example -->
 
+<dt>see also:</dt>
+<dd>
+<ul>
+  <li><a href="{@docRoot}guide/topics/graphics/view-animation.html#frame-animation">2D
+Graphics: Frame Animation</a></li>
+</ul>
+</dd>
 </dl>
-
-
-
diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd
index 32595a0..a996ccc 100644
--- a/docs/html/guide/topics/resources/providing-resources.jd
+++ b/docs/html/guide/topics/resources/providing-resources.jd
@@ -88,9 +88,18 @@
   </tr>
 
   <tr>
+    <td><code>animator/</code></td>
+    <td>XML files that define <a href="{@docRoot}guide/topics/graphics/animation.html">property
+animations</a>.</td>
+  </tr>
+
+  <tr>
     <td><code>anim/</code></td>
-    <td>XML files that define tween animations. See <a
-href="animation-resource.html">Animation Resources</a>.</td>
+    <td>XML files that define <a
+href="{@docRoot}guide/topics/graphics/view-animation.html#tween-animation">tween
+animations</a>. (Property animations can also be saved in this directory, but
+the {@code animator/} directory is preferred for property animations to distinguish between the two
+types.)</td>
   </tr>
 
   <tr>
@@ -324,6 +333,86 @@
 indicates the current locale.</p>
       </td>
     </tr>
+    <tr id="SmallestScreenWidthQualifier">
+      <td>Smallest screen width</td>
+      <td>Examples:<br/>
+        <code>sw320dp</code><br/>
+        <code>sw600dp</code><br/>
+        <code>sw720dp</code><br/>
+        etc.
+      </td>
+      <td>
+        <p>Specifies a minimum "smallest screen width," in "dp" units, at which the resource
+          should be used.  This configuration value represents the base screen size
+          of the device, regardless of the orientation of the display.  It is based
+          on the smallest width the application will have in which to perform its
+          UI layout (in dp units) regardless of the orientation of the screen.  The
+          value here takes into account screen decorations so if the device has some
+          persistent UI elements on the left or right edge of the display it must
+          present a value here that is smaller than the real screen size, accounting
+          for these UI elements reducing the application's available space.</p>
+        <p>Some values you may use here for common screen sizes:</p>
+        <ul>
+          <li>240x320 ldpi (QVGA phone): 320
+          <li>320x480 mdpi (phone): 320
+          <li>480x800 hdpi (high density phone): 320
+          <li>480x800 mdpi (tablet/phone): 480
+          <li>600x1024 mdpi (7" tablet): 600
+          <li>720x1280 mdpi (10" tablet): 720
+        </ul>
+        <p><em>Added in API Level 13.</em></p>
+        <p>Also see the {@link android.content.res.Configuration#smallestScreenWidthDp}
+          configuration field, which holds the current smallest screen width.</p>
+      </td>
+    </tr>
+    <tr id="ScreenWidthQualifier">
+      <td>Screen width</td>
+      <td>Examples:<br/>
+        <code>w720dp</code><br/>
+        <code>w1024dp</code><br/>
+        etc.
+      </td>
+      <td>
+        <p>Specifies a minimum screen width, in "dp" units, at which the resource
+          should be used.  This configuration value will change when the orientation
+          changes between landscape and portrait to match the current actual width.
+          When multiple screen width configurations are available, the closest to
+          the current screen width will be used.  The
+          value here takes into account screen decorations so if the device has some
+          persistent UI elements on the left or right edge of the display it must
+          present a value here that is smaller than the real screen size, accounting
+          for these UI elements reducing the application's available space.</p>
+        <p><em>Added in API Level 13.</em></p>
+        <p>Also see the {@link android.content.res.Configuration#screenWidthDp}
+          configuration field, which holds the current screen width.</p>
+      </td>
+    </tr>
+    <tr id="ScreenHeightQualifier">
+      <td>Screen height</td>
+      <td>Examples:<br/>
+        <code>h720dp</code><br/>
+        <code>h1024dp</code><br/>
+        etc.
+      </td>
+      <td>
+        <p>Specifies a minimum screen height, in "dp" units, at which the resource
+          should be used.  This configuration value will change when the orientation
+          changes between landscape and portrait to match the current actual height.
+          When multiple screen height configurations are available, the closest to
+          the current screen height will be used.  The
+          value here takes into account screen decorations so if the device has some
+          persistent UI elements on the left or right edge of the display it must
+          present a value here that is smaller than the real screen size, accounting
+          for these UI elements reducing the application's available space.  Screen
+          decorations that are not fixed (such as a phone status bar that can be
+          hidden when full screen) are <em>not</em> accounted for here, nor are
+          window decorations like title bar, so applications must be prepared to
+          deal with a somewhat smaller space than they specify.
+        <p><em>Added in API Level 13.</em></p>
+        <p>Also see the {@link android.content.res.Configuration#screenHeightDp}
+          configuration field, which holds the current screen width.</p>
+      </td>
+    </tr>
     <tr id="ScreenSizeQualifier">
       <td>Screen size</td>
       <td>
@@ -383,46 +472,6 @@
 which indicates whether the screen is long.</p>
       </td>
     </tr>
-    <tr id="ScreenWidthQualifier">
-      <td>Screen width</td>
-      <td>Examples:<br/>
-        <code>w720dp</code><br/>
-        <code>w1024dp</code><br/>
-        etc.
-      </td>
-      <td>
-        <p>Specifies a minimum screen width, in "dp" units, at which the resource
-          should be used.  This configuration value will change when the orientation
-          changes between landscape and portrait to match the current actual width.
-          When multiple screen width configurations are available, the closest to
-          the current screen width will be used.  The value specified here is
-          approximate; screen decorations like a status bar or system bar may cause
-          the actual space available in your UI to be slightly smaller.
-        <p><em>Added in API Level 13.</em></p>
-        <p>Also see the {@link android.content.res.Configuration#screenWidthDp}
-          configuration field, which holds the current screen width.</p>
-      </td>
-    </tr>
-    <tr id="ScreenHeightQualifier">
-      <td>Screen height</td>
-      <td>Examples:<br/>
-        <code>h720dp</code><br/>
-        <code>h1024dp</code><br/>
-        etc.
-      </td>
-      <td>
-        <p>Specifies a minimum screen height, in "dp" units, at which the resource
-          should be used.  This configuration value will change when the orientation
-          changes between landscape and portrait to match the current actual height.
-          When multiple screen height configurations are available, the closest to
-          the current screen height will be used.  The value specified here is
-          approximate; screen decorations like a status bar or system bar may cause
-          the actual space available in your UI to be slightly smaller.
-        <p><em>Added in API Level 13.</em></p>
-        <p>Also see the {@link android.content.res.Configuration#screenHeightDp}
-          configuration field, which holds the current screen width.</p>
-      </td>
-    </tr>
     <tr id="OrientationQualifier">
       <td>Screen orientation</td>
       <td>
diff --git a/docs/html/guide/topics/ui/actionbar.jd b/docs/html/guide/topics/ui/actionbar.jd
index 7e13569..6f12b95 100644
--- a/docs/html/guide/topics/ui/actionbar.jd
+++ b/docs/html/guide/topics/ui/actionbar.jd
@@ -184,7 +184,7 @@
 <pre>
 &lt;?xml version="1.0" encoding="utf-8"?&gt;
 &lt;menu xmlns:android="http://schemas.android.com/apk/res/android">
-    &lt;item android:id="@+id/menu_add"
+    &lt;item android:id="@+id/menu_save"
           android:icon="@drawable/ic_menu_save"
           android:title="@string/menu_save"
           <b>android:showAsAction="ifRoom|withText"</b> /&gt;
diff --git a/docs/html/guide/topics/usb/adk.jd b/docs/html/guide/topics/usb/adk.jd
index 8aaa65c..0e35637 100644
--- a/docs/html/guide/topics/usb/adk.jd
+++ b/docs/html/guide/topics/usb/adk.jd
@@ -24,8 +24,7 @@
         </li>
 
         <li>
-          <a href="#how">How an Accessory Communicates with an Android-powered Device in Accessory
-          Mode</a>
+          <a href="#accessory-protocol">Implementing the Android Accessory Protocol</a>
 
           <ol>
             <li><a href="#wait">Wait for and detect connected devices</a></li>
@@ -40,8 +39,7 @@
         </li>
 
         <li>
-          <a href="#firmware">How the ADK board communicates with an Android-powered Device in
-          Accessory Mode</a>
+          <a href="#firmware">How the ADK board implements the Android Accessory Protocol</a>
 
           <ol>
             <li><a href="#wait-adk">Wait for and detect connected devices</a></li>
@@ -56,7 +54,6 @@
         </li>
       </ol>
 
-      
 
       <h2>See also</h2>
 
@@ -64,10 +61,16 @@
         <li><a href="http://www.youtube.com/watch?v=s7szcpXf2rE">Google I/O Session Video</a></li>
         <li><a href="{@docRoot}guide/topics/usb/accessory.html">USB Accessory Dev Guide</a></li>
       </ol>
-      
+
       <h2>Where to buy</h2>
 
       <ol>
+      <li><a href="http://shop.moderndevice.com/products/freeduino-usb-host-board">
+        Modern Device</a></li>
+
+      <li><a href="http://www.seeedstudio.com/depot/seeeduino-adk-main-board-p-846.html">
+        Seeed Studio</a></li>
+
         <li><a href=
         "http://www.rt-net.jp/shop/index.php?main_page=product_info&cPath=3_4&products_id=1">
         RT Corp</a></li>
@@ -78,6 +81,7 @@
 
         <li><a href="https://store.diydrones.com/ProductDetails.asp?ProductCode=BR-PhoneDrone">
         DIY Drones</a></li>
+
       </ol>
     </div>
   </div>
@@ -86,7 +90,7 @@
   support, which allows external USB hardware (an Android USB accessory) to interact with an
   Android-powered device in a special "accessory" mode. When an Android-powered powered device is
   in accessory mode, the connected accessory acts as the USB host (powers the bus and enumerates
-  devices) and the Android-powered device acts as the device. Android USB accessories are
+  devices) and the Android-powered device acts as the USB device. Android USB accessories are
   specifically designed to attach to Android-powered devices and adhere to a simple protocol
   (Android accessory protocol) that allows them to detect Android-powered devices that support
   accessory mode. Accessories must also provide 500mA at 5V for charging power. Many previously
@@ -105,13 +109,22 @@
   development boards:</p>
 
   <ul>
+    <li><a href="http://shop.moderndevice.com/products/freeduino-usb-host-board">Modern
+    Device</a> provides an Arduino-compatible board that supports the ADK firmware.</li>
+
+    <li><a href="http://www.seeedstudio.com/depot/seeeduino-adk-main-board-p-846.html">
+    Seeed Studio</a> provides an Arduino-compatible board that supports the ADK firmware.</li>
+
     <li><a href="http://www.rt-net.jp/shop/index.php?main_page=product_info&cPath=3_4&products_id=1">
     RT Corp</a> provides an Arduino-compatible board based on the Android ADK board design.</li>
+
     <li><a href="http://www.microchip.com/android">Microchip</a> provides a A PIC based USB
     microcontroller board.</li>
+
     <li><a href="https://store.diydrones.com/ProductDetails.asp?ProductCode=BR-PhoneDrone">DIY
     Drones</a> provides an Arduino-compatible board geared towards RC (radio controlled) and UAV
     (unmanned aerial vehicle) enthusiasts.</li>
+
   </ul>
 
   <p>We expect more hardware distributers to create a variety of kits, so please stay tuned for
@@ -122,7 +135,7 @@
   accessory that is based on the <a href="http://www.arduino.cc/">Arduino open source electronics
   prototyping platform</a>, the accessory's hardware design files, code that implements the
   accessory's firmware, and the Android application that interacts with the accessory. The hardware
-  design files and firmware code are contained in the <a href=
+  design files and firmware code are contained in the <a href=ctive 
   "https://dl-ssl.google.com/android/adk/adk_release_0512.zip">ADK package download</a>.</p>
   <p>The main hardware and software components of the ADK include:</p>
 
@@ -380,14 +393,11 @@
   accessories communicate with Android-powered devices describe much of what you should be doing in
   your own accessory.</p>
 
-  <h2 id="how">How an Accessory Communicates with an Android-powered Device in Accessory Mode</h2>
+  <h2 id="accessory-protocol">Implementing the Android Accessory Protocol</h2>
 
-  <p>When you connect an accessory to an Android-powered device, the accessory's firmware must
-  carry out some standard steps to set up communication with the Android-powered device. If you are
-  building an accessory along with an application, this section goes over some general steps that
-  your firmware should carry out.</p>
-
-  <p>In general, an accessory should carry out the following steps:</p>
+  <p>An Android USB accessory must adhere to Android Accessory Protocol, which defines how
+  an accessory detects and sets up communication with an Android-powered device. In general, an
+  accessory should carry out the following steps:</p>
 
   <ol>
     <li>Wait for and detect connected devices</li>
@@ -399,6 +409,8 @@
     <li>Establish communication with the device if it supports the Android accessory protocol</li>
   </ol>
 
+  <p>The following sections go into depth about how to implement these steps.</p>
+
   <h3 id="wait">Wait for and detect connected devices</h3>
 
   <p>Your accessory should have logic to continuously check
@@ -476,12 +488,12 @@
       <p>The following string IDs are supported, with a maximum size of 256 bytes for each string
       (must be zero terminated with \0).</p>
       <pre>
-manufacturer name:  1
-model name:         2
-description:        3
-version:            4
-URI:                5
-serial number:      6
+manufacturer name:  0
+model name:         1
+description:        2
+version:            3
+URI:                4
+serial number:      5
 </pre>
     </li>
 
@@ -520,12 +532,11 @@
   device's configuration to a value of 1 with a SET_CONFIGURATION (0x09) device request, then
   communicate using the endpoints.</p>
 
-  <h2 id="firmware">How the ADK board communicates with an Android-powered Device in Accessory
-  Mode</h2>
+  <h2 id="firmware">How the ADK board implements the Android Accessory protocol</h2>
 
   <p>If you have access to the ADK board and shield, the following sections describe the firmware
   code that you installed onto the ADK board. The firmware demonstrates a practical example of how
-  to communicate with an Android-powered device. Even if you do not have the ADK board and shield,
+  to implement the Android Accessory protocol. Even if you do not have the ADK board and shield,
   reading through how the hardware detects and interacts with devices in accessory mode is still
   useful if you want to port the code over for your own accessories.</p>
 
@@ -540,8 +551,7 @@
   sections.</p>
 
   <p>The following sections describe the firmware code in the context of the algorithm described in
-  <a href="#how">How an Accessory Communicates with an Android-powered Device in Accessory
-  Mode</a>.</p>
+  <a href="#accessory-protocol">Implementing the Android Accessory Protocol</a>.</p>
 
   <h3 id="wait-adk">Wait for and detect connected devices</h3>
 
@@ -559,13 +569,13 @@
                      "1.0",
                      "http://www.android.com",
                      "0000000012345678");
-                     
+
 ...
 void loop()
 {
 ...
-    if (acc.isConnected()) {  
-        //communicate with Android application 
+    if (acc.isConnected()) {
+        //communicate with Android application
     }
     else{
         //set the accessory to its default state
@@ -728,7 +738,7 @@
         Serial.print("Can't get config descriptor\n");
         return false;
     }
-    
+
 ...
 </pre>
 
@@ -859,13 +869,13 @@
   changes the state of the accessory, such as lighting up or changing the color of the LED
   lights.</p>
   <pre>
-int AndroidAccessory::read(void *buff, int len, unsigned int nakLimit) { 
-  return usb.newInTransfer(1, in, len, (char *)buff, nakLimit); } 
-  
-int AndroidAccessory::write(void *buff, int len) { 
-  usb.outTransfer(1, out, len, (char *)buff); 
+int AndroidAccessory::read(void *buff, int len, unsigned int nakLimit) {
+  return usb.newInTransfer(1, in, len, (char *)buff, nakLimit); }
+
+int AndroidAccessory::write(void *buff, int len) {
+  usb.outTransfer(1, out, len, (char *)buff);
   return len; }
-  
+
 </pre>
 
   <p>See the <code>firmware/demokit/demokit.pde</code> file for information about how the ADK board
diff --git a/docs/html/guide/topics/usb/index.jd b/docs/html/guide/topics/usb/index.jd
index 18af06a..3e2a18b 100644
--- a/docs/html/guide/topics/usb/index.jd
+++ b/docs/html/guide/topics/usb/index.jd
@@ -6,9 +6,9 @@
       <h2>Topics</h2>
 
       <ol>
-        <li><a href="{@docRoot}/guide/topics/USB/accessory.jd">USB Accessory</a></li>
+        <li><a href="{@docRoot}guide/topics/USB/accessory.jd">USB Accessory</a></li>
 
-        <li><a href="{@docRoot}/guide/topics/USB/host.jd">USB Host</a></li>
+        <li><a href="{@docRoot}guide/topics/USB/host.jd">USB Host</a></li>
       </ol>
     </div>
   </div>
diff --git a/docs/html/guide/topics/wireless/bluetooth.jd b/docs/html/guide/topics/wireless/bluetooth.jd
index 48632ea..a6c46d2 100644
--- a/docs/html/guide/topics/wireless/bluetooth.jd
+++ b/docs/html/guide/topics/wireless/bluetooth.jd
@@ -66,7 +66,7 @@
 
 <h2 id="TheBasics">The Basics</h2>
 
-<p>This document describes how to us the Android Bluetooth APIs to accomplish
+<p>This document describes how to use the Android Bluetooth APIs to accomplish
 the four major tasks necessary to communicate using Bluetooth: setting up
 Bluetooth, finding devices that are either paired or available in the local
 area, connecting devices, and transferring data between devices.</p>
diff --git a/docs/html/resources/articles/images/service-api-changes-starting-with_runningservices.png b/docs/html/resources/articles/images/service-api-changes-starting-with_runningservices.png
new file mode 100644
index 0000000..e159fff
--- /dev/null
+++ b/docs/html/resources/articles/images/service-api-changes-starting-with_runningservices.png
Binary files differ
diff --git a/docs/html/resources/articles/images/service-api-changes-starting-with_stopservice.png b/docs/html/resources/articles/images/service-api-changes-starting-with_stopservice.png
new file mode 100644
index 0000000..cc8f0a2
--- /dev/null
+++ b/docs/html/resources/articles/images/service-api-changes-starting-with_stopservice.png
Binary files differ
diff --git a/docs/html/resources/articles/multitasking-android-way.jd b/docs/html/resources/articles/multitasking-android-way.jd
new file mode 100644
index 0000000..0dc8627
--- /dev/null
+++ b/docs/html/resources/articles/multitasking-android-way.jd
@@ -0,0 +1,103 @@
+page.title=Multitasking the Android Way
+parent.title=Articles
+parent.link=../browser.html?tag=article
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+  <h2>See also</h2>
+  <ol>
+    <li><a href="{@docRoot}guide/topics/fundamentals/tasks-and-back-stack.html">Tasks and Back Stack</a></li>
+    <li><a href="{@docRoot}guide/topics/fundamentals/services.html">Services</a></li>
+  </ol>
+
+  <h2>Key classes</h2>
+  <ol>
+    <li>{@link android.app.Service}</li>
+    <li>{@link android.content.BroadcastReceiver}</li>
+  </ol>
+
+</div>
+</div>
+
+<p>Android is fairly unique in the ways it allows multiple applications to run at the same time.  Developers coming from a different platform may find the way it operates surprising.  Understanding its behavior is important for designing applications that will work well and integrate seamlessly with the rest of the Android platform.  This article covers the reasons for Android's multitasking design, its impact on how applications work, and how you can best take advantage of Android's unique features.</p>
+<h3>Design considerations</h3>
+<p>Mobile devices have technical limitations and user experience requirements not present in desktop or web systems.  Here are the four key constraints we were working under as we designed Android's multitasking:</p>
+<ul>
+  <li>
+    <p>We did not want to require that users close applications when "done" with them.  Such a usage pattern does not work well in a mobile environment, where usage tends to involve repeated brief contact with a wide variety of applications throughout the day.</p>
+  </li>
+  <li>
+    <p>Mobile devices don't have the luxury of swap space, so have fairly hard limits on memory use.  Robert Love has <a href="http://blog.rlove.org/2010/04/why-ipad-and-iphone-dont-support.html">a very good article</a> covering the topic.</p>
+  </li>
+  <li>
+    <p>Application switching on a mobile device is extremely critical; we target significantly less than 1 second to launch a new application.  This is especially important when the user is switching between a few applications, such as switching to look at a new SMS message while watching a video, and then returning to that video.  A noticeable wait in such situations will quickly make users hate you.</p>
+  </li>
+  <li>
+    <p>The available APIs must be sufficient for writing the built-in Google applications, as part of our "all applications are created equal" philosophy.  This means background music playback, data syncing, GPS navigation, and application downloading must be implemented with the same APIs that are available to third party developers.</p>
+  </li>
+</ul>
+<p>The first two requirements highlight an interesting conflict.  We don't want users to worry about closing their apps, but rather make it appear that all of the applications are always running.  At the same time, mobile devices have hard limits on memory use, so that a system will degrade or even start failing very quickly as it needs more RAM than is available; a desktop computer, with swap, in contrast will simply start slowing down as it needs to page RAM to its swap space.  These competing constraints were a key motivation for Android's design.</p>
+<h3>When does an application "stop"?</h3>
+<p>A common misunderstanding about Android multitasking is the difference between a process and an application.  In Android these are not tightly coupled entities: applications may seem present to the user without an actual process currently running the app; multiple applications may share processes, or one application may make use of multiple processes depending on its needs; the process(es) of an application may be kept around by Android even when that application is not actively doing something.</p>
+<p>The fact that you can see an application's process "running" does not mean the application is running or doing anything.  It may simply be there because Android needed it at some point, and has decided that it would be best to keep it around in case it needs it again.  Likewise, you may leave an application for a little bit and return to it from where you left off, and during that time Android may have needed to get rid of the process for other things.</p>
+<p>A key to how Android handles applications in this way is that processes don't shut down cleanly.  When the user leaves an application, its process is kept around in the background, allowing it to continue working (for example downloading web pages) if needed, and come immediately to the foreground if the user returns to it.  If a device never runs out of memory, then Android will keep all of these processes around, truly leaving all applications "running" all of the time.</p>
+<p>Of course, there is a limited amount of memory, and to accommodate this Android must decide when to get rid of processes that are not needed.  This leads to Android's <a href="{@docRoot}guide/topics/fundamentals.html#proclife">process lifecycle</a>, the rules it uses to decide how important each process is and thus the next one that should be dropped.  These rules are based on both how important a process is for the user's current experience, as well as how long it has been since the process was last needed by the user.</p>
+<p>Once Android determines that it needs to remove a process, it does this brutally, simply force-killing it.  The kernel can then immediately reclaim all resources needed by the process, without relying on that application being well written and responsive to a polite request to exit.  Allowing the kernel to immediately reclaim application resources makes it a lot easier to avoid serious out of memory situations.</p>
+<p>If a user later returns to an application that's been killed, Android needs a way to re-launch it in the same state as it was last seen, to preserve the "all applications are running all of the time" experience.  This is done by keeping track of the parts of the application the user is aware of (the Activities), and re-starting them with information about the last state they were seen in.  This last state is generated each time the user leaves that part of the application, not when it is killed, so that the kernel can later freely kill it without depending on the application to respond correctly at that point.</p>
+<p>In some ways, Android's process management can be seen as a form of swap space: application processes represent a certain amount of in-use memory; when memory is low, some processes can be killed (swapped out); when those processes are needed again, they can be re-started from their last saved state (swapped in).</p>
+<h3>Explicitly running in the background</h3>
+<p>So far, we have a way for applications to implicitly do work in the background, as long as the process doesn't get killed by Android as part of its regular memory management.  This is fine for things like loading web pages in the background, but what about features with harder requirements?  Background music playback, data synchronization, location tracking, alarm clocks, etc.</p>
+<p/>
+<p>For these tasks, the application needs a way to tell Android "I would explicitly like to run at this point."  There are two main facilities available to applications for this, represented by two kinds of components they can publish in their manifest: <span style="font-style:italic;">broadcast receivers</span> and <span style="font-style:italic;">services</span>.</p>
+<h4>Broadcast Receivers</h4>
+<p>A BroadcastReceiver allows an application to run, for a brief amount of time, in the background as a result of something else happening.  It can be used in many ways to build higher-level facilities: for example the AlarmManager allows an application to have a broadcast sent at a certain time in the future, and the LocationManager can send a broadcast when it detects interesting changes in location.  Because information about the receiver is part of an application's manifest, Android can find and launch the application even if it isn't running; of course if it already has its process available in the background, the broadcast can very efficiently be directly dispatched to it.</p>
+<p>When handling a broadcast, the application is given a fixed set of time (currently 10 seconds) in which to do its work.  If it doesn't complete in that time, the application is considered to be misbehaving, and its process immediately tossed into the background state to be killed for memory if needed.</p>
+<p>Broadcast receivers are great for doing small pieces of work in response to an external stimulus, such as posting a notification to the user after being sent a new GPS location report.  They are very lightweight, since the application's process only needs to be around while actively receiving the broadcast.  Because they are active for a deterministic amount of time, fairly strong guarantees can be made about not killing their process while running.  However they are not appropriate for anything of indeterminate length, such as networking.</p>
+<h4>Services</h4>
+<p>A Service allows an application to implement longer-running background operations.  There are actually a lot of other functions that services provide, but for the discussion here their fundamental purpose is for an application to say "hey I would like to continue running even while in the background, until I say I am done."  An application controls when its service runs by explicitly starting and stopping the service.</p>
+<p>While services do provide a rich client-server model, its use is optional.  Upon starting an application's services, Android simply instantiates the component in the application's process to provide its context.  How it is used after that is up to the application: it can put all of the needed code inside of the service itself without interacting with other parts of the application, make calls on other singleton objects shared with other parts of the app, directly retrieve the Service instance from elsewhere if needed, or run it in another process and do a full-blown RPC protocol if that is desired.</p>
+<p>Process management for services is different than broadcast receivers, because an unbounded number of services can ask to be running for an unknown amount of time.  There may not be enough RAM to have all of the requesting services run, so as a result no strong guarantees are made about being able to keep them running.</p>
+<p>If there is too little RAM, processes hosting services will be immediately killed like background processes are.  However, if appropriate, Android will remember that these services wish to remain running, and restart their process at a later time when more RAM is available.  For example, if the user goes to a web page that requires large amounts of RAM, Android may kill background service processes like sync until the browser's memory needs go down.</p>
+<p>Services can further negotiate this behavior by requesting they be considered "foreground."  This places the service in a "please don't kill" state, but requires that it include a notification to the user about it actively running.  This is useful for services such as background music playback or car navigation, which the user is actively aware of; when you're playing music and using the browser, you can always see the music-playing glyph in the status bar.  Android won't try to kill these services, but as a trade-off, ensures the user knows about them and is able to explicitly stop them when desired.</p>
+<h3>The value of generic components</h3>
+<p>Android's generic broadcast receiver and service components allow developers to create a wide variety of efficient background operations, including things that were never originally considered.  In Android 1.0 they were used to implement nearly all of the background behavior that the built-in and proprietary Google apps provided:</p>
+<ul>
+  <li>
+    Music playback runs in a service to allow it to continue operating after the user leaves the music application.
+  </li>
+  <li>
+    The alarm clock schedules a broadcast receiver with the alarm manager, to go off at the next set alarm time.
+  </li>
+  <li>
+    The calendar application likewise schedules an alarm to display or update its notification at the appropriate time for the next calendar event.
+  </li>
+  <li>
+    Background file download is implemented a service that runs when there are any downloads to process.
+  </li>
+  <li>
+    The e-mail application schedules an alarm to wake up a service at regular intervals that looks for and retrieves any new mail.
+  </li>
+  <li>
+    The Google applications maintain a service to receive push notifications from the network; it in turn sends broadcasts to individual apps when it is told that they need to do things like synchronize contacts.</p>
+  </li>
+</ul>
+<p>As the platform has evolved, these same basic components have been used to implement many of the major new developer features:
+<ul>
+  <li>
+    Input methods are implemented by developers as a Service component that Android manages and works with to display as the current IME.
+  </li>
+  <li>
+    Application widgets are broadcast receivers that Android sends broadcasts to when it needs to interact with them.  This allows app widgets to be quite lightweight, by not needing their application's process remain running.
+  </li>
+  <li>
+    Accessibility features are implemented as services that Android keeps running while in use and sends appropriate information to about user interactions.
+  </li>
+  <li>
+    Sync adapters introduced in Android 2.0 are services that are run in the background when a particular data sync needs to be performed.
+  </li>
+  <li>
+    Live wallpapers are a service started by Android when selected by the user.
+  </li>
+</ul>
diff --git a/docs/html/resources/articles/service-api-changes-starting-with.jd b/docs/html/resources/articles/service-api-changes-starting-with.jd
new file mode 100644
index 0000000..7bafd81
--- /dev/null
+++ b/docs/html/resources/articles/service-api-changes-starting-with.jd
@@ -0,0 +1,177 @@
+page.title=Service API changes starting with Android 2.0
+parent.title=Articles
+parent.link=../browser.html?tag=article
+@jd:body
+
+
+<div id="qv-wrapper">
+<div id="qv">
+
+  <h2>See also</h2>
+  <ol>
+    <li><a href="{@docRoot}guide/topics/fundamentals/services.html">Services</a></li>
+  </ol>
+
+  <h2>Key classes</h2>
+  <ol>
+    <li>{@link android.app.Service}</li>
+  </ol>
+
+</div>
+</div>
+
+<p>Watching developers use the Android platform the last year has shown a number of trouble areas in the Service API as well as growing issues in the ways services operate. As a result, Android 2.0 introduced a number of changes and improvements in this area for both developers and users.</p>
+<p>The three main changes to be aware of are:</p>
+<ul>
+  <li>Service.setForeground() is now deprecated and in 2.0 does nothing.</li>
+  <li>There were many edge cases in the service lifecycle that made it very easy to accidentally leave a service running; new APIs in 2.0 make this much easier to deal with.</li>
+  <li>Android 2.0 also introduces a new UI for end users to monitor and manage the running services on their device.</li>
+</ul>
+<h3>Background on services</h3>
+<p>Before going into the details of 2.0, it may be useful to go over a quick summary of services. The Service API in Android is one of the key mechanisms for applications to do work in the background. Due to the way Android is designed, once an application is no longer visible to the user it is generally considered expendable and a candidate to be killed by the system if it ever needs memory elsewhere. The main way applications get around this is by starting a Service component, which explicitly tells the system that they are doing some valuable work and would prefer that the system not kill their process if it doesn't truly need to.</p>
+<p>This is a very powerful facility but along with that power comes some responsibility: an actively running service is taking resources away from other things that can run (including inactive processes in the background that don't need to be initialized the next time the user visits them). It is thus important that developers take care when designing their services that they only run when truly needed and avoid any bugs where they may accidentally leave the service running for long durations.</p>
+<h3>Redesigning Service.setForeground()</h3>
+<p>During the final stabilization period of Android 1.6 we started to see more issues due to an increasing number of applications using the Service.setForeground() API when they shouldn't be. This is an API that we haven't advertised much because it should not be used by most applications and can be very hard on the system: it asks that the service's process be treated as in the foreground, essentially making it unkillable and thus more difficult for the system to recover from low memory situations.</p>
+<p>At that point in 1.6 it was too late to make any significant changes to the behavior here, but in 2.0 we have done so: Service.setForeground() now does nothing. The API was always intended to be something a service would do in conjunction with putting up an ongoing notification for the user; by saying you are in the foreground, the user should be "aware" that the service is running in some way and know how to stop it. Thus in place of the old API Andriod 2.0 introduces two new APIs that require a notification go along with being in the foreground:</p>
+<pre class="prettyprint">
+public final void startForeground(int id, Notification notification);
+public final void stopForeground(boolean removeNotification);
+</pre>
+<p>This also not coincidentally makes it much easier to manage the notification state along with the service, since the system can now guarantee that there is always a notification while the service is in the foreground, and that the notification goes away whenever the service does.</p>
+<p>Many developers will want to write a service that works on older platforms as well as 2.0 and later; this can be accomplished by using something like the following code to selectively call the new APIs when they are available.</p>
+<pre class="prettyprint">
+private static final Class[] mStartForegroundSignature = new Class[] {
+    int.class, Notification.class};
+private static final Class[] mStopForegroundSignature = new Class[] {
+    boolean.class};
+
+private NotificationManager mNM;
+private Method mStartForeground;
+private Method mStopForeground;
+private Object[] mStartForegroundArgs = new Object[2];
+private Object[] mStopForegroundArgs = new Object[1];
+
+&#64;Override
+public void onCreate() {
+    mNM = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
+    try {
+        mStartForeground = getClass().getMethod("startForeground",
+                mStartForegroundSignature);
+        mStopForeground = getClass().getMethod("stopForeground",
+                mStopForegroundSignature);
+    } catch (NoSuchMethodException e) {
+        // Running on an older platform.
+        mStartForeground = mStopForeground = null;
+    }
+}
+
+/**
+ * This is a wrapper around the new startForeground method, using the older
+ * APIs if it is not available.
+ */
+void startForegroundCompat(int id, Notification notification) {
+    // If we have the new startForeground API, then use it.
+    if (mStartForeground != null) {
+        mStartForegroundArgs[0] = Integer.valueOf(id);
+        mStartForegroundArgs[1] = notification;
+        try {
+            mStartForeground.invoke(this, mStartForegroundArgs);
+        } catch (InvocationTargetException e) {
+            // Should not happen.
+            Log.w("MyApp", "Unable to invoke startForeground", e);
+        } catch (IllegalAccessException e) {
+            // Should not happen.
+            Log.w("MyApp", "Unable to invoke startForeground", e);
+        }
+        return;
+    }
+    
+    // Fall back on the old API.
+    setForeground(true);
+    mNM.notify(id, notification);
+}
+
+/**
+ * This is a wrapper around the new stopForeground method, using the older
+ * APIs if it is not available.
+ */
+void stopForegroundCompat(int id) {
+    // If we have the new stopForeground API, then use it.
+    if (mStopForeground != null) {
+        mStopForegroundArgs[0] = Boolean.TRUE;
+        try {
+            mStopForeground.invoke(this, mStopForegroundArgs);
+        } catch (InvocationTargetException e) {
+            // Should not happen.
+            Log.w("MyApp", "Unable to invoke stopForeground", e);
+        } catch (IllegalAccessException e) {
+            // Should not happen.
+            Log.w("MyApp", "Unable to invoke stopForeground", e);
+        }
+        return;
+    }
+    
+    // Fall back on the old API.  Note to cancel BEFORE changing the
+    // foreground state, since we could be killed at that point.
+    mNM.cancel(id);
+    setForeground(false);
+}
+</pre>
+<h3>Service lifecycle changes</h3>
+<p>Another situation we were increasingly seeing in 1.6 was that, even ignoring the services that inappropriately make themselves foreground, we had a growing number of devices with a large number of services running in the background all fighting each other over the available memory.</p>
+<p>Part of this problem is services that are running more than they should or there simply being too much stuff trying to be done on the device. However, we also found many issues in the interaction between services and the platform that made it easy for an application to leave a service running even when it is trying to do the right thing. Consider this typical scenario:</p>
+<ol>
+  <li>An application calls startService().</li>
+  <li>That service gets onCreate(), onStart(), and then spawns a background thread to do some work.</li>
+  <li>The system is tight on memory, so has to kill the currently running service.</li>
+  <li>Later when memory is free, the service is restarted, and gets onCreate() called but not onStart() because there has not been another call to startService() with a new Intent command to send it.</li>
+</ol>
+<p>Now the service will sit there created, not realizing it used to be doing some work, and so not knowing it should stop itself at some point.</p>
+<p>To address this, in Android 2.0 Service.onStart() as been deprecated (though still exists and operates as it used to in previous versions of the platform). It is replaced with a new {@link android.app.Service#onStartCommand(android.content.Intent, int, int)} callback that allows the service to better control how the system should manage it. The key part here is a new result code returned by the function, telling the system what it should do with the service if its process is killed while it is running:</p>
+<ul>
+  <li>{@link android.app.Service#START_STICKY} is basically the same as the previous behavior, where the service is left "started" and will later be restarted by the system. The only difference from previous versions of the platform is that it if it gets restarted because its process is killed, onStartCommand() will be called on the next instance of the service with a null Intent instead of not being called at all. Services that use this mode should always check for this case and deal with it appropriately.</li>
+  <li>{@link android.app.Service#START_NOT_STICKY} says that, after returning from onStartCreated(), if the process is killed with no remaining start commands to deliver, then the service will be stopped instead of restarted. This makes a lot more sense for services that are intended to only run while executing commands sent to them. For example, a service may be started every 15 minutes from an alarm to poll some network state. If it gets killed while doing that work, it would be best to just let it be stopped and get started the next time the alarm fires.</li>
+  <li>{@link android.app.Service#START_REDELIVER_INTENT} is like START_NOT_STICKY, except if the service's process is killed before it calls stopSelf() for a given intent, that intent will be re-delivered to it until it completes (unless after some number of more tries it still can't complete, at which point the system gives up). This is useful for services that are receiving commands of work to do, and want to make sure they do eventually complete the work for each command sent.</li>
+</ul>
+<p>For compatibility with existing applications, the default return code for applications that are targeting an earlier version of the platform is a special {@link android.app.Service#START_STICKY_COMPATIBILITY} code that provides the old behavior of not calling onStart() with a null intent. Once you start targeting API version 5 or later, the default mode is START_STICKY and you must be prepared to deal with onStart() or onStartCommand() being called with a null Intent.</p>
+<p>You can also easily write a Service that uses both the old and new APIs, depending on the platform. All you need to do is compile against the 2.0 SDK with this code:</p>
+<pre class="prettyprint">
+// This is the old onStart method that will be called on the pre-2.0
+// platform.  On 2.0 or later we override onStartCommand() so this
+// method will not be called.
+&#64;Override
+public void onStart(Intent intent, int startId) {
+    handleStart(intent, startId);
+}
+
+&#64;Override
+public int onStartCommand(Intent intent, int flags, int startId) {
+    handleStart(intent, startId);
+    return START_NOT_STICKY;
+}
+
+void handleStart(Intent intent, int startId) {
+    // do work
+}
+</pre>
+<h3>New "running services" user interface</h3>
+<p>Our final issue to address is the case where there are simply too many service running in the amount of memory available on a device. This may be due to bugs or design flaws in installed applications, or the user simply trying to do too much. Historically users have had no visibility into what is going on at this level in the system, but it has become important to expose this, at least for lower-end devices, as the use of services has had an increasing impact on the user experience.</p>
+<p>To help address this, Android 2.0 introduces a new "Running Services" activity available from the Application system settings. When brought up, it looks something like this:</p>
+<img src="images/service-api-changes-starting-with_runningservices.png" width="192" height="320" alt="Running Services"/>
+<p>The main content is a list of all running services that may be of interest to the user, organized by the processes they run in. In the example here, we see three services:</p>
+<ul>
+  <li><b>GTalkService</b> is part of the standard Google application suit; it is running in Google's "gapps" process, which currently consumes 6.8MB. It has been started for 3 hours 55 minutes, which on this device is the time from when it was first booted.</li>
+  <li><b>ActivityService</b> is part of the Phonebook app, and its process consumes 4MB. This also has been running since boot.</li>
+  <li><b>SoftKeyboard</b> is a third party input method. It has been running since I switched to it, about 4 minutes ago.</li>
+</ul>
+<p>The user can tap on any of these services to control it; for normal services that are running because they were explicitly started, this will present a dialog allowing the user to explicitly stop it:</p>
+<img src="images/service-api-changes-starting-with_stopservice.png" height="320" width="192" alt="Stop Service"/>
+<p>Some other services, like the input method, are running for other reasons. For these, tapping on the service will go to the corresponding UI to manage it (in this case the system's input settings).</p>
+<p>Finally, along the bottom of the screen are some obscure numbers. If you know how to interpret them, this gives you a lot of information on the memory status of your device:</p>
+<ul>
+  <li><b>Avail: 38MB+114MB in 25</b> says that the device has 38MB of completely free (or likely used for unrequired caches) memory, and has another 114MB of available memory in 25 background processes it can kill at any time.</li>
+  <li><b>Other: 32MB in 3</b> says that the device has 32MB of unavailable memory in 3 unkillable processes (that is, processes that are currently considered to be foreground and must be kept running)</li>
+</ul>
+<p>For most users, this new user interface should be a much more effective way to manage the background applications on their device than the existing "task killer" applications. In the vast majority of cases the reason for a slow running device is too many services trying to run. This prevents the system from being able to run any background processes (which speed up app switching), and ultimately can result in thrashing through the services when not even they can all be kept running. The Running Services UI is intended to provide very specific information about the services that are running, to help make a good decision about what should be stopped. It also does not use the API to force stop an application, which can unintentionally break applications in numerous ways.</p>
+<p>For developers, this is an important tool to ensure your services are well behaved. As you develop your app, be sure to keep an eye on Running Services to ensure that you are not accidentally leaving your services running when they shouldn't be. You should also now keep in mind that users may freely stop any of your services as they wish, without your control, and account for that.</p>
+<p>Android's Services are a very powerful tool, but one of the main and subtle ways that application developers can harm the overall experience a user has with their phone.</p>
diff --git a/docs/html/resources/resources-data.js b/docs/html/resources/resources-data.js
index b80b4a4..05dcf55 100644
--- a/docs/html/resources/resources-data.js
+++ b/docs/html/resources/resources-data.js
@@ -20,6 +20,7 @@
     'intent': 'Intents',
     'layout': 'Layouts/Views',
     'media': 'Multimedia',
+    'multitasking': 'Multi-tasking',
     'newfeature': 'New Features',
     'performance': 'Performance',
     'search': 'Search',
@@ -201,6 +202,16 @@
     }
   },
   {
+    tags: ['article', 'bestpractice', 'multitasking'],
+    path: 'articles/multitasking-android-way.html',
+    title: {
+      en: 'Multitasking the Android Way'
+    },
+    description: {
+      en: 'This article describes best practices and user experience guidelines for multi-tasking on Android.'
+    }
+  },
+  {
     tags: ['article', 'input'],
     path: 'articles/on-screen-inputs.html',
     title: {
@@ -241,6 +252,16 @@
     }
   },
   {
+    tags: ['article', 'compatibility', 'multitasking'],
+    path: 'articles/service-api-changes-starting-with.html',
+    title: {
+      en: 'Service API changes starting with Android 2.0'
+    },
+    description: {
+      en: 'This article describes the changes and improvements to services introduced in Android 2.0, as well as strategies for compatibility with older versions of the platform.'
+    }
+  },
+  {
     tags: ['article', 'ui'],
     path: 'articles/touch-mode.html',
     title: {
@@ -386,6 +407,26 @@
     }
   },
   {
+    tags: ['sample', 'layout', 'ui', 'fragment', 'loader', 'new'],
+    path: 'samples/Support4Demos/index.html',
+    title: {
+      en: 'API 4+ Support Demos'
+    },
+    description: {
+      en: 'A variety of small applications that demonstrate the use of the helper classes in the Android API 4+ Support Library (classes which work down to API level 4 or version 1.6 of the platform).'
+    }
+  },
+  {
+    tags: ['sample', 'layout', 'ui', 'new'],
+    path: 'samples/Support13Demos/index.html',
+    title: {
+      en: 'API 13+ Support Demos'
+    },
+    description: {
+      en: 'A variety of small applications that demonstrate the use of the helper classes in the Android API 13+ Support Library (classes which work down to API level 13 or version 3.2 of the platform).'
+    }
+  },
+  {
     tags: ['sample', 'data', 'newfeature', 'accountsync'],
     path: 'samples/BackupRestore/index.html',
     title: {
diff --git a/docs/html/sdk/eclipse-adt.jd b/docs/html/sdk/eclipse-adt.jd
index feb84b1..935bf63 100644
--- a/docs/html/sdk/eclipse-adt.jd
+++ b/docs/html/sdk/eclipse-adt.jd
@@ -1,8 +1,8 @@
 page.title=ADT Plugin for Eclipse
-adt.zip.version=10.0.1
-adt.zip.download=ADT-10.0.1.zip
-adt.zip.bytes=5096182
-adt.zip.checksum=e26a77db08377bdd2e62edeb9a3e3701
+adt.zip.version=11.0.0
+adt.zip.download=ADT-11.0.0.zip
+adt.zip.bytes=TODO
+adt.zip.checksum=TODO
 
 @jd:body
 
@@ -100,6 +100,139 @@
   <a href="#" onclick="return toggleDiv(this)">
         <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px"
 width="9px" />
+ADT 11.0.0</a> <em>(June 2011)</em>
+  <dd class="toggleme">
+
+<dl>
+
+<dt>Dependencies:</dt>
+
+<dd>ADT 11.0.0 is designed for use with SDK Tools r11. If you haven't
+already installed SDK Tools r11 into your SDK, use the Android SDK and AVD Manager to do
+so.</dd>
+
+<dt>Visual Refactoring:</dt>
+<dd>
+  <ul>
+    <li>"Extract Style" feature pulls out style-related attributes from your layout and extracts
+them as a new style defined in {@code styles.xml} (<a
+href="http://tools.android.com/recent/extractstylerefactoring">more info</a>).</li>
+    <li>"Wrap in Container" feature lets you select a group of views then surround them
+    in a new layout (a new view group, such as a LinearLayout), and transfers namespace and layout
+    parameters to the new parent (<a
+href="http://tools.android.com/recent/newrefactoringswrapinchangelayoutchangewidget">more
+info</a>).</li>
+    <li>"Change Layout" feature changes layouts from one type
+    to another, and can also flatten a layout hierarchy (<a
+href="http://tools.android.com/recent/newrefactoringswrapinchangelayoutchangewidget">more
+info</a>).</li>
+    <li>"Change Widget Type" feature changes the type of the
+    selected views to a new type. Also, a new selection context menu
+    in the visual layout editor makes it easy to select siblings as
+    well as views anywhere in the layout that have the same type (<a
+href="http://tools.android.com/recent/newrefactoringswrapinchangelayoutchangewidget">more
+info</a>).</li>
+    <li>"Extract as Include" feature finds identical collections of views
+    in other layouts and offers to combine them into a single layout that you can then include in
+ each layout (<a
+href="http://tools.android.com/recent/extractasincludeimprovements">more info</a>).</li>
+    <li>Quick Assistant in Eclipse can be invoked
+    from the XML editor (with Ctrl-1) to apply any of the above
+    refactorings (and Extract String) to the current selection (<a
+href="http://tools.android.com/recent/refactoringquickassistant">more info</a>).</li>
+  </ul>
+</dd>
+
+<dt>Visual Layout Editor:</dt>
+<dd>
+  <ul>
+    <li>This is the update to the layout editor you've been waiting for! It includes (almost) all
+the goodies demonstrated at Google I/O. <a href="http://www.youtube.com/watch?v=Oq05KqjXTvs">Watch
+the video</a> on YouTube.</li>
+    <li>The palette now supports different configurations for supported widgets. That is, a single
+view is presented in various different configurations that you can drag into your layout. For
+example, there is a <em>Text Fields</em> palette category where you can drag an {@link
+android.widget.EditText} widget in as a password field, an e-mail field, a phone field, or other
+types of text boxes. Similarly, {@link android.widget.TextView} widgets are preconfigured
+with large, normal and small theme sizes, and {@link android.widget.LinearLayout} elements are
+preconfigured in horizontal and vertical configurations (<a
+href="http://tools.android.com/recent/multipletextfieldandlayouttypes">more info</a>).</li>
+    <li>The palette supports custom views. You can pick up any custom
+    implementations of the View class you've created in your project or from included libraries and
+drag them into your layout (<a
+href="http://tools.android.com/recent/customviewsinthepalette">more info</a>).</li>
+    <li>Fragments are available in the palette for placement in your layout. In the tool, you can
+choose which layout to show rendered for a given fragment tag. Go to declaration works for fragment
+classes (<a href="http://tools.android.com/recent/fragmentsupport">more info</a>).</li> 
+    <li>The layout editor automatically applies a "zoom to fit" for newly
+    opened files as well as on device size and orientation changes to
+    ensure that large layouts are always fully visible unless you
+    manually zoom in.</li>
+    <li>You can drop in an {@code &lt;include&gt;} element from the palette, which will pop up
+    a layout chooser. When you select the layout to include, it is added with an {@code
+&lt;include&gt;}. Similarly, dropping images or image buttons will pop up image
+    resource choosers (<a
+href="http://tools.android.com/recent/includetagdropsupport">more info</a>).</li>
+    <li>The configuration chooser now applies the "Render Target" and
+    "Locale" settings project wide, making it trivial to check the
+    layouts for different languages or render targets without having
+    to configure these individually for each layout.</li>
+    <li>The layout editor is smarter about picking a default theme to
+    render a layout with, consulting factors like theme registrations
+    in the manifest, the SDK version, and other factors.</li>
+    <li>The layout editor is smarter about picking a default configuration to render a layout
+with, defaulting to the currently visible configuration in the previous file. It also considers the
+SDK target to determine whether to default to a tablet or phone screen size.</li>
+    <li>Basic focus support. The first text field dropped in a layout is assigned focus, and there
+are <strong>Request Focus</strong> and <strong>Clear Focus</strong> context menu items on text
+fields to change the focus.</li>
+  </ul>
+</dd>
+
+<dt>XML editors:</dt>
+<dd>
+<ul>  
+  <li>Code completion has been significantly improved. It now works
+  with {@code &lt;style&gt;} elements, completes dimensional units,
+  sorts resource paths in values based on the attribute name, and more. There are also many fixes to
+handle text replacement (<a
+href="http://tools.android.com/recent/xmlcodecompletionimprovements">more info</a>).</li>
+  <li>AAPT errors are handled better. They are now underlined for the
+  relevant range in the editor, and a new quickfix makes it trivial
+  to create missing resources.</li>
+  <li>Code completion for drawable, animation and color XML files (<a
+href="http://tools.android.com/recent/codecompletionfordrawablescolorsandanimationfiles">more
+info</a>).</li>
+</ul>
+</dd>
+
+<dt>DDMS:</dt>
+<dd>
+<ul>  
+  <li>"New Folder" action in the File Explorer.</li>
+  <li>The screenshot dialog will add timestamps to the filenames and preserve the orientation on
+snapshot refresh.</li>
+</ul>
+</dd>
+
+<dt>General notes:</dt>
+<dd>
+  <ul>
+    <li>TraceView supports zooming with the mouse-wheel in the timeline.</li>
+    <li>The New Android Project wizard now supports Eclipse working sets.</li>
+  </ul>
+</dd>
+</dl>
+<p>More information about tool changes are available on the <a
+href="http://tools.android.com/recent">Android Tools Project Site</a>.</p>
+</div>
+</div>
+
+
+<div class="toggleable closed">
+  <a href="#" onclick="return toggleDiv(this)">
+        <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px"
+width="9px" />
 ADT 10.0.1</a> <em>(March 2011)</em>
   <div class="toggleme">
 
diff --git a/docs/html/sdk/ndk/index.jd b/docs/html/sdk/ndk/index.jd
index bc9ba4b..e980ca5 100644
--- a/docs/html/sdk/ndk/index.jd
+++ b/docs/html/sdk/ndk/index.jd
@@ -1,16 +1,16 @@
 ndk=true
 
-ndk.win_download=android-ndk-r5b-windows.zip
-ndk.win_bytes=61299831
-ndk.win_checksum=87745ada305ab639399161ab4faf684c
+ndk.win_download=android-ndk-r5c-windows.zip
+ndk.win_bytes=61627716
+ndk.win_checksum=2c7423842fa0f46871eab118495d4b45
 
-ndk.mac_download=android-ndk-r5b-darwin-x86.tar.bz2
-ndk.mac_bytes=50210863
-ndk.mac_checksum=019a14622a377b3727ec789af6707037
+ndk.mac_download=android-ndk-r5c-darwin-x86.tar.bz2
+ndk.mac_bytes=50714712
+ndk.mac_checksum=183bfbbd85cf8e4c0bd7531e8803e75d
 
-ndk.linux_download=android-ndk-r5b-linux-x86.tar.bz2
-ndk.linux_bytes=44138539
-ndk.linux_checksum=4c0045ddc2bfd657be9d5177d0e0b7e7
+ndk.linux_download=android-ndk-r5c-linux-x86.tar.bz2
+ndk.linux_bytes=44539890
+ndk.linux_checksum=7659dfdc97026ed1d913e224d0531f61
 
 page.title=Android NDK
 @jd:body
@@ -52,14 +52,97 @@
   text-decoration:underline;
 }
 .toggleable.closed .toggleme {
-  display:none;
-}
+  display:none;}
 #jd-content .toggle-img {
   margin:0;
 }
 </style>
 
+
 <div class="toggleable open">
+  <a href="#" onclick="return toggleDiv(this)"><img src=
+  "{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px">
+  Android NDK, Revision 5c</a> <em>(June 2011)</em>
+
+  <div class="toggleme">
+    <p>This release of the NDK does not include any new features compared to r5b. The r5c release
+    addresses the following problems in the r5b release:</p>
+    <dl>
+      <dt>Important bug fixes:</dt>
+      <dd>
+        <ul>
+          <li><code>ndk-build</code>: Fixed a rare bug that appeared when trying to perform parallel
+          builds of debuggable projects.</li>
+
+          <li>Fixed a typo that prevented <code>LOCAL_WHOLE_STATIC_LIBRARIES</code> to work
+          correctly with the new toolchain and added documentation for this in
+          <code>docs/ANDROID-MK.html</code>.</li>
+
+          <li>Fixed a bug where code linked against <code>gnustl_static</code> crashed when run on
+          platform releases older than API level 8 (Android 2.2).</li>
+
+          <li><code>ndk-gdb</code>: Fixed a bug that caused a segmentation fault when debugging Android 3.0
+          or newer devices.</li>
+
+          <li><code>&lt;android/input.h&gt;</code>: Two functions that were introduced in API level
+          9 (Android 2.3) were incorrect and are fixed. While this breaks the source API, the
+          binary interface to the system is unchanged. The incorrect functions were missing a
+          <code>history_index</code> parameter, and the correct definitions are shown below:
+<pre>
+float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event,
+                                           size_t pointer_index,
+                                           size_t history_index);
+
+float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event,
+                                           size_t pointer_index,
+                                           size_t history_index);
+</pre>
+          </li>
+
+          <li>Updated the C library ARM binary for API level 9 (Android 2.3) to correctly expose at
+          link time new functions that were added in that API level (for example,
+          <code>pthread_rwlock_init</code>).</li>
+
+        </ul>
+      </dd>
+
+      <dt>Minor improvements and fixes:</dt>
+      <dd>
+        <ul>
+          <li>Object files are now always linked in the order they appear in
+          <code>LOCAL_SRC_FILES</code>. This was not the case previously because the files were
+          grouped by source extensions instead.</li>
+
+          <li>When <code>import-module</code> fails, it now prints the list of directories that
+          were searched. This is useful to check that the <code>NDK_MODULE_PATH</code> definition
+          used by the build system is correct.</li>
+
+          <li>When <code>import-module</code> succeeds, it now prints the directory where the
+          module was found to the log (visible with <code>NDK_LOG=1</code>).</li>
+
+          <li>Increased the build speed of debuggable applications when there is a very large number
+          of include directories in the project.</li>
+
+          <li><code>ndk-gdb</code>: Better detection of <code>adb shell</code> failures and improved
+          error messages.</li>
+
+          <li><code>&lt;pthread.h&gt;</code>: Fixed the definition of
+          <code>PTHREAD_RWLOCK_INITIALIZER</code> for API level 9 (Android 2.3) and higher.</li>
+
+          <li>Fixed an issue where a module could import itself, resulting in an infinite loop in
+          GNU Make.</li>
+
+          <li>Fixed a bug that caused the build to fail if <code>LOCAL_ARM_NEON</code> was set to
+          true (typo in <code>build/core/build-binary.mk</code>).</li>
+
+          <li>Fixed a bug that prevented the compilation of </code>.s</code> assembly files
+          (<code>.S</code> files were okay).</li>
+        </ul>
+      </dd>
+  </div>
+</div>
+
+<div class="toggleable closed">
     <a href="#"
          onclick="return toggleDiv(this)"><img src="{@docRoot}assets/images/triangle-closed.png"
          class="toggle-img"
diff --git a/docs/html/sdk/sdk_toc.cs b/docs/html/sdk/sdk_toc.cs
index 286307a..d02c13d 100644
--- a/docs/html/sdk/sdk_toc.cs
+++ b/docs/html/sdk/sdk_toc.cs
@@ -153,7 +153,7 @@
       <span style="display:none" class="zh-TW"></span>
       </h2>
     <ul>
-      <li><a href="<?cs var:toroot ?>sdk/eclipse-adt.html">ADT 10.0.1
+      <li><a href="<?cs var:toroot ?>sdk/eclipse-adt.html">ADT 11.0.0
       <span style="display:none" class="de"></span>
       <span style="display:none" class="es"></span>
       <span style="display:none" class="fr"></span>
@@ -161,7 +161,7 @@
       <span style="display:none" class="ja"></span>
       <span style="display:none" class="zh-CN"></span>
       <span style="display:none" class="zh-TW"></span></a>
-     <!-- <span class="new">new!</span> --></li>
+      <span class="new">new!</span></li>
     </ul>
   </li>
   <li>
@@ -175,7 +175,8 @@
       <span style="display:none" class="zh-TW"></span>
     </h2>
     <ul>
-      <li><a href="<?cs var:toroot ?>sdk/ndk/index.html">Android NDK, r5b</a>
+      <li><a href="<?cs var:toroot ?>sdk/ndk/index.html">Android NDK, r5c <span
+       class="new">new!</span></a>
         </li>
       <li><a href="<?cs var:toroot ?>sdk/ndk/overview.html">What is the NDK?</a></li>
     </ul>
diff --git a/include/ui/Input.h b/include/ui/Input.h
index fb6152e..074b38f 100644
--- a/include/ui/Input.h
+++ b/include/ui/Input.h
@@ -608,11 +608,6 @@
     // Oldest sample to consider when calculating the velocity.
     static const nsecs_t MAX_AGE = 200 * 1000000; // 200 ms
 
-    // When the total duration of the window of samples being averaged is less
-    // than the window size, the resulting velocity is scaled to reduce the impact
-    // of overestimation in short traces.
-    static const nsecs_t MIN_WINDOW = 100 * 1000000; // 100 ms
-
     // The minimum duration between samples when estimating velocity.
     static const nsecs_t MIN_DURATION = 10 * 1000000; // 10 ms
 
@@ -627,6 +622,87 @@
     int32_t mActivePointerId;
 };
 
+
+/*
+ * Specifies parameters that govern pointer or wheel acceleration.
+ */
+struct VelocityControlParameters {
+    // A scale factor that is multiplied with the raw velocity deltas
+    // prior to applying any other velocity control factors.  The scale
+    // factor should be used to adapt the input device resolution
+    // (eg. counts per inch) to the output device resolution (eg. pixels per inch).
+    //
+    // Must be a positive value.
+    // Default is 1.0 (no scaling).
+    float scale;
+
+    // The scaled speed at which acceleration begins to be applied.
+    // This value establishes the upper bound of a low speed regime for
+    // small precise motions that are performed without any acceleration.
+    //
+    // Must be a non-negative value.
+    // Default is 0.0 (no low threshold).
+    float lowThreshold;
+
+    // The scaled speed at which maximum acceleration is applied.
+    // The difference between highThreshold and lowThreshold controls
+    // the range of speeds over which the acceleration factor is interpolated.
+    // The wider the range, the smoother the acceleration.
+    //
+    // Must be a non-negative value greater than or equal to lowThreshold.
+    // Default is 0.0 (no high threshold).
+    float highThreshold;
+
+    // The acceleration factor.
+    // When the speed is above the low speed threshold, the velocity will scaled
+    // by an interpolated value between 1.0 and this amount.
+    //
+    // Must be a positive greater than or equal to 1.0.
+    // Default is 1.0 (no acceleration).
+    float acceleration;
+
+    VelocityControlParameters() :
+            scale(1.0f), lowThreshold(0.0f), highThreshold(0.0f), acceleration(1.0f) {
+    }
+
+    VelocityControlParameters(float scale, float lowThreshold,
+            float highThreshold, float acceleration) :
+            scale(scale), lowThreshold(lowThreshold),
+            highThreshold(highThreshold), acceleration(acceleration) {
+    }
+};
+
+/*
+ * Implements mouse pointer and wheel speed control and acceleration.
+ */
+class VelocityControl {
+public:
+    VelocityControl();
+
+    /* Sets the various parameters. */
+    void setParameters(const VelocityControlParameters& parameters);
+
+    /* Resets the current movement counters to zero.
+     * This has the effect of nullifying any acceleration. */
+    void reset();
+
+    /* Translates a raw movement delta into an appropriately
+     * scaled / accelerated delta based on the current velocity. */
+    void move(nsecs_t eventTime, float* deltaX, float* deltaY);
+
+private:
+    // If no movements are received within this amount of time,
+    // we assume the movement has stopped and reset the movement counters.
+    static const nsecs_t STOP_TIME = 500 * 1000000; // 500 ms
+
+    VelocityControlParameters mParameters;
+
+    nsecs_t mLastMovementTime;
+    VelocityTracker::Position mRawPosition;
+    VelocityTracker mVelocityTracker;
+};
+
+
 /*
  * Describes the characteristics and capabilities of an input device.
  */
diff --git a/include/utils/ResourceTypes.h b/include/utils/ResourceTypes.h
index c02d8ac..0603ed5 100644
--- a/include/utils/ResourceTypes.h
+++ b/include/utils/ResourceTypes.h
@@ -841,6 +841,7 @@
         DENSITY_DEFAULT = ACONFIGURATION_DENSITY_DEFAULT,
         DENSITY_LOW = ACONFIGURATION_DENSITY_LOW,
         DENSITY_MEDIUM = ACONFIGURATION_DENSITY_MEDIUM,
+        DENSITY_TV = ACONFIGURATION_DENSITY_TV,
         DENSITY_HIGH = ACONFIGURATION_DENSITY_HIGH,
         DENSITY_NONE = ACONFIGURATION_DENSITY_NONE
     };
@@ -1452,24 +1453,20 @@
     // settings is the requested settings
     inline bool match(const ResTable_config& settings) const {
         if (imsi != 0) {
-            if ((settings.mcc != 0 && mcc != 0
-                 && mcc != settings.mcc) || 
-                (settings.mcc == 0 && mcc != 0)) {
+            if (mcc != 0 && mcc != settings.mcc) {
                 return false;
             }
-            if ((settings.mnc != 0 && mnc != 0
-                 && mnc != settings.mnc) ||
-                (settings.mnc == 0 && mnc != 0)) {
+            if (mnc != 0 && mnc != settings.mnc) {
                 return false;
             }
         }
         if (locale != 0) {
-            if (settings.language[0] != 0 && language[0] != 0
+            if (language[0] != 0
                 && (language[0] != settings.language[0]
                     || language[1] != settings.language[1])) {
                 return false;
             }
-            if (settings.country[0] != 0 && country[0] != 0
+            if (country[0] != 0
                 && (country[0] != settings.country[0]
                     || country[1] != settings.country[1])) {
                 return false;
@@ -1480,66 +1477,56 @@
             const int setScreenSize = settings.screenLayout&MASK_SCREENSIZE;
             // Any screen sizes for larger screens than the setting do not
             // match.
-            if ((setScreenSize != 0 && screenSize != 0
-                    && screenSize > setScreenSize) ||
-                    (setScreenSize == 0 && screenSize != 0)) {
+            if (screenSize != 0 && screenSize > setScreenSize) {
                 return false;
             }
             
             const int screenLong = screenLayout&MASK_SCREENLONG;
             const int setScreenLong = settings.screenLayout&MASK_SCREENLONG;
-            if (setScreenLong != 0 && screenLong != 0
-                    && screenLong != setScreenLong) {
+            if (screenLong != 0 && screenLong != setScreenLong) {
                 return false;
             }
 
             const int uiModeType = uiMode&MASK_UI_MODE_TYPE;
             const int setUiModeType = settings.uiMode&MASK_UI_MODE_TYPE;
-            if (setUiModeType != 0 && uiModeType != 0
-                    && uiModeType != setUiModeType) {
+            if (uiModeType != 0 && uiModeType != setUiModeType) {
                 return false;
             }
 
             const int uiModeNight = uiMode&MASK_UI_MODE_NIGHT;
             const int setUiModeNight = settings.uiMode&MASK_UI_MODE_NIGHT;
-            if (setUiModeNight != 0 && uiModeNight != 0
-                    && uiModeNight != setUiModeNight) {
+            if (uiModeNight != 0 && uiModeNight != setUiModeNight) {
                 return false;
             }
 
-            if (settings.smallestScreenWidthDp != 0 && smallestScreenWidthDp != 0
+            if (smallestScreenWidthDp != 0
                     && smallestScreenWidthDp > settings.smallestScreenWidthDp) {
                 return false;
             }
         }
         if (screenSizeDp != 0) {
-            if (settings.screenWidthDp != 0 && screenWidthDp != 0
-                    && screenWidthDp > settings.screenWidthDp) {
+            if (screenWidthDp != 0 && screenWidthDp > settings.screenWidthDp) {
                 //LOGI("Filtering out width %d in requested %d", screenWidthDp, settings.screenWidthDp);
                 return false;
             }
-            if (settings.screenHeightDp != 0 && screenHeightDp != 0
-                    && screenHeightDp > settings.screenHeightDp) {
+            if (screenHeightDp != 0 && screenHeightDp > settings.screenHeightDp) {
                 //LOGI("Filtering out height %d in requested %d", screenHeightDp, settings.screenHeightDp);
                 return false;
             }
         }
         if (screenType != 0) {
-            if (settings.orientation != 0 && orientation != 0
-                && orientation != settings.orientation) {
+            if (orientation != 0 && orientation != settings.orientation) {
                 return false;
             }
             // density always matches - we can scale it.  See isBetterThan
-            if (settings.touchscreen != 0 && touchscreen != 0
-                && touchscreen != settings.touchscreen) {
+            if (touchscreen != 0 && touchscreen != settings.touchscreen) {
                 return false;
             }
         }
         if (input != 0) {
             const int keysHidden = inputFlags&MASK_KEYSHIDDEN;
             const int setKeysHidden = settings.inputFlags&MASK_KEYSHIDDEN;
-            if (setKeysHidden != 0 && keysHidden != 0
-                && keysHidden != setKeysHidden) {
+            if (keysHidden != 0 && keysHidden != setKeysHidden) {
                 // For compatibility, we count a request for KEYSHIDDEN_NO as also
                 // matching the more recent KEYSHIDDEN_SOFT.  Basically
                 // KEYSHIDDEN_NO means there is some kind of keyboard available.
@@ -1551,36 +1538,29 @@
             }
             const int navHidden = inputFlags&MASK_NAVHIDDEN;
             const int setNavHidden = settings.inputFlags&MASK_NAVHIDDEN;
-            if (setNavHidden != 0 && navHidden != 0
-                && navHidden != setNavHidden) {
+            if (navHidden != 0 && navHidden != setNavHidden) {
                 return false;
             }
-            if (settings.keyboard != 0 && keyboard != 0
-                && keyboard != settings.keyboard) {
+            if (keyboard != 0 && keyboard != settings.keyboard) {
                 return false;
             }
-            if (settings.navigation != 0 && navigation != 0
-                && navigation != settings.navigation) {
+            if (navigation != 0 && navigation != settings.navigation) {
                 return false;
             }
         }
         if (screenSize != 0) {
-            if (settings.screenWidth != 0 && screenWidth != 0
-                && screenWidth > settings.screenWidth) {
+            if (screenWidth != 0 && screenWidth > settings.screenWidth) {
                 return false;
             }
-            if (settings.screenHeight != 0 && screenHeight != 0
-                && screenHeight > settings.screenHeight) {
+            if (screenHeight != 0 && screenHeight > settings.screenHeight) {
                 return false;
             }
         }
         if (version != 0) {
-            if (settings.sdkVersion != 0 && sdkVersion != 0
-                && sdkVersion > settings.sdkVersion) {
+            if (sdkVersion != 0 && sdkVersion > settings.sdkVersion) {
                 return false;
             }
-            if (settings.minorVersion != 0 && minorVersion != 0
-                && minorVersion != settings.minorVersion) {
+            if (minorVersion != 0 && minorVersion != settings.minorVersion) {
                 return false;
             }
         }
@@ -2008,7 +1988,8 @@
                                   String16* outName,
                                   const String16* defType = NULL,
                                   const String16* defPackage = NULL,
-                                  const char** outErrorMsg = NULL);
+                                  const char** outErrorMsg = NULL,
+                                  bool* outPublicOnly = NULL);
 
     static bool stringToInt(const char16_t* s, size_t len, Res_value* outValue);
     static bool stringToFloat(const char16_t* s, size_t len, Res_value* outValue);
diff --git a/libs/ui/Input.cpp b/libs/ui/Input.cpp
index 684c332..1fc46aa 100644
--- a/libs/ui/Input.cpp
+++ b/libs/ui/Input.cpp
@@ -13,6 +13,10 @@
 // Log debug messages about velocity tracking.
 #define DEBUG_VELOCITY 0
 
+// Log debug messages about acceleration.
+#define DEBUG_ACCELERATION 0
+
+
 #include <stdlib.h>
 #include <unistd.h>
 #include <ctype.h>
@@ -20,6 +24,7 @@
 #include <ui/Input.h>
 
 #include <math.h>
+#include <limits.h>
 
 #ifdef HAVE_ANDROID_OS
 #include <binder/Parcel.h>
@@ -670,6 +675,10 @@
 
 // --- VelocityTracker ---
 
+const uint32_t VelocityTracker::HISTORY_SIZE;
+const nsecs_t VelocityTracker::MAX_AGE;
+const nsecs_t VelocityTracker::MIN_DURATION;
+
 VelocityTracker::VelocityTracker() {
     clear();
 }
@@ -858,14 +867,6 @@
 
         // Make sure we used at least one sample.
         if (samplesUsed != 0) {
-            // Scale the velocity linearly if the window of samples is small.
-            nsecs_t totalDuration = newestMovement.eventTime - oldestMovement.eventTime;
-            if (totalDuration < MIN_WINDOW) {
-                float scale = float(totalDuration) / float(MIN_WINDOW);
-                accumVx *= scale;
-                accumVy *= scale;
-            }
-
             *outVx = accumVx;
             *outVy = accumVy;
             return true;
@@ -879,6 +880,85 @@
 }
 
 
+// --- VelocityControl ---
+
+const nsecs_t VelocityControl::STOP_TIME;
+
+VelocityControl::VelocityControl() {
+    reset();
+}
+
+void VelocityControl::setParameters(const VelocityControlParameters& parameters) {
+    mParameters = parameters;
+    reset();
+}
+
+void VelocityControl::reset() {
+    mLastMovementTime = LLONG_MIN;
+    mRawPosition.x = 0;
+    mRawPosition.y = 0;
+    mVelocityTracker.clear();
+}
+
+void VelocityControl::move(nsecs_t eventTime, float* deltaX, float* deltaY) {
+    if ((deltaX && *deltaX) || (deltaY && *deltaY)) {
+        if (eventTime >= mLastMovementTime + STOP_TIME) {
+#if DEBUG_ACCELERATION
+            LOGD("VelocityControl: stopped, last movement was %0.3fms ago",
+                    (eventTime - mLastMovementTime) * 0.000001f);
+#endif
+            reset();
+        }
+
+        mLastMovementTime = eventTime;
+        if (deltaX) {
+            mRawPosition.x += *deltaX;
+        }
+        if (deltaY) {
+            mRawPosition.y += *deltaY;
+        }
+        mVelocityTracker.addMovement(eventTime, BitSet32(BitSet32::valueForBit(0)), &mRawPosition);
+
+        float vx, vy;
+        float scale = mParameters.scale;
+        if (mVelocityTracker.getVelocity(0, &vx, &vy)) {
+            float speed = hypotf(vx, vy) * scale;
+            if (speed >= mParameters.highThreshold) {
+                // Apply full acceleration above the high speed threshold.
+                scale *= mParameters.acceleration;
+            } else if (speed > mParameters.lowThreshold) {
+                // Linearly interpolate the acceleration to apply between the low and high
+                // speed thresholds.
+                scale *= 1 + (speed - mParameters.lowThreshold)
+                        / (mParameters.highThreshold - mParameters.lowThreshold)
+                        * (mParameters.acceleration - 1);
+            }
+
+#if DEBUG_ACCELERATION
+            LOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): "
+                    "vx=%0.3f, vy=%0.3f, speed=%0.3f, accel=%0.3f",
+                    mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold,
+                    mParameters.acceleration,
+                    vx, vy, speed, scale / mParameters.scale);
+#endif
+        } else {
+#if DEBUG_ACCELERATION
+            LOGD("VelocityControl(%0.3f, %0.3f, %0.3f, %0.3f): unknown velocity",
+                    mParameters.scale, mParameters.lowThreshold, mParameters.highThreshold,
+                    mParameters.acceleration);
+#endif
+        }
+
+        if (deltaX) {
+            *deltaX *= scale;
+        }
+        if (deltaY) {
+            *deltaY *= scale;
+        }
+    }
+}
+
+
 // --- InputDeviceInfo ---
 
 InputDeviceInfo::InputDeviceInfo() {
diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp
index a64918d..ecb8c0c 100644
--- a/libs/utils/ResourceTypes.cpp
+++ b/libs/utils/ResourceTypes.cpp
@@ -2499,6 +2499,9 @@
                     goto nope;
                 }
             }
+            if (outTypeSpecFlags) {
+                *outTypeSpecFlags = ResTable_typeSpec::SPEC_PUBLIC;
+            }
             return m->id;
 nope:
             ;
@@ -2513,6 +2516,9 @@
                          index);
                     return 0;
                 }
+                if (outTypeSpecFlags) {
+                    *outTypeSpecFlags = ResTable_typeSpec::SPEC_PUBLIC;
+                }
                 return  Res_MAKEARRAY(index);
             }
         }
@@ -2523,6 +2529,8 @@
         return 0;
     }
 
+    bool fakePublic = false;
+
     // Figure out the package and type we are looking in...
 
     const char16_t* packageEnd = NULL;
@@ -2534,7 +2542,13 @@
         else if (*p == '/') typeEnd = p;
         p++;
     }
-    if (*name == '@') name++;
+    if (*name == '@') {
+        name++;
+        if (*name == '*') {
+            fakePublic = true;
+            name++;
+        }
+    }
     if (name >= nameEnd) {
         return 0;
     }
@@ -2639,6 +2653,9 @@
                 if (dtohl(entry->key.index) == (size_t)ei) {
                     if (outTypeSpecFlags) {
                         *outTypeSpecFlags = typeConfigs->typeSpecFlags[i];
+                        if (fakePublic) {
+                            *outTypeSpecFlags |= ResTable_typeSpec::SPEC_PUBLIC;
+                        }
                     }
                     return Res_MAKEID(group->id-1, ti, i);
                 }
@@ -2655,7 +2672,8 @@
                                  String16* outName,
                                  const String16* defType,
                                  const String16* defPackage,
-                                 const char** outErrorMsg)
+                                 const char** outErrorMsg,
+                                 bool* outPublicOnly)
 {
     const char16_t* packageEnd = NULL;
     const char16_t* typeEnd = NULL;
@@ -2672,6 +2690,16 @@
     p = refStr;
     if (*p == '@') p++;
 
+    if (outPublicOnly != NULL) {
+        *outPublicOnly = true;
+    }
+    if (*p == '*') {
+        p++;
+        if (outPublicOnly != NULL) {
+            *outPublicOnly = false;
+        }
+    }
+
     if (packageEnd) {
         *outPackage = String16(p, packageEnd-p);
         p = packageEnd+1;
diff --git a/libs/utils/StreamingZipInflater.cpp b/libs/utils/StreamingZipInflater.cpp
index 5a162cc..00498bd 100644
--- a/libs/utils/StreamingZipInflater.cpp
+++ b/libs/utils/StreamingZipInflater.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#define LOG_NDEBUG 1
+//#define LOG_NDEBUG 0
 #define LOG_TAG "szipinf"
 #include <utils/Log.h>
 
@@ -77,7 +77,7 @@
 }
 
 void StreamingZipInflater::initInflateState() {
-    LOGD("Initializing inflate state");
+    LOGV("Initializing inflate state");
 
     memset(&mInflateState, 0, sizeof(mInflateState));
     mInflateState.zalloc = Z_NULL;
@@ -152,13 +152,13 @@
             mInflateState.avail_out = mOutBufSize;
 
             /*
-            LOGD("Inflating to outbuf: avail_in=%u avail_out=%u next_in=%p next_out=%p",
+            LOGV("Inflating to outbuf: avail_in=%u avail_out=%u next_in=%p next_out=%p",
                     mInflateState.avail_in, mInflateState.avail_out,
                     mInflateState.next_in, mInflateState.next_out);
             */
             int result = Z_OK;
             if (mStreamNeedsInit) {
-                LOGD("Initializing zlib to inflate");
+                LOGV("Initializing zlib to inflate");
                 result = inflateInit2(&mInflateState, -MAX_WBITS);
                 mStreamNeedsInit = false;
             }
@@ -192,7 +192,7 @@
         size_t toRead = min_of(mInBufSize, mInTotalSize - mInNextChunkOffset);
         if (toRead > 0) {
             ssize_t didRead = ::read(mFd, mInBuf, toRead);
-            //LOGD("Reading input chunk, size %08x didread %08x", toRead, didRead);
+            //LOGV("Reading input chunk, size %08x didread %08x", toRead, didRead);
             if (didRead < 0) {
                 // TODO: error
                 LOGE("Error reading asset data");
diff --git a/media/libmedia/MediaScanner.cpp b/media/libmedia/MediaScanner.cpp
index 28c86426..45bdff4 100644
--- a/media/libmedia/MediaScanner.cpp
+++ b/media/libmedia/MediaScanner.cpp
@@ -89,7 +89,7 @@
     if (pathRemaining >= 8 /* strlen(".nomedia") */ ) {
         strcpy(fileSpot, ".nomedia");
         if (access(path, F_OK) == 0) {
-            LOGD("found .nomedia, setting noMedia flag\n");
+            LOGV("found .nomedia, setting noMedia flag\n");
             noMedia = true;
         }
 
diff --git a/media/libstagefright/NuHTTPDataSource.cpp b/media/libstagefright/NuHTTPDataSource.cpp
index 62fb732..bee0d5e 100644
--- a/media/libstagefright/NuHTTPDataSource.cpp
+++ b/media/libstagefright/NuHTTPDataSource.cpp
@@ -100,7 +100,6 @@
       mNumBandwidthHistoryItems(0),
       mTotalTransferTimeUs(0),
       mTotalTransferBytes(0),
-      mPrevBandwidthMeasureTimeUs(0),
       mDecryptHandle(NULL),
       mDrmManagerClient(NULL) {
 }
@@ -535,16 +534,6 @@
         mTotalTransferBytes -= entry->mNumBytes;
         mBandwidthHistory.erase(mBandwidthHistory.begin());
         --mNumBandwidthHistoryItems;
-        int64_t timeNowUs = ALooper::GetNowUs();
-        if (timeNowUs - mPrevBandwidthMeasureTimeUs > 2000000LL) {
-            if (mPrevBandwidthMeasureTimeUs != 0) {
-                double estimatedBandwidth =
-                    ((double)mTotalTransferBytes * 8E3 / mTotalTransferTimeUs);
-                LOGI("estimated avg bandwidth is %8.2f kbps in the past %lld us",
-                    estimatedBandwidth, timeNowUs - mPrevBandwidthMeasureTimeUs);
-            }
-            mPrevBandwidthMeasureTimeUs = timeNowUs;
-        }
     }
 }
 
diff --git a/media/libstagefright/include/NuHTTPDataSource.h b/media/libstagefright/include/NuHTTPDataSource.h
index 0d68234..2569568 100644
--- a/media/libstagefright/include/NuHTTPDataSource.h
+++ b/media/libstagefright/include/NuHTTPDataSource.h
@@ -97,7 +97,6 @@
     size_t mNumBandwidthHistoryItems;
     int64_t mTotalTransferTimeUs;
     size_t mTotalTransferBytes;
-    int64_t mPrevBandwidthMeasureTimeUs;
 
     DecryptHandle *mDecryptHandle;
     DrmManagerClient *mDrmManagerClient;
diff --git a/native/include/android/configuration.h b/native/include/android/configuration.h
index 39fef21..2444c4b 100644
--- a/native/include/android/configuration.h
+++ b/native/include/android/configuration.h
@@ -40,6 +40,7 @@
     ACONFIGURATION_DENSITY_DEFAULT = 0,
     ACONFIGURATION_DENSITY_LOW = 120,
     ACONFIGURATION_DENSITY_MEDIUM = 160,
+    ACONFIGURATION_DENSITY_TV = 213,
     ACONFIGURATION_DENSITY_HIGH = 240,
     ACONFIGURATION_DENSITY_NONE = 0xffff,
 
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index bf06f947..2e2768f 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -125,4 +125,7 @@
     <!-- Default for Settings.Secure.LONG_PRESS_TIMEOUT_MILLIS -->
     <integer name="def_long_press_timeout_millis">500</integer>
 
+    <!-- Default for Settings.System.POINTER_SPEED -->
+    <integer name="def_pointer_speed">0</integer>
+
 </resources>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index d901c2c..2ed968b 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -1214,6 +1214,9 @@
             loadBooleanSetting(stmt, Settings.System.NOTIFICATIONS_USE_RING_VOLUME,
                     R.bool.def_notifications_use_ring_volume);
 
+            loadIntegerSetting(stmt, Settings.System.POINTER_SPEED,
+                    R.integer.def_pointer_speed);
+
         } finally {
             if (stmt != null) stmt.close();
         }
diff --git a/packages/SystemUI/res/drawable-hdpi/compat_mode_help_diagram.png b/packages/SystemUI/res/drawable-hdpi/compat_mode_help_diagram.png
new file mode 100644
index 0000000..944b1f0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/compat_mode_help_diagram.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/compat_mode_help_divider_bottom.9.png b/packages/SystemUI/res/drawable-hdpi/compat_mode_help_divider_bottom.9.png
new file mode 100644
index 0000000..2e11928
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/compat_mode_help_divider_bottom.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/compat_mode_help_divider_top.9.png b/packages/SystemUI/res/drawable-hdpi/compat_mode_help_divider_top.9.png
new file mode 100644
index 0000000..58a78b7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/compat_mode_help_divider_top.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/compat_mode_help_icon.png b/packages/SystemUI/res/drawable-hdpi/compat_mode_help_icon.png
new file mode 100644
index 0000000..46bb891
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/compat_mode_help_icon.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/compat_mode_help_top_divider.9.png b/packages/SystemUI/res/drawable-hdpi/compat_mode_help_top_divider.9.png
new file mode 100644
index 0000000..03a5639
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/compat_mode_help_top_divider.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_ime_default.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_ime_default.png
deleted file mode 100644
index eb6eb0c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_ime_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_ime_pressed.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_ime_pressed.png
deleted file mode 100644
index 11f66f5..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_ime_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/compat_mode_help_diagram.png b/packages/SystemUI/res/drawable-mdpi/compat_mode_help_diagram.png
new file mode 100644
index 0000000..518a5c1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/compat_mode_help_diagram.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/compat_mode_help_divider_bottom.9.png b/packages/SystemUI/res/drawable-mdpi/compat_mode_help_divider_bottom.9.png
new file mode 100644
index 0000000..3712abf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/compat_mode_help_divider_bottom.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/compat_mode_help_divider_top.9.png b/packages/SystemUI/res/drawable-mdpi/compat_mode_help_divider_top.9.png
new file mode 100644
index 0000000..a4d08c8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/compat_mode_help_divider_top.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/compat_mode_help_icon.png b/packages/SystemUI/res/drawable-mdpi/compat_mode_help_icon.png
new file mode 100644
index 0000000..233c4df
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/compat_mode_help_icon.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_default.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_default.png
deleted file mode 100644
index f907de7..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_pressed.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_pressed.png
deleted file mode 100644
index 36f8853..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_ime_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-nodpi/compat_mode_help_bg.png b/packages/SystemUI/res/drawable-nodpi/compat_mode_help_bg.png
new file mode 100644
index 0000000..59a70ff
--- /dev/null
+++ b/packages/SystemUI/res/drawable-nodpi/compat_mode_help_bg.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_ime_default.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_ime_default.png
new file mode 100644
index 0000000..1a9d88c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_ime_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_ime_pressed.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_ime_pressed.png
new file mode 100644
index 0000000..a6d7507
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_ime_pressed.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_zoom_default.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_zoom_default.png
new file mode 100644
index 0000000..1e1324a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_zoom_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_zoom_pressed.png b/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_zoom_pressed.png
new file mode 100644
index 0000000..e4e13c5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-hdpi/ic_sysbar_zoom_pressed.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_ime_default.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_ime_default.png
new file mode 100644
index 0000000..33edce0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_ime_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_ime_pressed.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_ime_pressed.png
new file mode 100644
index 0000000..8bab6cf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_ime_pressed.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_zoom_default.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_zoom_default.png
new file mode 100644
index 0000000..89d486f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_zoom_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_zoom_pressed.png b/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_zoom_pressed.png
new file mode 100644
index 0000000..b134436
--- /dev/null
+++ b/packages/SystemUI/res/drawable-sw600dp-mdpi/ic_sysbar_zoom_pressed.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable/compat_mode_help_bg.png b/packages/SystemUI/res/drawable/compat_mode_help_bg.png
new file mode 100644
index 0000000..87d8c41
--- /dev/null
+++ b/packages/SystemUI/res/drawable/compat_mode_help_bg.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable/ic_sysbar_zoom.xml b/packages/SystemUI/res/drawable/ic_sysbar_zoom.xml
new file mode 100644
index 0000000..97d0348
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_sysbar_zoom.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/ic_sysbar_zoom_pressed" />
+    <item android:state_selected="true" android:drawable="@drawable/ic_sysbar_zoom_pressed" />
+    <item android:drawable="@drawable/ic_sysbar_zoom_default" />
+</selector>
+
diff --git a/packages/SystemUI/res/layout-sw600dp/compat_mode_help.xml b/packages/SystemUI/res/layout-sw600dp/compat_mode_help.xml
new file mode 100644
index 0000000..d29e495
--- /dev/null
+++ b/packages/SystemUI/res/layout-sw600dp/compat_mode_help.xml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+-->
+
+<RelativeLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent"
+    android:background="@drawable/compat_mode_help_bg"
+    >
+    <TextView
+        android:id="@+id/header"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="80dp"
+        android:layout_marginTop="80dp"
+        android:layout_marginRight="80dp"
+        android:textSize="60sp"
+        android:maxLines="1"
+        android:shadowRadius="8"
+        android:shadowColor="#FF000000"
+        android:text="@string/compat_mode_help_header"
+        android:background="@drawable/compat_mode_help_divider_top"
+        />
+    <ImageView
+        android:id="@+id/diagram"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="true"
+        android:src="@drawable/compat_mode_help_diagram"
+        />
+    <RelativeLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="190dp"
+        android:background="@drawable/compat_mode_help_divider_bottom"
+        android:layout_marginBottom="55dp"
+        android:layout_marginRight="80dp"
+        android:layout_alignLeft="@id/header"
+        android:layout_alignParentBottom="true"
+        >
+        <ImageView
+            android:id="@+id/icon"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+            android:src="@drawable/compat_mode_help_icon"
+            />
+        <TextView
+            android:id="@+id/explanation"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:layout_alignParentLeft="true"
+            android:layout_toLeftOf="@id/icon"
+            android:layout_marginRight="10dp"
+            android:shadowRadius="4"
+            android:shadowColor="#FF000000"
+            android:textSize="28sp"
+            android:text="@string/compat_mode_help_body"
+            />
+    </RelativeLayout>
+    <Button
+        android:id="@+id/button"
+        android:layout_width="208dp"
+        android:layout_height="48dp"
+        android:layout_alignLeft="@id/header"
+        android:layout_alignParentBottom="true"
+        android:layout_marginBottom="20dp"
+        android:textSize="28sp"
+        android:text="@android:string/ok"
+        />
+</RelativeLayout>
+
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_compat_mode_panel.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_compat_mode_panel.xml
new file mode 100644
index 0000000..a33741e
--- /dev/null
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar_compat_mode_panel.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<com.android.systemui.statusbar.tablet.CompatModePanel
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="wrap_content"
+    android:layout_width="match_parent"
+    android:paddingBottom="@dimen/panel_float"
+    android:paddingRight="20dp"
+    >
+    <RadioGroup android:id="@+id/compat_mode_radio_group"
+        android:background="@*android:drawable/dialog_full_holo_dark"
+        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:orientation="vertical"
+        android:padding="10dp"
+        >
+        <RadioButton android:id="@+id/compat_mode_off_radio"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/compat_mode_off" />
+        <RadioButton android:id="@+id/compat_mode_on_radio"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/compat_mode_on" />
+    </RadioGroup>
+</com.android.systemui.statusbar.tablet.CompatModePanel>
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_area.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_area.xml
index f53b29e..fecfe7f 100644
--- a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_area.xml
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_area.xml
@@ -27,7 +27,7 @@
     >
 
     <LinearLayout
-        android:id="@+id/notificationAndImeArea"
+        android:id="@+id/feedbackIconArea"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
         android:orientation="horizontal"
@@ -41,7 +41,16 @@
             android:src="@drawable/ic_sysbar_ime_default"
             android:visibility="gone"
             />
-        
+
+        <com.android.systemui.statusbar.policy.CompatModeButton
+            android:id="@+id/compatModeButton"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dip"
+            android:src="@drawable/ic_sysbar_zoom"
+            android:visibility="gone"
+            />
+
         <com.android.systemui.statusbar.tablet.NotificationIconArea
             android:id="@+id/notificationIcons"
             android:layout_width="wrap_content"
@@ -144,4 +153,3 @@
         </LinearLayout>
     </LinearLayout>
 </LinearLayout>
-
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index 399a774..d71cf2b 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"عرض"</string>
     <string name="always_use_device" msgid="1450287437017315906">"الاستخدام بشكل افتراضي لجهاز USB هذا"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"الاستخدام بشكل افتراضي لملحق USB هذا"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 0fddf23..88357d1 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Преглед"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Използване по подразб. за това USB устройство"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Използване по подразб. за този аксесоар за USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 64f53d0b..09519a2 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Mostra"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Utilitza de manera predet. per al dispositiu USB"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Utilitza de manera predet. per a l\'accessori USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index f1bab7e..0f73333 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Zobrazit"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Pro toto zařízení USB použít jako výchozí"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Pro toto periferní zařízení USB použít jako výchozí"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 054b53c..99e67bc 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -39,18 +39,26 @@
     <string name="status_bar_settings_auto_brightness_label" msgid="511453614962324674">"AUTO"</string>
     <string name="status_bar_settings_notifications" msgid="397146176280905137">"Meddelelser"</string>
     <string name="recent_tasks_title" msgid="3691764623638127888">"Seneste"</string>
-    <string name="recent_tasks_empty" msgid="1905484479067697884">"Der er ingen nye programmer."</string>
+    <string name="recent_tasks_empty" msgid="1905484479067697884">"Der er ingen nye applikationer."</string>
     <string name="recent_tasks_app_label" msgid="3796483981246752469">"Programmer"</string>
     <string name="bluetooth_tethered" msgid="7094101612161133267">"Bluetooth-tethering anvendt"</string>
     <string name="status_bar_input_method_settings_configure_input_methods" msgid="737483394044014246">"Konfigurer inputmetoder"</string>
     <string name="status_bar_use_physical_keyboard" msgid="3695516942412442936">"Brug fysisk tastatur"</string>
-    <string name="usb_device_permission_prompt" msgid="3816016361969816903">"Vil du tillade, at programmet <xliff:g id="APPLICATION">%1$s</xliff:g> får adgang til USB-enheden?"</string>
-    <string name="usb_accessory_permission_prompt" msgid="6888598803988889959">"Vil du tillade, at programmet <xliff:g id="APPLICATION">%1$s</xliff:g> får adgang til USB-ekstraudstyret?"</string>
+    <string name="usb_device_permission_prompt" msgid="3816016361969816903">"Vil du tillade, at applikationen <xliff:g id="APPLICATION">%1$s</xliff:g> får adgang til USB-enheden?"</string>
+    <string name="usb_accessory_permission_prompt" msgid="6888598803988889959">"Vil du tillade, at applikationen <xliff:g id="APPLICATION">%1$s</xliff:g> får adgang til USB-ekstraudstyret?"</string>
     <string name="usb_device_confirm_prompt" msgid="5161205258635253206">"Vil du åbne <xliff:g id="ACTIVITY">%1$s</xliff:g>, når denne USB-enhed er tilsluttet?"</string>
     <string name="usb_accessory_confirm_prompt" msgid="3808984931830229888">"Vil du åbne <xliff:g id="ACTIVITY">%1$s</xliff:g>, når dette USB-ekstraudstyr er tilsluttet?"</string>
-    <string name="usb_accessory_uri_prompt" msgid="6332150684964235705">"Ingen inst. programmer virker med USB-ekstraudstyret. Få oplysninger om ekstraudstyret på <xliff:g id="URL">%1$s</xliff:g>"</string>
+    <string name="usb_accessory_uri_prompt" msgid="6332150684964235705">"Ingen inst. applikationer virker med USB-ekstraudstyret. Få oplysninger om ekstraudstyret på <xliff:g id="URL">%1$s</xliff:g>"</string>
     <string name="title_usb_accessory" msgid="4966265263465181372">"USB-ekstraudstyr"</string>
     <string name="label_view" msgid="6304565553218192990">"Vis"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Brug som standard til denne USB-enhed"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Brug som standard til dette USB-tilbehør"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 857d3a0..78b1652 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Anzeigen"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Standardmäßig für dieses USB-Gerät verwenden"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Standardmäßig für dieses USB-Zubehör verwenden"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index 424faab..4af57c1 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Προβολή"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Χρήση από προεπιλογή για αυτή τη συσκευή USB"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Χρήση από προεπιλογή για αυτό το εξάρτημα USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 8c84b67..7e1db15 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"View"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Use by default for this USB device"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Use by default for this USB accessory"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index ae747d4..6528c38 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Ver"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Se usa de forma predeterminada para este dispositivo USB."</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Se usa de forma predeterminada para este accesorio USB."</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index d58af48..a3c2302 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Ver"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Usar de forma predeterminada para este dispositivo USB"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Usar de forma predeterminada para este accesorio USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index b763771..360bb8b 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"مشاهده"</string>
     <string name="always_use_device" msgid="1450287437017315906">"استفاده به صورت پیش فرض برای این دستگاه USB"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"استفاده به صورت پیش فرض برای این دستگاه USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 9255dbd..71deb4a 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Näytä"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Käytä oletuksena tällä USB-laitteella"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Käytä oletuksena tällä USB-lisälaitteella"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-fr-large/strings.xml b/packages/SystemUI/res/values-fr-large/strings.xml
index 447b174..f8dd55e 100644
--- a/packages/SystemUI/res/values-fr-large/strings.xml
+++ b/packages/SystemUI/res/values-fr-large/strings.xml
@@ -21,7 +21,7 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="status_bar_clear_all_button" msgid="4661583896803349732">"Tout effacer"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="383145178755329067">"Aucune connexion"</string>
-    <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="2535465294437586528">"Connecté au Wi-Fi."</string>
+    <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="2535465294437586528">"Connecté au Wi-Fi"</string>
     <string name="gps_notification_searching_text" msgid="4467935186864208249">"Recherche de GPS en cours"</string>
     <string name="gps_notification_found_text" msgid="6270628388918822956">"Position définie par GPS"</string>
     <string name="notifications_off_title" msgid="1860117696034775851">"Notifications désactivées"</string>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index c41acd3..46e4cd2 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Afficher"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Utiliser par défaut pour ce périphérique USB"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Utiliser par défaut pour cet accessoire USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index eda1a93..cc44359 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Prikaži"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Koristi se prema zadanim postavkama za ovaj USB uređaj"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Koristi se prema zadanim postavkama za ovaj USB pribor"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 2261c2b..bc192d7 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Megtekintés"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Alapértelmezett használat ehhez az USB-eszközhöz"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Alapértelmezett használat ehhez az USB-kiegészítőhöz"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-in/strings.xml b/packages/SystemUI/res/values-in/strings.xml
index 53bfc76..6e3d929 100644
--- a/packages/SystemUI/res/values-in/strings.xml
+++ b/packages/SystemUI/res/values-in/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Lihat"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Gunakan secara bawaan untuk perangkat USB ini"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Gunakan secara bawaan untuk aksesori USB ini"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-it-large/strings.xml b/packages/SystemUI/res/values-it-large/strings.xml
index 3cde529..18ccd07 100644
--- a/packages/SystemUI/res/values-it-large/strings.xml
+++ b/packages/SystemUI/res/values-it-large/strings.xml
@@ -19,8 +19,8 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="status_bar_clear_all_button" msgid="4661583896803349732">"Cancella tutto"</string>
-    <string name="status_bar_settings_signal_meter_disconnected" msgid="383145178755329067">"Nessuna conness. Internet"</string>
+    <string name="status_bar_clear_all_button" msgid="4661583896803349732">"Cancella"</string>
+    <string name="status_bar_settings_signal_meter_disconnected" msgid="383145178755329067">"Nessuna connessione"</string>
     <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="2535465294437586528">"Wi-Fi connesso"</string>
     <string name="gps_notification_searching_text" msgid="4467935186864208249">"Ricerca del GPS"</string>
     <string name="gps_notification_found_text" msgid="6270628388918822956">"Posizione stabilita dal GPS"</string>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 055e783..5153550 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Visualizza"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Usa per impostazione predef. per dispositivo USB"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Usa per impostazione predef. per accessorio USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-iw/strings.xml b/packages/SystemUI/res/values-iw/strings.xml
index 04fa686..9b0cab5e 100644
--- a/packages/SystemUI/res/values-iw/strings.xml
+++ b/packages/SystemUI/res/values-iw/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"הצג"</string>
     <string name="always_use_device" msgid="1450287437017315906">"השתמש כברירת מחדל עבור התקן USB זה"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"השתמש כברירת מחדל עבור אביזר USB זה"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 4ec1d1b..04e9906 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"表示"</string>
     <string name="always_use_device" msgid="1450287437017315906">"このUSBデバイスにデフォルトで使用する"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"このUSBアクセサリにデフォルトで使用する"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index 8b80d9d..2511beb 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"보기"</string>
     <string name="always_use_device" msgid="1450287437017315906">"이 USB 기기에 기본값으로 사용"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"이 USB 액세서리에 기본값으로 사용"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index 4c7986c..8f86e85 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Žiūrėti"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Šiam USB įreng. naudoti pagal numat. nustatymus"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Šiam USB priedui naudoti pagal numat. nustatymus"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index 2804ffa..0220d21 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Skatīt"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Pēc noklusējuma izmantot šai USB ierīcei"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Pēc noklusējuma izmantot šim USB piederumam"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index 0dc1040..be5131c 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Vis"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Bruk som standard for denne USB-enheten"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Bruk som standard for dette USB-tilbehøret"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 4682f93..4ba77cb 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Weergeven"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Standaard gebruiken voor dit USB-apparaat"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Standaard gebruiken voor dit USB-accessoire"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 198e3e3..7ed7e7c 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Wyświetl"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Używaj domyślnie dla tego urządzenia USB"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Używaj domyślnie dla tego akcesorium USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index c79dbf0..d86cea6 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Ver"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Utilizar por predefinição para este aparelho USB"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Utilizar por predefinição para este acessório USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index d37988f..9f3997a 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Visualizar"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Usar por padrão para este dispositivo USB"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Usar por padrão para este acessório USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-rm/strings.xml b/packages/SystemUI/res/values-rm/strings.xml
index b41b9bd..4d0a43a 100644
--- a/packages/SystemUI/res/values-rm/strings.xml
+++ b/packages/SystemUI/res/values-rm/strings.xml
@@ -79,4 +79,12 @@
     <skip />
     <!-- no translation found for always_use_accessory (1210954576979621596) -->
     <skip />
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index afecb92..ea20ec7 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Afişaţi"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Utilizaţi în mod prestabilit pt. acest dispoz. USB"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Utiliz. în mod prestabilit pt. acest accesoriu USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-ru-large/strings.xml b/packages/SystemUI/res/values-ru-large/strings.xml
index c48321e..bafb97f 100644
--- a/packages/SystemUI/res/values-ru-large/strings.xml
+++ b/packages/SystemUI/res/values-ru-large/strings.xml
@@ -19,11 +19,11 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="status_bar_clear_all_button" msgid="4661583896803349732">"Очистить"</string>
+    <string name="status_bar_clear_all_button" msgid="4661583896803349732">"Очистить все"</string>
     <string name="status_bar_settings_signal_meter_disconnected" msgid="383145178755329067">"Нет подключения к Интернету"</string>
-    <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="2535465294437586528">"Wi-Fi: подключено"</string>
-    <string name="gps_notification_searching_text" msgid="4467935186864208249">"Выполняется поиск при помощи GPS"</string>
+    <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="2535465294437586528">"Wi-Fi подключено"</string>
+    <string name="gps_notification_searching_text" msgid="4467935186864208249">"Поиск GPS"</string>
     <string name="gps_notification_found_text" msgid="6270628388918822956">"Местоположение установлено с помощью GPS"</string>
-    <string name="notifications_off_title" msgid="1860117696034775851">"Показ уведомлений отключен"</string>
-    <string name="notifications_off_text" msgid="1439152806320786912">"Нажмите здесь, чтобы снова разрешить показ уведомлений."</string>
+    <string name="notifications_off_title" msgid="1860117696034775851">"Уведомления отключены"</string>
+    <string name="notifications_off_text" msgid="1439152806320786912">"Нажмите здесь, чтобы снова включить уведомления."</string>
 </resources>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 623bb65..ff6b3c6 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Просмотр"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Использовать по умолчанию для этого USB-устройства"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Использовать по умолчанию для этого USB-аксессуара"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 0250461..82e59a6 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Zobraziť"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Pre toto zariadenie USB použiť ako predvolené"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Pre toto periférne zar. USB použiť ako predvolené"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index d31a30b..713b6b2 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Prikaži"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Privzeto uporabi za to napravo USB"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Privzeto uporabi za ta dodatek USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 2c44f67..6da66c2 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Прикажи"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Користи подразумевано за овај USB уређај"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Користи подразумевано за овај USB додатак"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 343d6a8..4a5ea22 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Visa"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Använd som standard för den här USB-enheten"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Använd som standard för det här USB-tillbehöret"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-sw600dp-port/config.xml b/packages/SystemUI/res/values-sw600dp-port/config.xml
new file mode 100644
index 0000000..ab7661a
--- /dev/null
+++ b/packages/SystemUI/res/values-sw600dp-port/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+    <integer name="config_maxNotificationIcons">3</integer>
+</resources>
+
diff --git a/packages/SystemUI/res/values-sw600dp-port/dimens.xml b/packages/SystemUI/res/values-sw600dp-port/dimens.xml
index 78dd8c4..b8a6cfe 100644
--- a/packages/SystemUI/res/values-sw600dp-port/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp-port/dimens.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
- * Copyright (c) 2010, The Android Open Source Project
+ * Copyright (c) 2011, The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License"); 
  * you may not use this file except in compliance with the License. 
@@ -17,6 +17,6 @@
 -->
 <resources>
     <!-- gap on either side of status bar notification icons -->
-    <dimen name="status_bar_icon_padding">2dp</dimen>
+    <dimen name="status_bar_icon_padding">0dp</dimen>
 </resources>
 
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index dec8b67..944e0ee 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -26,5 +26,6 @@
     <dimen name="notification_panel_width">512dp</dimen>
     <!-- The minimum height of the notification panel window -->
     <dimen name="notification_panel_min_height">770dp</dimen>
+    <!-- Bottom margin (from display edge) for status bar panels -->
+    <dimen name="panel_float">56dp</dimen>
 </resources>
-
diff --git a/packages/SystemUI/res/values-sw720dp-port/dimens.xml b/packages/SystemUI/res/values-sw720dp-port/dimens.xml
new file mode 100644
index 0000000..74b266d
--- /dev/null
+++ b/packages/SystemUI/res/values-sw720dp-port/dimens.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (c) 2011, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+-->
+<resources>
+    <!-- gap on either side of status bar notification icons -->
+    <dimen name="status_bar_icon_padding">2dp</dimen>
+</resources>
+
diff --git a/packages/SystemUI/res/values-sw720dp/config.xml b/packages/SystemUI/res/values-sw720dp/config.xml
new file mode 100644
index 0000000..56b8e54
--- /dev/null
+++ b/packages/SystemUI/res/values-sw720dp/config.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2011, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+    <integer name="config_maxNotificationIcons">5</integer>
+</resources>
+
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 4db4e24..75c0140 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"ดู"</string>
     <string name="always_use_device" msgid="1450287437017315906">"ใช้ค่าเริ่มต้นสำหรับอุปกรณ์ USB นี้"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"ใช้ค่าเริ่มต้นสำหรับอุปกรณ์เสริม USB นี้"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 8cd8cfa..8427d32 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Tingnan"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Gamitin bilang default para sa USB device"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Gamitin bilang default sa USB accessory na ito"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index 87ffc8b..9ff285a 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Görüntüle"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Bu USB cihazı için varsayılan olarak kullan"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Bu USB aksesuar için varsayılan olarak kullan"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 6ebad57..52441de 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Переглянути"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Використовувати за умовчанням для пристрою USB"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Використовувати за умовчанням для аксесуара USB"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index 13a5737..b367c56 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"Xem"</string>
     <string name="always_use_device" msgid="1450287437017315906">"Sử dụng theo mặc định cho thiết bị USB này"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"Sử dụng theo mặc định cho phụ kiện USB này"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 099ed6bf..b92b3b0 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"查看"</string>
     <string name="always_use_device" msgid="1450287437017315906">"默认情况下用于该 USB 设备"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"默认情况下用于该 USB 配件"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 1c06dc2..8989b2f 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -53,4 +53,12 @@
     <string name="label_view" msgid="6304565553218192990">"查看"</string>
     <string name="always_use_device" msgid="1450287437017315906">"預設用於這個 USB 裝置"</string>
     <string name="always_use_accessory" msgid="1210954576979621596">"預設用於這個 USB 配件"</string>
+    <!-- no translation found for compat_mode_on (6623839244840638213) -->
+    <skip />
+    <!-- no translation found for compat_mode_off (4434467572461327898) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_header (7020175705401506719) -->
+    <skip />
+    <!-- no translation found for compat_mode_help_body (4946726776359270040) -->
+    <skip />
 </resources>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index bb59794..372aa39 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -36,5 +36,9 @@
     <!-- Whether or not we show the number in the bar. -->
     <bool name="config_statusBarShowNumber">true</bool>
 
+    <!-- How many icons may be shown at once in the system bar. Includes any
+         slots that may be reused for things like IME control. -->
+    <integer name="config_maxNotificationIcons">5</integer>
+
 </resources>
 
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 88cd43c..ff979a0 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -30,6 +30,8 @@
     <dimen name="status_bar_recents_thumbnail_max_height">64dp</dimen>
     <!-- Width of scrollable area in recents -->
     <dimen name="status_bar_recents_width">356dp</dimen>
+    <!-- Amount to offset bottom of notification peek window from top of status bar. -->
+    <dimen name="peek_window_y_offset">-12dp</dimen>
 
 </resources>
 
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 446827b..8945da5 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -143,4 +143,17 @@
     <!-- Checkbox label for USB accessory dialogs.  [CHAR LIMIT=50] -->
     <string name="always_use_accessory">Use by default for this USB accessory</string>
 
+    <!-- Checkbox label for application compatibility mode ON (zooming app to look like it's running
+         on a phone).  [CHAR LIMIT=25] -->
+    <string name="compat_mode_on">Zoom to fill screen</string>
+
+    <!-- Checkbox label for application compatibility mode OFF (normal mode on tablets).
+         [CHAR LIMIT=25] -->
+    <string name="compat_mode_off">Stretch to fill screen</string>
+    
+    <!-- Compatibility mode help screen: header text. [CHAR LIMIT=50] -->
+    <string name="compat_mode_help_header">Compatibility Zoom</string>
+
+    <!-- Compatibility mode help screen: body text. [CHAR LIMIT=150] -->
+    <string name="compat_mode_help_body">When an app was designed for a smaller screen, a zoom control will appear by the clock.</string>
 </resources>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 86ffb4d..91a8855 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -16,25 +16,25 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
 
-    <style name="TextAppearance.StatusBar.Title" parent="@android:style/TextAppearance.StatusBar">
+    <style name="TextAppearance.StatusBar.Title" parent="@*android:style/TextAppearance.StatusBar">
         <item name="android:textAppearance">?android:attr/textAppearanceSmall</item>
         <item name="android:textStyle">bold</item>
         <item name="android:textColor">?android:attr/textColorPrimary</item>
     </style>
 
     <style name="TextAppearance.StatusBar.IntruderAlert"
-        parent="@android:style/TextAppearance.StatusBar">
+        parent="@*android:style/TextAppearance.StatusBar">
     </style>
 
     <style name="TextAppearance.StatusBar.SystemPanel"
-        parent="@android:style/TextAppearance.StatusBar">
+        parent="@*android:style/TextAppearance.StatusBar">
         <item name="android:textAppearance">?android:attr/textAppearance</item>
         <item name="android:textStyle">normal</item>
         <item name="android:textColor">#FF808080</item>
     </style>
 
     <style name="TextAppearance.StatusBar.TextButton"
-        parent="@android:style/TextAppearance.StatusBar">
+        parent="@*android:style/TextAppearance.StatusBar">
         <item name="android:textAppearance">?android:attr/textAppearance</item>
         <item name="android:textStyle">normal</item>
         <item name="android:textColor">#FFFFFFFF</item>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index d55a7c2..07f9ad8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -54,7 +54,7 @@
 
     private static final int MSG_SET_LIGHTS_ON = 0x00070000;
 
-    private static final int MSG_SHOW_MENU = 0x00080000;
+    private static final int MSG_TOP_APP_WINDOW_CHANGED = 0x00080000;
     private static final int MSG_SHOW_IME_BUTTON = 0x00090000;
     private static final int MSG_SET_HARD_KEYBOARD_STATUS = 0x000a0000;
 
@@ -82,7 +82,7 @@
         public void animateExpand();
         public void animateCollapse();
         public void setLightsOn(boolean on);
-        public void setMenuKeyVisible(boolean visible);
+        public void topAppWindowChanged(boolean visible);
         public void setImeWindowStatus(IBinder token, int vis, int backDisposition);
         public void setHardKeyboardStatus(boolean available, boolean enabled);
     }
@@ -160,10 +160,11 @@
         }
     }
 
-    public void setMenuKeyVisible(boolean visible) {
+    public void topAppWindowChanged(boolean menuVisible) {
         synchronized (mList) {
-            mHandler.removeMessages(MSG_SHOW_MENU);
-            mHandler.obtainMessage(MSG_SHOW_MENU, visible ? 1 : 0, 0, null).sendToTarget();
+            mHandler.removeMessages(MSG_TOP_APP_WINDOW_CHANGED);
+            mHandler.obtainMessage(MSG_TOP_APP_WINDOW_CHANGED, menuVisible ? 1 : 0, 0,
+                    null).sendToTarget();
         }
     }
 
@@ -240,8 +241,8 @@
                 case MSG_SET_LIGHTS_ON:
                     mCallbacks.setLightsOn(msg.arg1 != 0);
                     break;
-                case MSG_SHOW_MENU:
-                    mCallbacks.setMenuKeyVisible(msg.arg1 != 0);
+                case MSG_TOP_APP_WINDOW_CHANGED:
+                    mCallbacks.topAppWindowChanged(msg.arg1 != 0);
                     break;
                 case MSG_SHOW_IME_BUTTON:
                     mCallbacks.setImeWindowStatus((IBinder)msg.obj, msg.arg1, msg.arg2);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java
index 23ae823..e567dc7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java
@@ -78,7 +78,7 @@
 
         disable(switches[0]);
         setLightsOn(switches[1] != 0);
-        setMenuKeyVisible(switches[2] != 0);
+        topAppWindowChanged(switches[2] != 0);
         // StatusBarManagerService has a back up of IME token and it's restored here.
         setImeWindowStatus(binders.get(0), switches[3], switches[4]);
         setHardKeyboardStatus(switches[5] != 0, switches[6] != 0);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 1e46246..84ae766 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1019,7 +1019,7 @@
     }
 
     // Not supported
-    public void setMenuKeyVisible(boolean visible) { }
+    public void topAppWindowChanged(boolean visible) { }
     public void setImeWindowStatus(IBinder token, int vis, int backDisposition) { }
     @Override
     public void setHardKeyboardStatus(boolean available, boolean enabled) { }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CompatModeButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CompatModeButton.java
new file mode 100644
index 0000000..7fbf734
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CompatModeButton.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.policy;
+
+import android.app.ActivityManager;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.RemoteException;
+import android.util.AttributeSet;
+import android.util.Slog;
+import android.view.View;
+import android.widget.ImageView;
+
+import com.android.systemui.R;
+
+public class CompatModeButton extends ImageView {
+    private static final boolean DEBUG = false;
+    private static final String TAG = "StatusBar.CompatModeButton";
+
+    private ActivityManager mAM;
+
+    public CompatModeButton(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public CompatModeButton(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs);
+
+        setClickable(true);
+
+        mAM = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
+
+        refresh();
+    }
+
+    public void refresh() {
+        int mode = mAM.getFrontActivityScreenCompatMode();
+        final boolean vis = (mode != ActivityManager.COMPAT_MODE_NEVER
+                          && mode != ActivityManager.COMPAT_MODE_ALWAYS);
+        if (DEBUG) Slog.d(TAG, "compat mode is " + mode + "; icon will " + (vis ? "show" : "hide"));
+        setVisibility(vis ? View.VISIBLE : View.GONE);
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index a693e60..b5e7920 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -442,12 +442,14 @@
     }
 
     boolean isCdmaEri() {
-        final int iconIndex = mServiceState.getCdmaEriIconIndex();
-        if (iconIndex != EriInfo.ROAMING_INDICATOR_OFF) {
-            final int iconMode = mServiceState.getCdmaEriIconMode();
-            if (iconMode == EriInfo.ROAMING_ICON_MODE_NORMAL
-                    || iconMode == EriInfo.ROAMING_ICON_MODE_FLASH) {
-                return true;
+        if (mServiceState != null) {
+            final int iconIndex = mServiceState.getCdmaEriIconIndex();
+            if (iconIndex != EriInfo.ROAMING_INDICATOR_OFF) {
+                final int iconMode = mServiceState.getCdmaEriIconMode();
+                if (iconMode == EriInfo.ROAMING_ICON_MODE_NORMAL
+                        || iconMode == EriInfo.ROAMING_ICON_MODE_FLASH) {
+                    return true;
+                }
             }
         }
         return false;
@@ -850,7 +852,7 @@
         pw.print("  mDataActivity=");
         pw.println(mDataActivity);
         pw.print("  mServiceState=");
-        pw.println(mServiceState.toString());
+        pw.println(mServiceState);
         pw.print("  mNetworkName=");
         pw.println(mNetworkName);
         pw.print("  mNetworkNameDefault=");
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java
index 05eafe8..83e8c96 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Prefs.java
@@ -26,6 +26,8 @@
     public static final String DO_NOT_DISTURB_PREF = "do_not_disturb";
     public static final boolean DO_NOT_DISTURB_DEFAULT = false;
 
+    public static final String SHOWN_COMPAT_MODE_HELP = "shown_compat_mode_help";
+
     public static SharedPreferences read(Context context) {
         return context.getSharedPreferences(Prefs.SHARED_PREFS_NAME, Context.MODE_PRIVATE);
     }
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/CompatModePanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/CompatModePanel.java
new file mode 100644
index 0000000..c62c4ad
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/CompatModePanel.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.tablet;
+
+import android.app.ActivityManager;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.os.RemoteException;
+import android.util.AttributeSet;
+import android.util.Slog;
+import android.view.View;
+import android.widget.FrameLayout;
+import android.widget.ImageView;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+
+import com.android.systemui.R;
+
+public class CompatModePanel extends FrameLayout implements StatusBarPanel,
+        View.OnClickListener {
+    private static final boolean DEBUG = TabletStatusBar.DEBUG;
+    private static final String TAG = "CompatModePanel";
+
+    private ActivityManager mAM;
+
+    private boolean mAttached = false;
+    private Context mContext;
+    private RadioButton mOnButton, mOffButton;
+
+    private View mTrigger;
+//    private InputMethodButton mInputMethodSwitchButton;
+
+    public CompatModePanel(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        mContext = context;
+        mAM = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
+    }
+
+    @Override
+    public void onFinishInflate() {
+        mOnButton  = (RadioButton) findViewById(R.id.compat_mode_on_radio);
+        mOffButton = (RadioButton) findViewById(R.id.compat_mode_off_radio);
+        mOnButton.setOnClickListener(this);
+        mOffButton.setOnClickListener(this);
+
+        refresh();
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        if (mAttached) {
+            mAttached = false;
+        }
+    }
+
+    @Override
+    protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
+        if (!mAttached) {
+            mAttached = true;
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        if (v == mOnButton) {
+            mAM.setFrontActivityScreenCompatMode(ActivityManager.COMPAT_MODE_ENABLED);
+        } else if (v == mOffButton) {
+            mAM.setFrontActivityScreenCompatMode(ActivityManager.COMPAT_MODE_DISABLED);
+        }
+    }
+
+    @Override
+    public boolean isInContentArea(int x, int y) {
+        return false;
+    }
+
+    public void setTrigger(View v) {
+        mTrigger = v;
+    }
+
+    public void openPanel() {
+        setVisibility(View.VISIBLE);
+        if (mTrigger != null) mTrigger.setSelected(true);
+        refresh();
+    }
+
+    public void closePanel() {
+        setVisibility(View.GONE);
+        if (mTrigger != null) mTrigger.setSelected(false);
+    }
+
+    private void refresh() {
+        int mode = mAM.getFrontActivityScreenCompatMode();
+        if (mode == ActivityManager.COMPAT_MODE_ALWAYS
+                || mode == ActivityManager.COMPAT_MODE_NEVER) {
+            // No longer have something to switch.
+            closePanel();
+            return;
+        }
+        final boolean on = (mode == ActivityManager.COMPAT_MODE_ENABLED);
+        mOnButton.setChecked(on);
+        mOffButton.setChecked(!on);
+    }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/HeightReceiver.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/HeightReceiver.java
index 9924faa..7f4c918 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/HeightReceiver.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/HeightReceiver.java
@@ -76,7 +76,7 @@
         int height = -1;
         if (plugged) {
             final DisplayMetrics metrics = new DisplayMetrics();
-            mWindowManager.getDefaultDisplay().getMetrics(metrics);
+            mWindowManager.getDefaultDisplay().getRealMetrics(metrics);
             //Slog.i(TAG, "setPlugged: display metrics=" + metrics);
             final int shortSide = Math.min(metrics.widthPixels, metrics.heightPixels);
             height = shortSide - 720;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index 172aaa1..79d50df 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -23,6 +23,7 @@
 import android.animation.LayoutTransition;
 import android.animation.ObjectAnimator;
 import android.app.ActivityManagerNative;
+import android.app.Dialog;
 import android.app.PendingIntent;
 import android.app.Notification;
 import android.app.StatusBarManager;
@@ -35,6 +36,7 @@
 import android.graphics.PixelFormat;
 import android.graphics.Rect;
 import android.graphics.drawable.LayerDrawable;
+import android.provider.Settings;
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.Message;
@@ -69,6 +71,7 @@
 import com.android.systemui.statusbar.*;
 import com.android.systemui.statusbar.policy.BatteryController;
 import com.android.systemui.statusbar.policy.BluetoothController;
+import com.android.systemui.statusbar.policy.CompatModeButton;
 import com.android.systemui.statusbar.policy.LocationController;
 import com.android.systemui.statusbar.policy.NetworkController;
 import com.android.systemui.statusbar.policy.Prefs;
@@ -78,11 +81,9 @@
         HeightReceiver.OnBarHeightChangedListener,
         InputMethodsPanel.OnHardKeyboardEnabledChangeListener {
     public static final boolean DEBUG = false;
+    public static final boolean DEBUG_COMPAT_HELP = false;
     public static final String TAG = "TabletStatusBar";
 
-    public static final int MAX_NOTIFICATION_ICONS = 5;
-    // IME switcher icon is big and occupy width of two icons
-    public static final int MAX_NOTIFICATION_ICONS_IME_BUTTON_VISIBLE = MAX_NOTIFICATION_ICONS - 1;
 
     public static final int MSG_OPEN_NOTIFICATION_PANEL = 1000;
     public static final int MSG_CLOSE_NOTIFICATION_PANEL = 1001;
@@ -94,6 +95,8 @@
     public static final int MSG_HIDE_CHROME = 1031;
     public static final int MSG_OPEN_INPUT_METHODS_PANEL = 1040;
     public static final int MSG_CLOSE_INPUT_METHODS_PANEL = 1041;
+    public static final int MSG_OPEN_COMPAT_MODE_PANEL = 1050;
+    public static final int MSG_CLOSE_COMPAT_MODE_PANEL = 1051;
     public static final int MSG_STOP_TICKER = 2000;
 
     // Fitts' Law assistance for LatinIME; see policy.EventHole
@@ -104,6 +107,7 @@
     int mNaturalBarHeight = -1;
     int mIconSize = -1;
     int mIconHPadding = -1;
+    private int mMaxNotificationIcons = 5;
 
     H mHandler = new H();
 
@@ -126,8 +130,9 @@
     View mMenuButton;
     View mRecentButton;
 
-    ViewGroup mNotificationAndImeArea;
+    ViewGroup mFeedbackIconArea; // notification icons, IME icon, compat icon
     InputMethodButton mInputMethodSwitchButton;
+    CompatModeButton mCompatModeButton;
 
     NotificationPanel mNotificationPanel;
     WindowManager.LayoutParams mNotificationPanelParams;
@@ -161,11 +166,14 @@
     View mFakeSpaceBar;
     KeyEvent mSpaceBarKeyEvent = null;
 
+    View mCompatibilityHelpDialog = null;
+    
     // for disabling the status bar
     int mDisabled = 0;
 
     private RecentAppsPanel mRecentsPanel;
     private InputMethodsPanel mInputMethodsPanel;
+    private CompatModePanel mCompatModePanel;
 
     public Context getContext() { return mContext; }
 
@@ -246,11 +254,12 @@
                 512, // ViewGroup.LayoutParams.WRAP_CONTENT,
                 ViewGroup.LayoutParams.WRAP_CONTENT,
                 WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL,
-                WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
+                WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
                     | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM
                     | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
                 PixelFormat.TRANSLUCENT);
         lp.gravity = Gravity.BOTTOM | Gravity.RIGHT;
+        lp.y = res.getDimensionPixelOffset(R.dimen.peek_window_y_offset);
         lp.setTitle("NotificationPeekWindow");
         lp.windowAnimations = com.android.internal.R.style.Animation_Toast;
 
@@ -304,13 +313,36 @@
         lp.windowAnimations = R.style.Animation_RecentPanel;
 
         WindowManagerImpl.getDefault().addView(mInputMethodsPanel, lp);
+        
+        // Compatibility mode selector panel
+        mCompatModePanel = (CompatModePanel) View.inflate(context,
+                R.layout.status_bar_compat_mode_panel, null);
+        mCompatModePanel.setOnTouchListener(new TouchOutsideListener(
+                MSG_CLOSE_COMPAT_MODE_PANEL, mCompatModePanel));
+        mCompatModePanel.setTrigger(mCompatModeButton);
+        mCompatModePanel.setVisibility(View.GONE);
+        mStatusBarView.setIgnoreChildren(4, mCompatModeButton, mCompatModePanel);
+        lp = new WindowManager.LayoutParams(
+                250,
+                ViewGroup.LayoutParams.WRAP_CONTENT,
+                WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL,
+                WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
+                    | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM
+                    | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH
+                    | WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
+                PixelFormat.TRANSLUCENT);
+        lp.gravity = Gravity.BOTTOM | Gravity.RIGHT;
+        lp.setTitle("CompatModePanel");
+        lp.windowAnimations = android.R.style.Animation_Dialog;
+
+        WindowManagerImpl.getDefault().addView(mCompatModePanel, lp);
     }
 
     private int getNotificationPanelHeight() {
         final Resources res = mContext.getResources();
         final Display d = WindowManagerImpl.getDefault().getDefaultDisplay();
         return Math.max(res.getDimensionPixelSize(R.dimen.notification_panel_min_height),
-                d.getHeight());
+                d.getRealHeight());
     }
 
     @Override
@@ -343,6 +375,13 @@
             mIconSize = newIconSize;
             reloadAllNotificationIcons(); // reload the tray
         }
+
+        final int numIcons = res.getInteger(R.integer.config_maxNotificationIcons);
+        if (numIcons != mMaxNotificationIcons) {
+            mMaxNotificationIcons = numIcons;
+            if (DEBUG) Slog.d(TAG, "max notification icons: " + mMaxNotificationIcons);
+            reloadAllNotificationIcons();
+        }
     }
 
     protected View makeStatusBarView() {
@@ -423,11 +462,14 @@
         mNavigationArea.setLayoutTransition(mBarContentsLayoutTransition);
 
         // The bar contents buttons
-        mNotificationAndImeArea = (ViewGroup)sb.findViewById(R.id.notificationAndImeArea);
+        mFeedbackIconArea = (ViewGroup)sb.findViewById(R.id.feedbackIconArea);
         mInputMethodSwitchButton = (InputMethodButton) sb.findViewById(R.id.imeSwitchButton);
         // Overwrite the lister
         mInputMethodSwitchButton.setOnClickListener(mOnClickListener);
 
+        mCompatModeButton = (CompatModeButton) sb.findViewById(R.id.compatModeButton);
+        mCompatModeButton.setOnClickListener(mOnClickListener);
+
         // for redirecting errant bar taps to the IME
         mFakeSpaceBar = sb.findViewById(R.id.fake_space_bar);
 
@@ -639,6 +681,14 @@
                     if (DEBUG) Slog.d(TAG, "closing input methods panel");
                     if (mInputMethodsPanel != null) mInputMethodsPanel.closePanel(false);
                     break;
+                case MSG_OPEN_COMPAT_MODE_PANEL:
+                    if (DEBUG) Slog.d(TAG, "opening compat panel");
+                    if (mCompatModePanel != null) mCompatModePanel.openPanel();
+                    break;
+                case MSG_CLOSE_COMPAT_MODE_PANEL:
+                    if (DEBUG) Slog.d(TAG, "closing compat panel");
+                    if (mCompatModePanel != null) mCompatModePanel.closePanel();
+                    break;
                 case MSG_SHOW_CHROME:
                     if (DEBUG) Slog.d(TAG, "hiding shadows (lights on)");
                     mBarContents.setVisibility(View.VISIBLE);
@@ -907,14 +957,14 @@
             if (0 == (mDisabled & (StatusBarManager.DISABLE_NOTIFICATION_ICONS
                             | StatusBarManager.DISABLE_NOTIFICATION_TICKER))) {
                 mTicker.add(key, n);
-                mNotificationAndImeArea.setVisibility(View.GONE);
+                mFeedbackIconArea.setVisibility(View.GONE);
             }
         }
     }
 
     // called by TabletTicker when it's done with all queued ticks
     public void doneTicking() {
-        mNotificationAndImeArea.setVisibility(View.VISIBLE);
+        mFeedbackIconArea.setVisibility(View.VISIBLE);
     }
 
     public void animateExpand() {
@@ -932,6 +982,8 @@
         mHandler.sendEmptyMessage(MSG_CLOSE_RECENTS_PANEL);
         mHandler.removeMessages(MSG_CLOSE_INPUT_METHODS_PANEL);
         mHandler.sendEmptyMessage(MSG_CLOSE_INPUT_METHODS_PANEL);
+        mHandler.removeMessages(MSG_CLOSE_COMPAT_MODE_PANEL);
+        mHandler.sendEmptyMessage(MSG_CLOSE_COMPAT_MODE_PANEL);
         mHandler.removeMessages(MSG_CLOSE_NOTIFICATION_PEEK);
         mHandler.sendEmptyMessage(MSG_CLOSE_NOTIFICATION_PEEK);
     }
@@ -949,16 +1001,68 @@
         mHandler.sendEmptyMessage(on ? MSG_SHOW_CHROME : MSG_HIDE_CHROME);
     }
 
-    public void setMenuKeyVisible(boolean visible) {
+    public void topAppWindowChanged(boolean windowVisible) {
         if (DEBUG) {
-            Slog.d(TAG, (visible?"showing":"hiding") + " the MENU button");
+            Slog.d(TAG, (windowVisible?"showing":"hiding") + " the MENU button");
         }
-        mMenuButton.setVisibility(visible ? View.VISIBLE : View.GONE);
+        mMenuButton.setVisibility(windowVisible ? View.VISIBLE : View.GONE);
 
         // See above re: lights-out policy for legacy apps.
-        if (visible) setLightsOn(true);
+        if (windowVisible) setLightsOn(true);
+
+        mCompatModeButton.refresh();
+        if (mCompatModeButton.getVisibility() == View.VISIBLE) {
+            if (DEBUG_COMPAT_HELP
+                    || ! Prefs.read(mContext).getBoolean(Prefs.SHOWN_COMPAT_MODE_HELP, false)) {
+                showCompatibilityHelp();
+            }
+        } else {
+            hideCompatibilityHelp();
+            mCompatModePanel.closePanel();
+        }
     }
 
+    private void showCompatibilityHelp() {
+        if (mCompatibilityHelpDialog != null) {
+            return;
+        }
+        
+        mCompatibilityHelpDialog = View.inflate(mContext, R.layout.compat_mode_help, null);
+        View button = mCompatibilityHelpDialog.findViewById(R.id.button);
+
+        button.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                hideCompatibilityHelp();
+                SharedPreferences.Editor editor = Prefs.edit(mContext);
+                editor.putBoolean(Prefs.SHOWN_COMPAT_MODE_HELP, true);
+                editor.apply();
+            }
+        });
+
+        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
+                ViewGroup.LayoutParams.MATCH_PARENT,
+                ViewGroup.LayoutParams.MATCH_PARENT,
+                WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG,
+                WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
+                    | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS
+                    | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
+                PixelFormat.TRANSLUCENT);
+        lp.setTitle("CompatibilityModeDialog");
+        lp.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_STATE_UNCHANGED
+                | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING;
+        lp.windowAnimations = com.android.internal.R.style.Animation_ZoomButtons; // simple fade
+
+        WindowManagerImpl.getDefault().addView(mCompatibilityHelpDialog, lp);
+    }
+
+    private void hideCompatibilityHelp() {
+        if (mCompatibilityHelpDialog != null) {
+            WindowManagerImpl.getDefault().removeView(mCompatibilityHelpDialog);
+            mCompatibilityHelpDialog = null;
+        }
+    }
+    
     public void setImeWindowStatus(IBinder token, int vis, int backDisposition) {
         mInputMethodSwitchButton.setImeWindowStatus(token,
                 (vis & InputMethodService.IME_ACTIVE) != 0);
@@ -1049,6 +1153,8 @@
                 onClickRecentButton();
             } else if (v == mInputMethodSwitchButton) {
                 onClickInputMethodSwitchButton();
+            } else if (v == mCompatModeButton) {
+                onClickCompatModeButton();
             }
         }
     };
@@ -1091,6 +1197,13 @@
         mHandler.sendEmptyMessage(msg);
     }
 
+    public void onClickCompatModeButton() {
+        int msg = (mCompatModePanel.getVisibility() == View.GONE) ?
+                MSG_OPEN_COMPAT_MODE_PANEL : MSG_CLOSE_COMPAT_MODE_PANEL;
+        mHandler.removeMessages(msg);
+        mHandler.sendEmptyMessage(msg);
+    }
+
     public NotificationClicker makeClicker(PendingIntent intent, String pkg, String tag, int id) {
         return new NotificationClicker(intent, pkg, tag, id);
     }
@@ -1427,11 +1540,13 @@
 
         ArrayList<View> toShow = new ArrayList<View>();
 
-        // When IME button is visible, the number of notification icons should be decremented
-        // to fit the upper limit.
-        final int maxNotificationIconsCount =
-                (mInputMethodSwitchButton.getVisibility() != View.GONE) ?
-                        MAX_NOTIFICATION_ICONS_IME_BUTTON_VISIBLE : MAX_NOTIFICATION_ICONS;
+        // Extra Special Icons
+        // The IME switcher and compatibility mode icons take the place of notifications. You didn't
+        // need to see all those new emails, did you?
+        int maxNotificationIconsCount = mMaxNotificationIcons;
+        if (mInputMethodSwitchButton.getVisibility() != View.GONE) maxNotificationIconsCount --;
+        if (mCompatModeButton.getVisibility()        != View.GONE) maxNotificationIconsCount --;
+
         for (int i=0; i< maxNotificationIconsCount; i++) {
             if (i>=N) break;
             toShow.add(mNotificationData.get(N-i-1).icon);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java
index 4e2faf7..dff1f6a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java
@@ -27,8 +27,9 @@
 public class TabletStatusBarView extends FrameLayout {
     private Handler mHandler;
 
-    private final View[] mIgnoreChildren = new View[4];
-    private final View[] mPanels = new View[4];
+    private final int MAX_PANELS = 5;
+    private final View[] mIgnoreChildren = new View[MAX_PANELS];
+    private final View[] mPanels = new View[MAX_PANELS];
     private final int[] mPos = new int[2];
 
     public TabletStatusBarView(Context context) {
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 60066e0d..ca3d864 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -29,6 +29,7 @@
 import android.content.IntentFilter;
 import android.content.pm.ActivityInfo;
 import android.content.pm.PackageManager;
+import android.content.res.CompatibilityInfo;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.database.ContentObserver;
@@ -323,6 +324,8 @@
     static final Rect mTmpVisibleFrame = new Rect();
     
     WindowState mTopFullscreenOpaqueWindowState;
+    WindowState mTopAppWindowState;
+    WindowState mLastTopAppWindowState;
     boolean mTopIsFullscreen;
     boolean mForceStatusBar;
     boolean mHideLockScreen;
@@ -333,7 +336,6 @@
     Intent mDeskDockIntent;
     int mShortcutKeyPressed = -1;
     boolean mConsumeShortcutKeyUp;
-    boolean mShowMenuKey = false; // track FLAG_NEEDS_MENU_KEY on frontmost window
 
     // support for activating the lock screen while the screen is on
     boolean mAllowLockscreenWhenOn;
@@ -773,8 +775,9 @@
         // Determine whether the status bar can hide based on the size
         // of the screen.  We assume sizes > 600dp are tablets where we
         // will use the system bar.
-        int shortSizeDp = (shortSize*DisplayMetrics.DENSITY_DEVICE)
-                / DisplayMetrics.DENSITY_DEFAULT;
+        int shortSizeDp = shortSize
+                * DisplayMetrics.DENSITY_DEFAULT
+                / DisplayMetrics.DENSITY_DEVICE;
         mStatusBarCanHide = shortSizeDp < 600;
         mStatusBarHeight = mContext.getResources().getDimensionPixelSize(
                 mStatusBarCanHide
@@ -858,7 +861,7 @@
                 WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
             lp.format = PixelFormat.TRANSLUCENT;
             lp.setTitle("PointerLocation");
-            WindowManagerImpl wm = (WindowManagerImpl)
+            WindowManager wm = (WindowManager)
                     mContext.getSystemService(Context.WINDOW_SERVICE);
             wm.addView(addView, lp);
             
@@ -881,7 +884,7 @@
                 mPointerLocationInputChannel = null;
             }
             
-            WindowManagerImpl wm = (WindowManagerImpl)
+            WindowManager wm = (WindowManager)
                     mContext.getSystemService(Context.WINDOW_SERVICE);
             wm.removeView(removeView);
         }
@@ -1110,9 +1113,9 @@
     }
     
     /** {@inheritDoc} */
-    public View addStartingWindow(IBinder appToken, String packageName,
-                                  int theme, CharSequence nonLocalizedLabel,
-                                  int labelRes, int icon, int windowFlags) {
+    public View addStartingWindow(IBinder appToken, String packageName, int theme,
+            CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes,
+            int icon, int windowFlags) {
         if (!SHOW_STARTING_ANIMATIONS) {
             return null;
         }
@@ -1158,8 +1161,12 @@
                 WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|
                 WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
     
+            if (!compatInfo.supportsScreen()) {
+                win.addFlags(WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW);
+            }
+
             win.setLayout(WindowManager.LayoutParams.MATCH_PARENT,
-                                WindowManager.LayoutParams.MATCH_PARENT);
+                    WindowManager.LayoutParams.MATCH_PARENT);
     
             final WindowManager.LayoutParams params = win.getAttributes();
             params.token = appToken;
@@ -1168,8 +1175,7 @@
                     com.android.internal.R.styleable.Window_windowAnimationStyle, 0);
             params.setTitle("Starting " + packageName);
 
-            WindowManagerImpl wm = (WindowManagerImpl)
-                    context.getSystemService(Context.WINDOW_SERVICE);
+            WindowManager wm = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
             View view = win.getDecorView();
 
             if (win.isFloating()) {
@@ -1214,7 +1220,7 @@
             TAG, "Removing starting window for " + appToken + ": " + window);
 
         if (window != null) {
-            WindowManagerImpl wm = (WindowManagerImpl) mContext.getSystemService(Context.WINDOW_SERVICE);
+            WindowManager wm = (WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
             wm.removeView(window);
         }
     }
@@ -1776,21 +1782,10 @@
                     // frame is the same as the one we are attached to.
                     setAttachedWindowFrames(win, fl, sim, attached, true, pf, df, cf, vf);
                 } else {
-                    if (attrs.type == TYPE_STATUS_BAR_PANEL) {
-                        // Status bar panels are the only windows who can go on top of
-                        // the status bar.  They are protected by the STATUS_BAR_SERVICE
-                        // permission, so they have the same privileges as the status
-                        // bar itself.
-                        pf.left = df.left = mUnrestrictedScreenLeft;
-                        pf.top = df.top = mUnrestrictedScreenTop;
-                        pf.right = df.right = mUnrestrictedScreenLeft+mUnrestrictedScreenWidth;
-                        pf.bottom = df.bottom = mUnrestrictedScreenTop+mUnrestrictedScreenHeight;
-                    } else {
-                        pf.left = df.left = mRestrictedScreenLeft;
-                        pf.top = df.top = mRestrictedScreenTop;
-                        pf.right = df.right = mRestrictedScreenLeft+mRestrictedScreenWidth;
-                        pf.bottom = df.bottom = mRestrictedScreenTop+mRestrictedScreenHeight;
-                    }
+                    pf.left = df.left = mRestrictedScreenLeft;
+                    pf.top = df.top = mRestrictedScreenTop;
+                    pf.right = df.right = mRestrictedScreenLeft+mRestrictedScreenWidth;
+                    pf.bottom = df.bottom = mRestrictedScreenTop+mRestrictedScreenHeight;
                     if (adjust != SOFT_INPUT_ADJUST_RESIZE) {
                         cf.left = mDockLeft;
                         cf.top = mDockTop;
@@ -1843,28 +1838,40 @@
             } else {
                 // Otherwise, a normal window must be placed inside the content
                 // of all screen decorations.
-                pf.left = mContentLeft;
-                pf.top = mContentTop;
-                pf.right = mContentRight;
-                pf.bottom = mContentBottom;
-                if (adjust != SOFT_INPUT_ADJUST_RESIZE) {
-                    df.left = cf.left = mDockLeft;
-                    df.top = cf.top = mDockTop;
-                    df.right = cf.right = mDockRight;
-                    df.bottom = cf.bottom = mDockBottom;
+                if (attrs.type == TYPE_STATUS_BAR_PANEL) {
+                    // Status bar panels are the only windows who can go on top of
+                    // the status bar.  They are protected by the STATUS_BAR_SERVICE
+                    // permission, so they have the same privileges as the status
+                    // bar itself.
+                    pf.left = df.left = cf.left = mRestrictedScreenLeft;
+                    pf.top = df.top = cf.top = mRestrictedScreenTop;
+                    pf.right = df.right = cf.right = mRestrictedScreenLeft+mRestrictedScreenWidth;
+                    pf.bottom = df.bottom = cf.bottom
+                            = mRestrictedScreenTop+mRestrictedScreenHeight;
                 } else {
-                    df.left = cf.left = mContentLeft;
-                    df.top = cf.top = mContentTop;
-                    df.right = cf.right = mContentRight;
-                    df.bottom = cf.bottom = mContentBottom;
-                }
-                if (adjust != SOFT_INPUT_ADJUST_NOTHING) {
-                    vf.left = mCurLeft;
-                    vf.top = mCurTop;
-                    vf.right = mCurRight;
-                    vf.bottom = mCurBottom;
-                } else {
-                    vf.set(cf);
+                    pf.left = mContentLeft;
+                    pf.top = mContentTop;
+                    pf.right = mContentRight;
+                    pf.bottom = mContentBottom;
+                    if (adjust != SOFT_INPUT_ADJUST_RESIZE) {
+                        df.left = cf.left = mDockLeft;
+                        df.top = cf.top = mDockTop;
+                        df.right = cf.right = mDockRight;
+                        df.bottom = cf.bottom = mDockBottom;
+                    } else {
+                        df.left = cf.left = mContentLeft;
+                        df.top = cf.top = mContentTop;
+                        df.right = cf.right = mContentRight;
+                        df.bottom = cf.bottom = mContentBottom;
+                    }
+                    if (adjust != SOFT_INPUT_ADJUST_NOTHING) {
+                        vf.left = mCurLeft;
+                        vf.top = mCurTop;
+                        vf.right = mCurRight;
+                        vf.bottom = mCurBottom;
+                    } else {
+                        vf.set(cf);
+                    }
                 }
             }
         }
@@ -1908,6 +1915,7 @@
     /** {@inheritDoc} */
     public void beginAnimationLw(int displayWidth, int displayHeight) {
         mTopFullscreenOpaqueWindowState = null;
+        mTopAppWindowState = null;
         mForceStatusBar = false;
         
         mHideLockScreen = false;
@@ -1943,6 +1951,12 @@
                 }
             }
         }
+        if (mTopAppWindowState == null && win.isVisibleOrBehindKeyguardLw()) {
+            if (attrs.type >= FIRST_APPLICATION_WINDOW
+                    && attrs.type <= LAST_APPLICATION_WINDOW) {
+                mTopAppWindowState = win;
+            }
+        }
     }
 
     /** {@inheritDoc} */
@@ -1986,22 +2000,13 @@
             }
         }
 
-        boolean topNeedsMenu = mShowMenuKey;
-        if (lp != null) {
-            topNeedsMenu = (lp.flags & WindowManager.LayoutParams.FLAG_NEEDS_MENU_KEY) != 0;
-        }
-
-        if (DEBUG_LAYOUT) Log.v(TAG, "Top window " 
-                + (topNeedsMenu ? "needs" : "does not need")
-                + " the MENU key");
-
         mTopIsFullscreen = topIsFullscreen;
-        final boolean changedMenu = (topNeedsMenu != mShowMenuKey);
 
-        if (changedMenu) {
-            final boolean topNeedsMenuF = topNeedsMenu;
+        if (mTopAppWindowState != null && mTopAppWindowState != mLastTopAppWindowState) {
+            mLastTopAppWindowState = mTopAppWindowState;
 
-            mShowMenuKey = topNeedsMenu;
+            final boolean topNeedsMenu = (mTopAppWindowState.getAttrs().flags
+                    & WindowManager.LayoutParams.FLAG_NEEDS_MENU_KEY) != 0;
 
             mHandler.post(new Runnable() {
                     public void run() {
@@ -2016,9 +2021,7 @@
                         final IStatusBarService sbs = mStatusBarService;
                         if (mStatusBarService != null) {
                             try {
-                                if (changedMenu) {
-                                    sbs.setMenuKeyVisible(topNeedsMenuF);
-                                }
+                                sbs.topAppWindowChanged(topNeedsMenu);
                             } catch (RemoteException e) {
                                 // This should be impossible because we're in the same process.
                                 mStatusBarService = null;
diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp
index d80abe8..f748e7c 100644
--- a/services/input/EventHub.cpp
+++ b/services/input/EventHub.cpp
@@ -33,6 +33,7 @@
 
 #include <hardware_legacy/power.h>
 
+#include <cutils/atomic.h>
 #include <cutils/properties.h>
 #include <utils/Log.h>
 #include <utils/Timers.h>
@@ -127,6 +128,7 @@
         mError(NO_INIT), mBuiltInKeyboardId(-1), mNextDeviceId(1),
         mOpeningDevices(0), mClosingDevices(0),
         mOpened(false), mNeedToSendFinishedDeviceScan(false),
+        mNeedToReopenDevices(0), mNeedToScanDevices(false),
         mInputFdIndex(1) {
     acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_ID);
 
@@ -380,12 +382,10 @@
     return NAME_NOT_FOUND;
 }
 
-void EventHub::addExcludedDevice(const char* deviceName)
-{
+void EventHub::setExcludedDevices(const Vector<String8>& devices) {
     AutoMutex _l(mLock);
 
-    String8 name(deviceName);
-    mExcludedDevices.push_back(name);
+    mExcludedDevices = devices;
 }
 
 bool EventHub::hasLed(int32_t deviceId, int32_t led) const {
@@ -453,9 +453,11 @@
     assert(bufferSize >= 1);
 
     if (!mOpened) {
+        android_atomic_acquire_store(0, &mNeedToReopenDevices);
+
         mError = openPlatformInput() ? NO_ERROR : UNKNOWN_ERROR;
         mOpened = true;
-        mNeedToSendFinishedDeviceScan = true;
+        mNeedToScanDevices = true;
     }
 
     struct input_event readBuffer[bufferSize];
@@ -465,6 +467,20 @@
     for (;;) {
         nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
 
+        // Reopen input devices if needed.
+        if (android_atomic_acquire_load(&mNeedToReopenDevices)) {
+            android_atomic_acquire_store(0, &mNeedToReopenDevices);
+
+            LOGI("Reopening all input devices due to a configuration change.");
+
+            AutoMutex _l(mLock);
+            while (mDevices.size() > 1) {
+                closeDeviceAtIndexLocked(mDevices.size() - 1);
+            }
+            mNeedToScanDevices = true;
+            break; // return to the caller before we actually rescan
+        }
+
         // Report any devices that had last been added/removed.
         while (mClosingDevices) {
             Device* device = mClosingDevices;
@@ -482,6 +498,12 @@
             }
         }
 
+        if (mNeedToScanDevices) {
+            mNeedToScanDevices = false;
+            scanDevices();
+            mNeedToSendFinishedDeviceScan = true;
+        }
+
         while (mOpeningDevices != NULL) {
             Device* device = mOpeningDevices;
             LOGV("Reporting device opened: id=%d, name=%s\n",
@@ -683,13 +705,14 @@
     pollfd.revents = 0;
     mFds.push(pollfd);
     mDevices.push(NULL);
+    return true;
+}
 
-    res = scanDir(DEVICE_PATH);
+void EventHub::scanDevices() {
+    int res = scanDir(DEVICE_PATH);
     if(res < 0) {
         LOGE("scan dir failed for %s\n", DEVICE_PATH);
     }
-
-    return true;
 }
 
 // ----------------------------------------------------------------------------
@@ -742,12 +765,10 @@
     }
 
     // Check to see if the device is on our excluded list
-    List<String8>::iterator iter = mExcludedDevices.begin();
-    List<String8>::iterator end = mExcludedDevices.end();
-    for ( ; iter != end; iter++) {
-        const char* test = *iter;
-        if (identifier.name == test) {
-            LOGI("ignoring event id %s driver %s\n", devicePath, test);
+    for (size_t i = 0; i < mExcludedDevices.size(); i++) {
+        const String8& item = mExcludedDevices.itemAt(i);
+        if (identifier.name == item) {
+            LOGI("ignoring event id %s driver %s\n", devicePath, item.string());
             close(fd);
             return -1;
         }
@@ -1210,6 +1231,10 @@
     return 0;
 }
 
+void EventHub::reopenDevices() {
+    android_atomic_release_store(1, &mNeedToReopenDevices);
+}
+
 void EventHub::dump(String8& dump) {
     dump.append("Event Hub State:\n");
 
diff --git a/services/input/EventHub.h b/services/input/EventHub.h
index 4d26a95..853a0bd 100644
--- a/services/input/EventHub.h
+++ b/services/input/EventHub.h
@@ -178,9 +178,9 @@
     virtual status_t mapAxis(int32_t deviceId, int scancode,
             AxisInfo* outAxisInfo) const = 0;
 
-    // exclude a particular device from opening
-    // this can be used to ignore input devices for sensors
-    virtual void addExcludedDevice(const char* deviceName) = 0;
+    // Sets devices that are excluded from opening.
+    // This can be used to ignore input devices for sensors.
+    virtual void setExcludedDevices(const Vector<String8>& devices) = 0;
 
     /*
      * Wait for events to become available and returns them.
@@ -215,6 +215,8 @@
     virtual void getVirtualKeyDefinitions(int32_t deviceId,
             Vector<VirtualKeyDefinition>& outVirtualKeys) const = 0;
 
+    virtual void reopenDevices() = 0;
+
     virtual void dump(String8& dump) = 0;
 };
 
@@ -242,7 +244,7 @@
     virtual status_t mapAxis(int32_t deviceId, int scancode,
             AxisInfo* outAxisInfo) const;
 
-    virtual void addExcludedDevice(const char* deviceName);
+    virtual void setExcludedDevices(const Vector<String8>& devices);
 
     virtual int32_t getScanCodeState(int32_t deviceId, int32_t scanCode) const;
     virtual int32_t getKeyCodeState(int32_t deviceId, int32_t keyCode) const;
@@ -259,6 +261,8 @@
     virtual void getVirtualKeyDefinitions(int32_t deviceId,
             Vector<VirtualKeyDefinition>& outVirtualKeys) const;
 
+    virtual void reopenDevices();
+
     virtual void dump(String8& dump);
 
 protected:
@@ -271,6 +275,7 @@
     int closeDevice(const char *devicePath);
     int closeDeviceAtIndexLocked(int index);
     int scanDir(const char *dirname);
+    void scanDevices();
     int readNotify(int nfd);
 
     status_t mError;
@@ -333,7 +338,9 @@
 
     bool mOpened;
     bool mNeedToSendFinishedDeviceScan;
-    List<String8> mExcludedDevices;
+    volatile int32_t mNeedToReopenDevices; // must be modified atomically
+    bool mNeedToScanDevices;
+    Vector<String8> mExcludedDevices;
 
     // device ids that report particular switches.
     int32_t mSwitches[SW_MAX + 1];
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index 9a77af3..5ea12c7 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -222,13 +222,14 @@
 
     mKeyRepeatState.lastKeyEntry = NULL;
 
-    int32_t maxEventsPerSecond = policy->getMaxEventsPerSecond();
-    mThrottleState.minTimeBetweenEvents = 1000000000LL / maxEventsPerSecond;
+    policy->getDispatcherConfiguration(&mConfig);
+
+    mThrottleState.minTimeBetweenEvents = 1000000000LL / mConfig.maxEventsPerSecond;
     mThrottleState.lastDeviceId = -1;
 
 #if DEBUG_THROTTLING
     mThrottleState.originalSampleCount = 0;
-    LOGD("Throttling - Max events per second = %d", maxEventsPerSecond);
+    LOGD("Throttling - Max events per second = %d", mConfig.maxEventsPerSecond);
 #endif
 }
 
@@ -247,13 +248,10 @@
 }
 
 void InputDispatcher::dispatchOnce() {
-    nsecs_t keyRepeatTimeout = mPolicy->getKeyRepeatTimeout();
-    nsecs_t keyRepeatDelay = mPolicy->getKeyRepeatDelay();
-
     nsecs_t nextWakeupTime = LONG_LONG_MAX;
     { // acquire lock
         AutoMutex _l(mLock);
-        dispatchOnceInnerLocked(keyRepeatTimeout, keyRepeatDelay, & nextWakeupTime);
+        dispatchOnceInnerLocked(&nextWakeupTime);
 
         if (runCommandsLockedInterruptible()) {
             nextWakeupTime = LONG_LONG_MIN;  // force next poll to wake up immediately
@@ -266,14 +264,13 @@
     mLooper->pollOnce(timeoutMillis);
 }
 
-void InputDispatcher::dispatchOnceInnerLocked(nsecs_t keyRepeatTimeout,
-        nsecs_t keyRepeatDelay, nsecs_t* nextWakeupTime) {
+void InputDispatcher::dispatchOnceInnerLocked(nsecs_t* nextWakeupTime) {
     nsecs_t currentTime = now();
 
     // Reset the key repeat timer whenever we disallow key events, even if the next event
     // is not a key.  This is to ensure that we abort a key repeat if the device is just coming
     // out of sleep.
-    if (keyRepeatTimeout < 0) {
+    if (!mPolicy->isKeyRepeatEnabled()) {
         resetKeyRepeatLocked();
     }
 
@@ -307,7 +304,7 @@
             // Synthesize a key repeat if appropriate.
             if (mKeyRepeatState.lastKeyEntry) {
                 if (currentTime >= mKeyRepeatState.nextRepeatTime) {
-                    mPendingEvent = synthesizeKeyRepeatLocked(currentTime, keyRepeatDelay);
+                    mPendingEvent = synthesizeKeyRepeatLocked(currentTime);
                 } else {
                     if (mKeyRepeatState.nextRepeatTime < *nextWakeupTime) {
                         *nextWakeupTime = mKeyRepeatState.nextRepeatTime;
@@ -426,8 +423,7 @@
         if (dropReason == DROP_REASON_NOT_DROPPED && mNextUnblockedEvent) {
             dropReason = DROP_REASON_BLOCKED;
         }
-        done = dispatchKeyLocked(currentTime, typedEntry, keyRepeatTimeout,
-                &dropReason, nextWakeupTime);
+        done = dispatchKeyLocked(currentTime, typedEntry, &dropReason, nextWakeupTime);
         break;
     }
 
@@ -686,8 +682,7 @@
     }
 }
 
-InputDispatcher::KeyEntry* InputDispatcher::synthesizeKeyRepeatLocked(
-        nsecs_t currentTime, nsecs_t keyRepeatDelay) {
+InputDispatcher::KeyEntry* InputDispatcher::synthesizeKeyRepeatLocked(nsecs_t currentTime) {
     KeyEntry* entry = mKeyRepeatState.lastKeyEntry;
 
     // Reuse the repeated key entry if it is otherwise unreferenced.
@@ -715,7 +710,7 @@
     // mKeyRepeatState.lastKeyEntry in addition to the one we return.
     entry->refCount += 1;
 
-    mKeyRepeatState.nextRepeatTime = currentTime + keyRepeatDelay;
+    mKeyRepeatState.nextRepeatTime = currentTime + mConfig.keyRepeatDelay;
     return entry;
 }
 
@@ -735,8 +730,7 @@
     return true;
 }
 
-bool InputDispatcher::dispatchKeyLocked(
-        nsecs_t currentTime, KeyEntry* entry, nsecs_t keyRepeatTimeout,
+bool InputDispatcher::dispatchKeyLocked(nsecs_t currentTime, KeyEntry* entry,
         DropReason* dropReason, nsecs_t* nextWakeupTime) {
     // Preprocessing.
     if (! entry->dispatchInProgress) {
@@ -756,7 +750,7 @@
             } else {
                 // Not a repeat.  Save key down state in case we do see a repeat later.
                 resetKeyRepeatLocked();
-                mKeyRepeatState.nextRepeatTime = entry->eventTime + keyRepeatTimeout;
+                mKeyRepeatState.nextRepeatTime = entry->eventTime + mConfig.keyRepeatTimeout;
             }
             mKeyRepeatState.lastKeyEntry = entry;
             entry->refCount += 1;
@@ -3510,6 +3504,11 @@
 void InputDispatcher::dump(String8& dump) {
     dump.append("Input Dispatcher State:\n");
     dumpDispatchStateLocked(dump);
+
+    dump.append(INDENT "Configuration:\n");
+    dump.appendFormat(INDENT2 "MaxEventsPerSecond: %d\n", mConfig.maxEventsPerSecond);
+    dump.appendFormat(INDENT2 "KeyRepeatDelay: %0.1fms\n", mConfig.keyRepeatDelay * 0.000001f);
+    dump.appendFormat(INDENT2 "KeyRepeatTimeout: %0.1fms\n", mConfig.keyRepeatTimeout * 0.000001f);
 }
 
 
diff --git a/services/input/InputDispatcher.h b/services/input/InputDispatcher.h
index 39fa203..5631ef9 100644
--- a/services/input/InputDispatcher.h
+++ b/services/input/InputDispatcher.h
@@ -123,6 +123,30 @@
 
 
 /*
+ * Input dispatcher configuration.
+ *
+ * Specifies various options that modify the behavior of the input dispatcher.
+ */
+struct InputDispatcherConfiguration {
+    // The key repeat initial timeout.
+    nsecs_t keyRepeatTimeout;
+
+    // The key repeat inter-key delay.
+    nsecs_t keyRepeatDelay;
+
+    // The maximum suggested event delivery rate per second.
+    // This value is used to throttle motion event movement actions on a per-device
+    // basis.  It is not intended to be a hard limit.
+    int32_t maxEventsPerSecond;
+
+    InputDispatcherConfiguration() :
+            keyRepeatTimeout(500 * 1000000LL),
+            keyRepeatDelay(50 * 1000000LL),
+            maxEventsPerSecond(60) { }
+};
+
+
+/*
  * Input dispatcher policy interface.
  *
  * The input reader policy is used by the input reader to interact with the Window Manager
@@ -148,17 +172,11 @@
     /* Notifies the system that an input channel is unrecoverably broken. */
     virtual void notifyInputChannelBroken(const sp<InputWindowHandle>& inputWindowHandle) = 0;
 
-    /* Gets the key repeat initial timeout or -1 if automatic key repeating is disabled. */
-    virtual nsecs_t getKeyRepeatTimeout() = 0;
+    /* Gets the input dispatcher configuration. */
+    virtual void getDispatcherConfiguration(InputDispatcherConfiguration* outConfig) = 0;
 
-    /* Gets the key repeat inter-key delay. */
-    virtual nsecs_t getKeyRepeatDelay() = 0;
-
-    /* Gets the maximum suggested event delivery rate per second.
-     * This value is used to throttle motion event movement actions on a per-device
-     * basis.  It is not intended to be a hard limit.
-     */
-    virtual int32_t getMaxEventsPerSecond() = 0;
+    /* Returns true if automatic key repeating is enabled. */
+    virtual bool isKeyRepeatEnabled() = 0;
 
     /* Intercepts a key event immediately before queueing it.
      * The policy can use this method as an opportunity to perform power management functions
@@ -757,6 +775,7 @@
     };
 
     sp<InputDispatcherPolicyInterface> mPolicy;
+    InputDispatcherConfiguration mConfig;
 
     Mutex mLock;
 
@@ -769,8 +788,7 @@
 
     Vector<EventEntry*> mTempCancelationEvents;
 
-    void dispatchOnceInnerLocked(nsecs_t keyRepeatTimeout, nsecs_t keyRepeatDelay,
-            nsecs_t* nextWakeupTime);
+    void dispatchOnceInnerLocked(nsecs_t* nextWakeupTime);
 
     // Batches a new sample onto a motion entry.
     // Assumes that the we have already checked that we can append samples.
@@ -842,7 +860,7 @@
     } mKeyRepeatState;
 
     void resetKeyRepeatLocked();
-    KeyEntry* synthesizeKeyRepeatLocked(nsecs_t currentTime, nsecs_t keyRepeatTimeout);
+    KeyEntry* synthesizeKeyRepeatLocked(nsecs_t currentTime);
 
     // Deferred command processing.
     bool runCommandsLockedInterruptible();
@@ -899,7 +917,7 @@
     bool dispatchConfigurationChangedLocked(
             nsecs_t currentTime, ConfigurationChangedEntry* entry);
     bool dispatchKeyLocked(
-            nsecs_t currentTime, KeyEntry* entry, nsecs_t keyRepeatTimeout,
+            nsecs_t currentTime, KeyEntry* entry,
             DropReason* dropReason, nsecs_t* nextWakeupTime);
     bool dispatchMotionLocked(
             nsecs_t currentTime, MotionEntry* entry,
diff --git a/services/input/InputReader.cpp b/services/input/InputReader.cpp
index cb69008..1ed5ad7 100644
--- a/services/input/InputReader.cpp
+++ b/services/input/InputReader.cpp
@@ -38,6 +38,7 @@
 
 #include "InputReader.h"
 
+#include <cutils/atomic.h>
 #include <cutils/log.h>
 #include <ui/Keyboard.h>
 #include <ui/VirtualKeyMap.h>
@@ -56,67 +57,6 @@
 
 namespace android {
 
-// --- Constants ---
-
-// Quiet time between certain gesture transitions.
-// Time to allow for all fingers or buttons to settle into a stable state before
-// starting a new gesture.
-static const nsecs_t QUIET_INTERVAL = 100 * 1000000; // 100 ms
-
-// The minimum speed that a pointer must travel for us to consider switching the active
-// touch pointer to it during a drag.  This threshold is set to avoid switching due
-// to noise from a finger resting on the touch pad (perhaps just pressing it down).
-static const float DRAG_MIN_SWITCH_SPEED = 50.0f; // pixels per second
-
-// Tap gesture delay time.
-// The time between down and up must be less than this to be considered a tap.
-static const nsecs_t TAP_INTERVAL = 150 * 1000000; // 150 ms
-
-// Tap drag gesture delay time.
-// The time between up and the next up must be greater than this to be considered a
-// drag.  Otherwise, the previous tap is finished and a new tap begins.
-static const nsecs_t TAP_DRAG_INTERVAL = 150 * 1000000; // 150 ms
-
-// The distance in pixels that the pointer is allowed to move from initial down
-// to up and still be called a tap.
-static const float TAP_SLOP = 10.0f; // 10 pixels
-
-// Time after the first touch points go down to settle on an initial centroid.
-// This is intended to be enough time to handle cases where the user puts down two
-// fingers at almost but not quite exactly the same time.
-static const nsecs_t MULTITOUCH_SETTLE_INTERVAL = 100 * 1000000; // 100ms
-
-// The transition from PRESS to SWIPE or FREEFORM gesture mode is made when
-// both of the pointers are moving at least this fast.
-static const float MULTITOUCH_MIN_SPEED = 150.0f; // pixels per second
-
-// The transition from PRESS to SWIPE gesture mode can only occur when the
-// cosine of the angle between the two vectors is greater than or equal to than this value
-// which indicates that the vectors are oriented in the same direction.
-// When the vectors are oriented in the exactly same direction, the cosine is 1.0.
-// (In exactly opposite directions, the cosine is -1.0.)
-static const float SWIPE_TRANSITION_ANGLE_COSINE = 0.5f; // cosine of 45 degrees
-
-// The transition from PRESS to SWIPE gesture mode can only occur when the
-// fingers are no more than this far apart relative to the diagonal size of
-// the touch pad.  For example, a ratio of 0.5 means that the fingers must be
-// no more than half the diagonal size of the touch pad apart.
-static const float SWIPE_MAX_WIDTH_RATIO = 0.333f; // 1/3
-
-// The gesture movement speed factor relative to the size of the display.
-// Movement speed applies when the fingers are moving in the same direction.
-// Without acceleration, a full swipe of the touch pad diagonal in movement mode
-// will cover this portion of the display diagonal.
-static const float GESTURE_MOVEMENT_SPEED_RATIO = 0.8f;
-
-// The gesture zoom speed factor relative to the size of the display.
-// Zoom speed applies when the fingers are mostly moving relative to each other
-// to execute a scale gesture or similar.
-// Without acceleration, a full swipe of the touch pad diagonal in zoom mode
-// will cover this portion of the display diagonal.
-static const float GESTURE_ZOOM_SPEED_RATIO = 0.3f;
-
-
 // --- Static Functions ---
 
 template<typename T>
@@ -246,23 +186,6 @@
     return edgeFlags;
 }
 
-static void clampPositionUsingPointerBounds(
-        const sp<PointerControllerInterface>& pointerController, float* x, float* y) {
-    float minX, minY, maxX, maxY;
-    if (pointerController->getBounds(&minX, &minY, &maxX, &maxY)) {
-        if (*x < minX) {
-            *x = minX;
-        } else if (*x > maxX) {
-            *x = maxX;
-        }
-        if (*y < minY) {
-            *y = minY;
-        } else if (*y > maxY) {
-            *y = maxY;
-        }
-    }
-}
-
 static float calculateCommonVector(float a, float b) {
     if (a > 0 && b > 0) {
         return a < b ? a : b;
@@ -280,8 +203,9 @@
         const sp<InputReaderPolicyInterface>& policy,
         const sp<InputDispatcherInterface>& dispatcher) :
         mEventHub(eventHub), mPolicy(policy), mDispatcher(dispatcher),
-        mGlobalMetaState(0), mDisableVirtualKeysTimeout(LLONG_MIN), mNextTimeout(LLONG_MAX) {
-    configureExcludedDevices();
+        mGlobalMetaState(0), mDisableVirtualKeysTimeout(LLONG_MIN), mNextTimeout(LLONG_MAX),
+        mRefreshConfiguration(0) {
+    configure(true /*firstTime*/);
     updateGlobalMetaState();
     updateInputConfiguration();
 }
@@ -293,6 +217,11 @@
 }
 
 void InputReader::loopOnce() {
+    if (android_atomic_acquire_load(&mRefreshConfiguration)) {
+        android_atomic_release_store(0, &mRefreshConfiguration);
+        configure(false /*firstTime*/);
+    }
+
     int32_t timeoutMillis = -1;
     if (mNextTimeout != LLONG_MAX) {
         nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
@@ -513,12 +442,12 @@
     mDispatcher->notifyConfigurationChanged(when);
 }
 
-void InputReader::configureExcludedDevices() {
-    Vector<String8> excludedDeviceNames;
-    mPolicy->getExcludedDeviceNames(excludedDeviceNames);
+void InputReader::configure(bool firstTime) {
+    mPolicy->getReaderConfiguration(&mConfig);
+    mEventHub->setExcludedDevices(mConfig.excludedDeviceNames);
 
-    for (size_t i = 0; i < excludedDeviceNames.size(); i++) {
-        mEventHub->addExcludedDevice(excludedDeviceNames[i]);
+    if (!firstTime) {
+        mEventHub->reopenDevices();
     }
 }
 
@@ -739,6 +668,10 @@
     } // release device registy reader lock
 }
 
+void InputReader::refreshConfiguration() {
+    android_atomic_release_store(1, &mRefreshConfiguration);
+}
+
 void InputReader::dump(String8& dump) {
     mEventHub->dump(dump);
     dump.append("\n");
@@ -752,6 +685,60 @@
             mDevices.valueAt(i)->dump(dump);
         }
     } // release device registy reader lock
+
+    dump.append(INDENT "Configuration:\n");
+    dump.append(INDENT2 "ExcludedDeviceNames: [");
+    for (size_t i = 0; i < mConfig.excludedDeviceNames.size(); i++) {
+        if (i != 0) {
+            dump.append(", ");
+        }
+        dump.append(mConfig.excludedDeviceNames.itemAt(i).string());
+    }
+    dump.append("]\n");
+    dump.appendFormat(INDENT2 "FilterTouchEvents: %s\n",
+            toString(mConfig.filterTouchEvents));
+    dump.appendFormat(INDENT2 "FilterJumpyTouchEvents: %s\n",
+            toString(mConfig.filterJumpyTouchEvents));
+    dump.appendFormat(INDENT2 "VirtualKeyQuietTime: %0.1fms\n",
+            mConfig.virtualKeyQuietTime * 0.000001f);
+
+    dump.appendFormat(INDENT2 "PointerVelocityControlParameters: "
+            "scale=%0.3f, lowThreshold=%0.3f, highThreshold=%0.3f, acceleration=%0.3f\n",
+            mConfig.pointerVelocityControlParameters.scale,
+            mConfig.pointerVelocityControlParameters.lowThreshold,
+            mConfig.pointerVelocityControlParameters.highThreshold,
+            mConfig.pointerVelocityControlParameters.acceleration);
+
+    dump.appendFormat(INDENT2 "WheelVelocityControlParameters: "
+            "scale=%0.3f, lowThreshold=%0.3f, highThreshold=%0.3f, acceleration=%0.3f\n",
+            mConfig.wheelVelocityControlParameters.scale,
+            mConfig.wheelVelocityControlParameters.lowThreshold,
+            mConfig.wheelVelocityControlParameters.highThreshold,
+            mConfig.wheelVelocityControlParameters.acceleration);
+
+    dump.appendFormat(INDENT2 "PointerGesture:\n");
+    dump.appendFormat(INDENT3 "QuietInterval: %0.1fms\n",
+            mConfig.pointerGestureQuietInterval * 0.000001f);
+    dump.appendFormat(INDENT3 "DragMinSwitchSpeed: %0.1fpx/s\n",
+            mConfig.pointerGestureDragMinSwitchSpeed);
+    dump.appendFormat(INDENT3 "TapInterval: %0.1fms\n",
+            mConfig.pointerGestureTapInterval * 0.000001f);
+    dump.appendFormat(INDENT3 "TapDragInterval: %0.1fms\n",
+            mConfig.pointerGestureTapDragInterval * 0.000001f);
+    dump.appendFormat(INDENT3 "TapSlop: %0.1fpx\n",
+            mConfig.pointerGestureTapSlop);
+    dump.appendFormat(INDENT3 "MultitouchSettleInterval: %0.1fms\n",
+            mConfig.pointerGestureMultitouchSettleInterval * 0.000001f);
+    dump.appendFormat(INDENT3 "MultitouchMinDistance: %0.1fpx\n",
+            mConfig.pointerGestureMultitouchMinDistance);
+    dump.appendFormat(INDENT3 "SwipeTransitionAngleCosine: %0.1f\n",
+            mConfig.pointerGestureSwipeTransitionAngleCosine);
+    dump.appendFormat(INDENT3 "SwipeMaxWidthRatio: %0.1f\n",
+            mConfig.pointerGestureSwipeMaxWidthRatio);
+    dump.appendFormat(INDENT3 "MovementSpeedRatio: %0.1f\n",
+            mConfig.pointerGestureMovementSpeedRatio);
+    dump.appendFormat(INDENT3 "ZoomSpeedRatio: %0.1f\n",
+            mConfig.pointerGestureZoomSpeedRatio);
 }
 
 
@@ -1393,6 +1380,10 @@
 
     mHaveVWheel = getEventHub()->hasRelativeAxis(getDeviceId(), REL_WHEEL);
     mHaveHWheel = getEventHub()->hasRelativeAxis(getDeviceId(), REL_HWHEEL);
+
+    mPointerVelocityControl.setParameters(getConfig()->pointerVelocityControlParameters);
+    mWheelXVelocityControl.setParameters(getConfig()->wheelVelocityControlParameters);
+    mWheelYVelocityControl.setParameters(getConfig()->wheelVelocityControlParameters);
 }
 
 void CursorInputMapper::configureParameters() {
@@ -1454,6 +1445,11 @@
             }
         } // release lock
 
+        // Reset velocity.
+        mPointerVelocityControl.reset();
+        mWheelXVelocityControl.reset();
+        mWheelYVelocityControl.reset();
+
         // Synthesize button up event on reset.
         nsecs_t when = systemTime(SYSTEM_TIME_MONOTONIC);
         mAccumulator.clear();
@@ -1607,11 +1603,16 @@
         } else {
             vscroll = 0;
         }
+        mWheelYVelocityControl.move(when, NULL, &vscroll);
+
         if (mHaveHWheel && (fields & Accumulator::FIELD_REL_HWHEEL)) {
             hscroll = mAccumulator.relHWheel;
         } else {
             hscroll = 0;
         }
+        mWheelXVelocityControl.move(when, &hscroll, NULL);
+
+        mPointerVelocityControl.move(when, &deltaX, &deltaY);
 
         if (mPointerController != NULL) {
             if (deltaX != 0 || deltaY != 0 || vscroll != 0 || hscroll != 0
@@ -1696,6 +1697,8 @@
 
 TouchInputMapper::TouchInputMapper(InputDevice* device) :
         InputMapper(device) {
+    mConfig = getConfig();
+
     mLocked.surfaceOrientation = -1;
     mLocked.surfaceWidth = -1;
     mLocked.surfaceHeight = -1;
@@ -1826,6 +1829,7 @@
     mLocked.orientedRanges.haveOrientation = false;
 
     mPointerGesture.reset();
+    mPointerGesture.pointerVelocityControl.setParameters(mConfig->pointerVelocityControlParameters);
 }
 
 void TouchInputMapper::configure() {
@@ -1868,10 +1872,9 @@
 }
 
 void TouchInputMapper::configureParameters() {
-    mParameters.useBadTouchFilter = getPolicy()->filterTouchEvents();
-    mParameters.useAveragingTouchFilter = getPolicy()->filterTouchEvents();
-    mParameters.useJumpyTouchFilter = getPolicy()->filterJumpyTouchEvents();
-    mParameters.virtualKeyQuietTime = getPolicy()->getVirtualKeyQuietTime();
+    mParameters.useBadTouchFilter = mConfig->filterTouchEvents;
+    mParameters.useAveragingTouchFilter = mConfig->filterTouchEvents;
+    mParameters.useJumpyTouchFilter = mConfig->filterJumpyTouchEvents;
 
     // TODO: select the default gesture mode based on whether the device supports
     // distinct multitouch
@@ -2260,26 +2263,26 @@
                     mLocked.associatedDisplayHeight);
 
             // Scale movements such that one whole swipe of the touch pad covers a
-            // given area relative to the diagonal size of the display.
+            // given area relative to the diagonal size of the display when no acceleration
+            // is applied.
             // Assume that the touch pad has a square aspect ratio such that movements in
             // X and Y of the same number of raw units cover the same physical distance.
-            const float scaleFactor = 0.8f;
-
-            mLocked.pointerGestureXMovementScale = GESTURE_MOVEMENT_SPEED_RATIO
+            mLocked.pointerGestureXMovementScale = mConfig->pointerGestureMovementSpeedRatio
                     * displayDiagonal / rawDiagonal;
             mLocked.pointerGestureYMovementScale = mLocked.pointerGestureXMovementScale;
 
             // Scale zooms to cover a smaller range of the display than movements do.
             // This value determines the area around the pointer that is affected by freeform
             // pointer gestures.
-            mLocked.pointerGestureXZoomScale = GESTURE_ZOOM_SPEED_RATIO
+            mLocked.pointerGestureXZoomScale = mConfig->pointerGestureZoomSpeedRatio
                     * displayDiagonal / rawDiagonal;
             mLocked.pointerGestureYZoomScale = mLocked.pointerGestureXZoomScale;
 
             // Max width between pointers to detect a swipe gesture is more than some fraction
             // of the diagonal axis of the touch pad.  Touches that are wider than this are
             // translated into freeform gestures.
-            mLocked.pointerGestureMaxSwipeWidth = SWIPE_MAX_WIDTH_RATIO * rawDiagonal;
+            mLocked.pointerGestureMaxSwipeWidth =
+                    mConfig->pointerGestureSwipeMaxWidthRatio * rawDiagonal;
 
             // Reset the current pointer gesture.
             mPointerGesture.reset();
@@ -2945,8 +2948,8 @@
     //    area and accidentally triggers a virtual key.  This often happens when virtual keys
     //    are layed out below the screen near to where the on screen keyboard's space bar
     //    is displayed.
-    if (mParameters.virtualKeyQuietTime > 0 && mCurrentTouch.pointerCount != 0) {
-        mContext->disableVirtualKeysUntil(when + mParameters.virtualKeyQuietTime);
+    if (mConfig->virtualKeyQuietTime > 0 && mCurrentTouch.pointerCount != 0) {
+        mContext->disableVirtualKeysUntil(when + mConfig->virtualKeyQuietTime);
     }
 }
 
@@ -3260,12 +3263,6 @@
 
 void TouchInputMapper::dispatchPointerGestures(nsecs_t when, uint32_t policyFlags,
         bool isTimeout) {
-    // Switch pointer presentation.
-    mPointerController->setPresentation(
-            mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS
-                    ? PointerControllerInterface::PRESENTATION_SPOT
-                    : PointerControllerInterface::PRESENTATION_POINTER);
-
     // Update current gesture coordinates.
     bool cancelPreviousGesture, finishPreviousGesture;
     bool sendEvents = preparePointerGestures(when,
@@ -3273,6 +3270,22 @@
     if (!sendEvents) {
         return;
     }
+    if (finishPreviousGesture) {
+        cancelPreviousGesture = false;
+    }
+
+    // Update the pointer presentation and spots.
+    if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
+        mPointerController->setPresentation(PointerControllerInterface::PRESENTATION_SPOT);
+        if (finishPreviousGesture || cancelPreviousGesture) {
+            mPointerController->clearSpots();
+        }
+        mPointerController->setSpots(mPointerGesture.currentGestureCoords,
+                mPointerGesture.currentGestureIdToIndex,
+                mPointerGesture.currentGestureIdBits);
+    } else {
+        mPointerController->setPresentation(PointerControllerInterface::PRESENTATION_POINTER);
+    }
 
     // Show or hide the pointer if needed.
     switch (mPointerGesture.currentGestureMode) {
@@ -3441,9 +3454,10 @@
 #endif
 
         if (mPointerGesture.lastGestureMode == PointerGesture::TAP) {
-            if (when <= mPointerGesture.tapUpTime + TAP_DRAG_INTERVAL) {
+            if (when <= mPointerGesture.tapUpTime + mConfig->pointerGestureTapDragInterval) {
                 // The tap/drag timeout has not yet expired.
-                getContext()->requestTimeoutAtTime(mPointerGesture.tapUpTime + TAP_DRAG_INTERVAL);
+                getContext()->requestTimeoutAtTime(mPointerGesture.tapUpTime
+                        + mConfig->pointerGestureTapDragInterval);
             } else {
                 // The tap is finished.
 #if DEBUG_GESTURES
@@ -3455,13 +3469,7 @@
                 mPointerGesture.currentGestureMode = PointerGesture::NEUTRAL;
                 mPointerGesture.currentGestureIdBits.clear();
 
-                mPointerController->setButtonState(0);
-
-                if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
-                    mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_NEUTRAL;
-                    mPointerGesture.spotIdBits.clear();
-                    moveSpotsLocked();
-                }
+                mPointerGesture.pointerVelocityControl.reset();
                 return true;
             }
         }
@@ -3514,7 +3522,7 @@
     if (activeTouchId < 0) {
         mPointerGesture.resetQuietTime();
     } else {
-        isQuietTime = when < mPointerGesture.quietTime + QUIET_INTERVAL;
+        isQuietTime = when < mPointerGesture.quietTime + mConfig->pointerGestureQuietInterval;
         if (!isQuietTime) {
             if ((mPointerGesture.lastGestureMode == PointerGesture::PRESS
                     || mPointerGesture.lastGestureMode == PointerGesture::SWIPE
@@ -3542,22 +3550,18 @@
     if (isQuietTime) {
         // Case 1: Quiet time. (QUIET)
 #if DEBUG_GESTURES
-        LOGD("Gestures: QUIET for next %0.3fms",
-                (mPointerGesture.quietTime + QUIET_INTERVAL - when) * 0.000001f);
+        LOGD("Gestures: QUIET for next %0.3fms", (mPointerGesture.quietTime
+                + mConfig->pointerGestureQuietInterval - when) * 0.000001f);
 #endif
-        *outFinishPreviousGesture = true;
+        if (mPointerGesture.lastGestureMode != PointerGesture::QUIET) {
+            *outFinishPreviousGesture = true;
+        }
 
         mPointerGesture.activeGestureId = -1;
         mPointerGesture.currentGestureMode = PointerGesture::QUIET;
         mPointerGesture.currentGestureIdBits.clear();
 
-        mPointerController->setButtonState(0);
-
-        if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
-            mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_NEUTRAL;
-            mPointerGesture.spotIdBits.clear();
-            moveSpotsLocked();
-        }
+        mPointerGesture.pointerVelocityControl.reset();
     } else if (isPointerDown(mCurrentTouch.buttonState)) {
         // Case 2: Button is pressed. (BUTTON_CLICK_OR_DRAG)
         // The pointer follows the active touch point.
@@ -3584,46 +3588,48 @@
 
         // Switch pointers if needed.
         // Find the fastest pointer and follow it.
-        if (activeTouchId >= 0) {
-            if (mCurrentTouch.pointerCount > 1) {
-                int32_t bestId = -1;
-                float bestSpeed = DRAG_MIN_SWITCH_SPEED;
-                for (uint32_t i = 0; i < mCurrentTouch.pointerCount; i++) {
-                    uint32_t id = mCurrentTouch.pointers[i].id;
-                    float vx, vy;
-                    if (mPointerGesture.velocityTracker.getVelocity(id, &vx, &vy)) {
-                        float speed = hypotf(vx, vy);
-                        if (speed > bestSpeed) {
-                            bestId = id;
-                            bestSpeed = speed;
-                        }
+        if (activeTouchId >= 0 && mCurrentTouch.pointerCount > 1) {
+            int32_t bestId = -1;
+            float bestSpeed = mConfig->pointerGestureDragMinSwitchSpeed;
+            for (uint32_t i = 0; i < mCurrentTouch.pointerCount; i++) {
+                uint32_t id = mCurrentTouch.pointers[i].id;
+                float vx, vy;
+                if (mPointerGesture.velocityTracker.getVelocity(id, &vx, &vy)) {
+                    float speed = hypotf(vx, vy);
+                    if (speed > bestSpeed) {
+                        bestId = id;
+                        bestSpeed = speed;
                     }
                 }
-                if (bestId >= 0 && bestId != activeTouchId) {
-                    mPointerGesture.activeTouchId = activeTouchId = bestId;
-                    activeTouchChanged = true;
+            }
+            if (bestId >= 0 && bestId != activeTouchId) {
+                mPointerGesture.activeTouchId = activeTouchId = bestId;
+                activeTouchChanged = true;
 #if DEBUG_GESTURES
-                    LOGD("Gestures: BUTTON_CLICK_OR_DRAG switched pointers, "
-                            "bestId=%d, bestSpeed=%0.3f", bestId, bestSpeed);
+                LOGD("Gestures: BUTTON_CLICK_OR_DRAG switched pointers, "
+                        "bestId=%d, bestSpeed=%0.3f", bestId, bestSpeed);
 #endif
-                }
             }
+        }
 
-            if (mLastTouch.idBits.hasBit(activeTouchId)) {
-                const PointerData& currentPointer =
-                        mCurrentTouch.pointers[mCurrentTouch.idToIndex[activeTouchId]];
-                const PointerData& lastPointer =
-                        mLastTouch.pointers[mLastTouch.idToIndex[activeTouchId]];
-                float deltaX = (currentPointer.x - lastPointer.x)
-                        * mLocked.pointerGestureXMovementScale;
-                float deltaY = (currentPointer.y - lastPointer.y)
-                        * mLocked.pointerGestureYMovementScale;
+        if (activeTouchId >= 0 && mLastTouch.idBits.hasBit(activeTouchId)) {
+            const PointerData& currentPointer =
+                    mCurrentTouch.pointers[mCurrentTouch.idToIndex[activeTouchId]];
+            const PointerData& lastPointer =
+                    mLastTouch.pointers[mLastTouch.idToIndex[activeTouchId]];
+            float deltaX = (currentPointer.x - lastPointer.x)
+                    * mLocked.pointerGestureXMovementScale;
+            float deltaY = (currentPointer.y - lastPointer.y)
+                    * mLocked.pointerGestureYMovementScale;
 
-                // Move the pointer using a relative motion.
-                // When using spots, the click will occur at the position of the anchor
-                // spot and all other spots will move there.
-                mPointerController->move(deltaX, deltaY);
-            }
+            mPointerGesture.pointerVelocityControl.move(when, &deltaX, &deltaY);
+
+            // Move the pointer using a relative motion.
+            // When using spots, the click will occur at the position of the anchor
+            // spot and all other spots will move there.
+            mPointerController->move(deltaX, deltaY);
+        } else {
+            mPointerGesture.pointerVelocityControl.reset();
         }
 
         float x, y;
@@ -3637,51 +3643,30 @@
         mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_X, x);
         mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_Y, y);
         mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, 1.0f);
-
-        mPointerController->setButtonState(BUTTON_STATE_PRIMARY);
-
-        if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
-            if (activeTouchId >= 0) {
-                // Collapse all spots into one point at the pointer location.
-                mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_BUTTON_DRAG;
-                mPointerGesture.spotIdBits.clear();
-                for (uint32_t i = 0; i < mCurrentTouch.pointerCount; i++) {
-                    uint32_t id = mCurrentTouch.pointers[i].id;
-                    mPointerGesture.spotIdBits.markBit(id);
-                    mPointerGesture.spotIdToIndex[id] = i;
-                    mPointerGesture.spotCoords[i] = mPointerGesture.currentGestureCoords[0];
-                }
-            } else {
-                // No fingers.  Generate a spot at the pointer location so the
-                // anchor appears to be pressed.
-                mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_BUTTON_CLICK;
-                mPointerGesture.spotIdBits.clear();
-                mPointerGesture.spotIdBits.markBit(0);
-                mPointerGesture.spotIdToIndex[0] = 0;
-                mPointerGesture.spotCoords[0] = mPointerGesture.currentGestureCoords[0];
-            }
-            moveSpotsLocked();
-        }
     } else if (mCurrentTouch.pointerCount == 0) {
         // Case 3. No fingers down and button is not pressed. (NEUTRAL)
-        *outFinishPreviousGesture = true;
+        if (mPointerGesture.lastGestureMode != PointerGesture::NEUTRAL) {
+            *outFinishPreviousGesture = true;
+        }
 
         // Watch for taps coming out of HOVER or TAP_DRAG mode.
+        // Checking for taps after TAP_DRAG allows us to detect double-taps.
         bool tapped = false;
         if ((mPointerGesture.lastGestureMode == PointerGesture::HOVER
                 || mPointerGesture.lastGestureMode == PointerGesture::TAP_DRAG)
                 && mLastTouch.pointerCount == 1) {
-            if (when <= mPointerGesture.tapDownTime + TAP_INTERVAL) {
+            if (when <= mPointerGesture.tapDownTime + mConfig->pointerGestureTapInterval) {
                 float x, y;
                 mPointerController->getPosition(&x, &y);
-                if (fabs(x - mPointerGesture.tapX) <= TAP_SLOP
-                        && fabs(y - mPointerGesture.tapY) <= TAP_SLOP) {
+                if (fabs(x - mPointerGesture.tapX) <= mConfig->pointerGestureTapSlop
+                        && fabs(y - mPointerGesture.tapY) <= mConfig->pointerGestureTapSlop) {
 #if DEBUG_GESTURES
                     LOGD("Gestures: TAP");
 #endif
 
                     mPointerGesture.tapUpTime = when;
-                    getContext()->requestTimeoutAtTime(when + TAP_DRAG_INTERVAL);
+                    getContext()->requestTimeoutAtTime(when
+                            + mConfig->pointerGestureTapDragInterval);
 
                     mPointerGesture.activeGestureId = 0;
                     mPointerGesture.currentGestureMode = PointerGesture::TAP;
@@ -3698,17 +3683,6 @@
                     mPointerGesture.currentGestureCoords[0].setAxisValue(
                             AMOTION_EVENT_AXIS_PRESSURE, 1.0f);
 
-                    mPointerController->setButtonState(BUTTON_STATE_PRIMARY);
-
-                    if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
-                        mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_TAP;
-                        mPointerGesture.spotIdBits.clear();
-                        mPointerGesture.spotIdBits.markBit(lastActiveTouchId);
-                        mPointerGesture.spotIdToIndex[lastActiveTouchId] = 0;
-                        mPointerGesture.spotCoords[0] = mPointerGesture.currentGestureCoords[0];
-                        moveSpotsLocked();
-                    }
-
                     tapped = true;
                 } else {
 #if DEBUG_GESTURES
@@ -3725,6 +3699,8 @@
             }
         }
 
+        mPointerGesture.pointerVelocityControl.reset();
+
         if (!tapped) {
 #if DEBUG_GESTURES
             LOGD("Gestures: NEUTRAL");
@@ -3732,14 +3708,6 @@
             mPointerGesture.activeGestureId = -1;
             mPointerGesture.currentGestureMode = PointerGesture::NEUTRAL;
             mPointerGesture.currentGestureIdBits.clear();
-
-            mPointerController->setButtonState(0);
-
-            if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
-                mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_NEUTRAL;
-                mPointerGesture.spotIdBits.clear();
-                moveSpotsLocked();
-            }
         }
     } else if (mCurrentTouch.pointerCount == 1) {
         // Case 4. Exactly one finger down, button is not pressed. (HOVER or TAP_DRAG)
@@ -3750,11 +3718,11 @@
 
         mPointerGesture.currentGestureMode = PointerGesture::HOVER;
         if (mPointerGesture.lastGestureMode == PointerGesture::TAP) {
-            if (when <= mPointerGesture.tapUpTime + TAP_DRAG_INTERVAL) {
+            if (when <= mPointerGesture.tapUpTime + mConfig->pointerGestureTapDragInterval) {
                 float x, y;
                 mPointerController->getPosition(&x, &y);
-                if (fabs(x - mPointerGesture.tapX) <= TAP_SLOP
-                        && fabs(y - mPointerGesture.tapY) <= TAP_SLOP) {
+                if (fabs(x - mPointerGesture.tapX) <= mConfig->pointerGestureTapSlop
+                        && fabs(y - mPointerGesture.tapY) <= mConfig->pointerGestureTapSlop) {
                     mPointerGesture.currentGestureMode = PointerGesture::TAP_DRAG;
                 } else {
 #if DEBUG_GESTURES
@@ -3783,9 +3751,13 @@
             float deltaY = (currentPointer.y - lastPointer.y)
                     * mLocked.pointerGestureYMovementScale;
 
+            mPointerGesture.pointerVelocityControl.move(when, &deltaX, &deltaY);
+
             // Move the pointer using a relative motion.
             // When using spots, the hover or drag will occur at the position of the anchor spot.
             mPointerController->move(deltaX, deltaY);
+        } else {
+            mPointerGesture.pointerVelocityControl.reset();
         }
 
         bool down;
@@ -3798,7 +3770,9 @@
 #if DEBUG_GESTURES
             LOGD("Gestures: HOVER");
 #endif
-            *outFinishPreviousGesture = true;
+            if (mPointerGesture.lastGestureMode != PointerGesture::HOVER) {
+                *outFinishPreviousGesture = true;
+            }
             mPointerGesture.activeGestureId = 0;
             down = false;
         }
@@ -3815,24 +3789,12 @@
         mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE,
                 down ? 1.0f : 0.0f);
 
-        mPointerController->setButtonState(down ? BUTTON_STATE_PRIMARY : 0);
-
         if (mLastTouch.pointerCount == 0 && mCurrentTouch.pointerCount != 0) {
             mPointerGesture.resetTap();
             mPointerGesture.tapDownTime = when;
             mPointerGesture.tapX = x;
             mPointerGesture.tapY = y;
         }
-
-        if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
-            mPointerGesture.spotGesture = down ? PointerControllerInterface::SPOT_GESTURE_DRAG
-                    : PointerControllerInterface::SPOT_GESTURE_HOVER;
-            mPointerGesture.spotIdBits.clear();
-            mPointerGesture.spotIdBits.markBit(activeTouchId);
-            mPointerGesture.spotIdToIndex[activeTouchId] = 0;
-            mPointerGesture.spotCoords[0] = mPointerGesture.currentGestureCoords[0];
-            moveSpotsLocked();
-        }
     } else {
         // Case 5. At least two fingers down, button is not pressed. (PRESS, SWIPE or FREEFORM)
         // We need to provide feedback for each finger that goes down so we cannot wait
@@ -3849,129 +3811,165 @@
         // a decision to transition into SWIPE or FREEFORM mode accordingly.
         LOG_ASSERT(activeTouchId >= 0);
 
-        bool needReference = false;
-        bool settled = when >= mPointerGesture.firstTouchTime + MULTITOUCH_SETTLE_INTERVAL;
+        bool settled = when >= mPointerGesture.firstTouchTime
+                + mConfig->pointerGestureMultitouchSettleInterval;
         if (mPointerGesture.lastGestureMode != PointerGesture::PRESS
                 && mPointerGesture.lastGestureMode != PointerGesture::SWIPE
                 && mPointerGesture.lastGestureMode != PointerGesture::FREEFORM) {
             *outFinishPreviousGesture = true;
-            mPointerGesture.currentGestureMode = PointerGesture::PRESS;
-            mPointerGesture.activeGestureId = 0;
-            mPointerGesture.referenceIdBits.clear();
-
-            if (settled && mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS
-                    && mLastTouch.idBits.hasBit(mPointerGesture.activeTouchId)) {
-                // The spot is already visible and has settled, use it as the reference point
-                // for the gesture.  Other spots will be positioned relative to this one.
-#if DEBUG_GESTURES
-                LOGD("Gestures: Using active spot as reference for MULTITOUCH, "
-                        "settle time expired %0.3fms ago",
-                        (when - mPointerGesture.firstTouchTime - MULTITOUCH_SETTLE_INTERVAL)
-                                * 0.000001f);
-#endif
-                const PointerData& d = mLastTouch.pointers[mLastTouch.idToIndex[
-                        mPointerGesture.activeTouchId]];
-                mPointerGesture.referenceTouchX = d.x;
-                mPointerGesture.referenceTouchY = d.y;
-                const PointerCoords& c = mPointerGesture.spotCoords[mPointerGesture.spotIdToIndex[
-                        mPointerGesture.activeTouchId]];
-                mPointerGesture.referenceGestureX = c.getAxisValue(AMOTION_EVENT_AXIS_X);
-                mPointerGesture.referenceGestureY = c.getAxisValue(AMOTION_EVENT_AXIS_Y);
-            } else {
-#if DEBUG_GESTURES
-                LOGD("Gestures: Using centroid as reference for MULTITOUCH, "
-                        "settle time remaining %0.3fms",
-                        (mPointerGesture.firstTouchTime + MULTITOUCH_SETTLE_INTERVAL - when)
-                                * 0.000001f);
-#endif
-                needReference = true;
-            }
         } else if (!settled && mCurrentTouch.pointerCount > mLastTouch.pointerCount) {
             // Additional pointers have gone down but not yet settled.
             // Reset the gesture.
 #if DEBUG_GESTURES
             LOGD("Gestures: Resetting gesture since additional pointers went down for MULTITOUCH, "
-                    "settle time remaining %0.3fms",
-                    (mPointerGesture.firstTouchTime + MULTITOUCH_SETTLE_INTERVAL - when)
+                    "settle time remaining %0.3fms", (mPointerGesture.firstTouchTime
+                            + mConfig->pointerGestureMultitouchSettleInterval - when)
                             * 0.000001f);
 #endif
             *outCancelPreviousGesture = true;
-            mPointerGesture.currentGestureMode = PointerGesture::PRESS;
-            mPointerGesture.activeGestureId = 0;
         } else {
             // Continue previous gesture.
             mPointerGesture.currentGestureMode = mPointerGesture.lastGestureMode;
         }
 
-        if (needReference) {
+        if (*outFinishPreviousGesture || *outCancelPreviousGesture) {
+            mPointerGesture.currentGestureMode = PointerGesture::PRESS;
+            mPointerGesture.activeGestureId = 0;
+            mPointerGesture.referenceIdBits.clear();
+            mPointerGesture.pointerVelocityControl.reset();
+
             // Use the centroid and pointer location as the reference points for the gesture.
+#if DEBUG_GESTURES
+            LOGD("Gestures: Using centroid as reference for MULTITOUCH, "
+                    "settle time remaining %0.3fms", (mPointerGesture.firstTouchTime
+                            + mConfig->pointerGestureMultitouchSettleInterval - when)
+                            * 0.000001f);
+#endif
             mCurrentTouch.getCentroid(&mPointerGesture.referenceTouchX,
                     &mPointerGesture.referenceTouchY);
             mPointerController->getPosition(&mPointerGesture.referenceGestureX,
                     &mPointerGesture.referenceGestureY);
         }
 
-        if (mPointerGesture.currentGestureMode == PointerGesture::PRESS) {
-            float d;
-            if (mCurrentTouch.pointerCount > 2) {
-                // There are more than two pointers, switch to FREEFORM.
-#if DEBUG_GESTURES
-                LOGD("Gestures: PRESS transitioned to FREEFORM, number of pointers %d > 2",
-                        mCurrentTouch.pointerCount);
-#endif
-                *outCancelPreviousGesture = true;
-                mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
-            } else if (((d = distance(
-                    mCurrentTouch.pointers[0].x, mCurrentTouch.pointers[0].y,
-                    mCurrentTouch.pointers[1].x, mCurrentTouch.pointers[1].y))
-                            > mLocked.pointerGestureMaxSwipeWidth)) {
-                // There are two pointers but they are too far apart, switch to FREEFORM.
-#if DEBUG_GESTURES
-                LOGD("Gestures: PRESS transitioned to FREEFORM, distance %0.3f > %0.3f",
-                        d, mLocked.pointerGestureMaxSwipeWidth);
-#endif
-                *outCancelPreviousGesture = true;
-                mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
+        // Clear the reference deltas for fingers not yet included in the reference calculation.
+        for (BitSet32 idBits(mCurrentTouch.idBits.value & ~mPointerGesture.referenceIdBits.value);
+                !idBits.isEmpty(); ) {
+            uint32_t id = idBits.firstMarkedBit();
+            idBits.clearBit(id);
+
+            mPointerGesture.referenceDeltas[id].dx = 0;
+            mPointerGesture.referenceDeltas[id].dy = 0;
+        }
+        mPointerGesture.referenceIdBits = mCurrentTouch.idBits;
+
+        // Add delta for all fingers and calculate a common movement delta.
+        float commonDeltaX = 0, commonDeltaY = 0;
+        BitSet32 commonIdBits(mLastTouch.idBits.value & mCurrentTouch.idBits.value);
+        for (BitSet32 idBits(commonIdBits); !idBits.isEmpty(); ) {
+            bool first = (idBits == commonIdBits);
+            uint32_t id = idBits.firstMarkedBit();
+            idBits.clearBit(id);
+
+            const PointerData& cpd = mCurrentTouch.pointers[mCurrentTouch.idToIndex[id]];
+            const PointerData& lpd = mLastTouch.pointers[mLastTouch.idToIndex[id]];
+            PointerGesture::Delta& delta = mPointerGesture.referenceDeltas[id];
+            delta.dx += cpd.x - lpd.x;
+            delta.dy += cpd.y - lpd.y;
+
+            if (first) {
+                commonDeltaX = delta.dx;
+                commonDeltaY = delta.dy;
             } else {
-                // There are two pointers.  Wait for both pointers to start moving
-                // before deciding whether this is a SWIPE or FREEFORM gesture.
-                uint32_t id1 = mCurrentTouch.pointers[0].id;
-                uint32_t id2 = mCurrentTouch.pointers[1].id;
+                commonDeltaX = calculateCommonVector(commonDeltaX, delta.dx);
+                commonDeltaY = calculateCommonVector(commonDeltaY, delta.dy);
+            }
+        }
 
-                float vx1, vy1, vx2, vy2;
-                mPointerGesture.velocityTracker.getVelocity(id1, &vx1, &vy1);
-                mPointerGesture.velocityTracker.getVelocity(id2, &vx2, &vy2);
+        // Consider transitions from PRESS to SWIPE or MULTITOUCH.
+        if (mPointerGesture.currentGestureMode == PointerGesture::PRESS) {
+            float dist[MAX_POINTER_ID + 1];
+            int32_t distOverThreshold = 0;
+            for (BitSet32 idBits(mPointerGesture.referenceIdBits); !idBits.isEmpty(); ) {
+                uint32_t id = idBits.firstMarkedBit();
+                idBits.clearBit(id);
 
-                float speed1 = hypotf(vx1, vy1);
-                float speed2 = hypotf(vx2, vy2);
-                if (speed1 >= MULTITOUCH_MIN_SPEED && speed2 >= MULTITOUCH_MIN_SPEED) {
-                    // Calculate the dot product of the velocity vectors.
-                    // When the vectors are oriented in approximately the same direction,
-                    // the angle betweeen them is near zero and the cosine of the angle
-                    // approches 1.0.  Recall that dot(v1, v2) = cos(angle) * mag(v1) * mag(v2).
-                    float dot = vx1 * vx2 + vy1 * vy2;
-                    float cosine = dot / (speed1 * speed2); // denominator always > 0
-                    if (cosine >= SWIPE_TRANSITION_ANGLE_COSINE) {
-                        // Pointers are moving in the same direction.  Switch to SWIPE.
+                PointerGesture::Delta& delta = mPointerGesture.referenceDeltas[id];
+                dist[id] = hypotf(delta.dx * mLocked.pointerGestureXZoomScale,
+                        delta.dy * mLocked.pointerGestureYZoomScale);
+                if (dist[id] > mConfig->pointerGestureMultitouchMinDistance) {
+                    distOverThreshold += 1;
+                }
+            }
+
+            // Only transition when at least two pointers have moved further than
+            // the minimum distance threshold.
+            if (distOverThreshold >= 2) {
+                float d;
+                if (mCurrentTouch.pointerCount > 2) {
+                    // There are more than two pointers, switch to FREEFORM.
 #if DEBUG_GESTURES
-                        LOGD("Gestures: PRESS transitioned to SWIPE, "
-                                "speed1 %0.3f >= %0.3f, speed2 %0.3f >= %0.3f, "
-                                "cosine %0.3f >= %0.3f",
-                                speed1, MULTITOUCH_MIN_SPEED, speed2, MULTITOUCH_MIN_SPEED,
-                                cosine, SWIPE_TRANSITION_ANGLE_COSINE);
+                    LOGD("Gestures: PRESS transitioned to FREEFORM, number of pointers %d > 2",
+                            mCurrentTouch.pointerCount);
 #endif
-                        mPointerGesture.currentGestureMode = PointerGesture::SWIPE;
-                    } else {
-                        // Pointers are moving in different directions.  Switch to FREEFORM.
+                    *outCancelPreviousGesture = true;
+                    mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
+                } else if (((d = distance(
+                        mCurrentTouch.pointers[0].x, mCurrentTouch.pointers[0].y,
+                        mCurrentTouch.pointers[1].x, mCurrentTouch.pointers[1].y))
+                                > mLocked.pointerGestureMaxSwipeWidth)) {
+                    // There are two pointers but they are too far apart for a SWIPE,
+                    // switch to FREEFORM.
 #if DEBUG_GESTURES
-                        LOGD("Gestures: PRESS transitioned to FREEFORM, "
-                                "speed1 %0.3f >= %0.3f, speed2 %0.3f >= %0.3f, "
-                                "cosine %0.3f < %0.3f",
-                                speed1, MULTITOUCH_MIN_SPEED, speed2, MULTITOUCH_MIN_SPEED,
-                                cosine, SWIPE_TRANSITION_ANGLE_COSINE);
+                    LOGD("Gestures: PRESS transitioned to FREEFORM, distance %0.3f > %0.3f",
+                            d, mLocked.pointerGestureMaxSwipeWidth);
 #endif
-                        *outCancelPreviousGesture = true;
-                        mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
+                    *outCancelPreviousGesture = true;
+                    mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
+                } else {
+                    // There are two pointers.  Wait for both pointers to start moving
+                    // before deciding whether this is a SWIPE or FREEFORM gesture.
+                    uint32_t id1 = mCurrentTouch.pointers[0].id;
+                    uint32_t id2 = mCurrentTouch.pointers[1].id;
+                    float dist1 = dist[id1];
+                    float dist2 = dist[id2];
+                    if (dist1 >= mConfig->pointerGestureMultitouchMinDistance
+                            && dist2 >= mConfig->pointerGestureMultitouchMinDistance) {
+                        // Calculate the dot product of the displacement vectors.
+                        // When the vectors are oriented in approximately the same direction,
+                        // the angle betweeen them is near zero and the cosine of the angle
+                        // approches 1.0.  Recall that dot(v1, v2) = cos(angle) * mag(v1) * mag(v2).
+                        PointerGesture::Delta& delta1 = mPointerGesture.referenceDeltas[id1];
+                        PointerGesture::Delta& delta2 = mPointerGesture.referenceDeltas[id2];
+                        float dx1 = delta1.dx * mLocked.pointerGestureXZoomScale;
+                        float dy1 = delta1.dy * mLocked.pointerGestureYZoomScale;
+                        float dx2 = delta2.dx * mLocked.pointerGestureXZoomScale;
+                        float dy2 = delta2.dy * mLocked.pointerGestureYZoomScale;
+                        float dot = dx1 * dx2 + dy1 * dy2;
+                        float cosine = dot / (dist1 * dist2); // denominator always > 0
+                        if (cosine >= mConfig->pointerGestureSwipeTransitionAngleCosine) {
+                            // Pointers are moving in the same direction.  Switch to SWIPE.
+#if DEBUG_GESTURES
+                            LOGD("Gestures: PRESS transitioned to SWIPE, "
+                                    "dist1 %0.3f >= %0.3f, dist2 %0.3f >= %0.3f, "
+                                    "cosine %0.3f >= %0.3f",
+                                    dist1, mConfig->pointerGestureMultitouchMinDistance,
+                                    dist2, mConfig->pointerGestureMultitouchMinDistance,
+                                    cosine, mConfig->pointerGestureSwipeTransitionAngleCosine);
+#endif
+                            mPointerGesture.currentGestureMode = PointerGesture::SWIPE;
+                        } else {
+                            // Pointers are moving in different directions.  Switch to FREEFORM.
+#if DEBUG_GESTURES
+                            LOGD("Gestures: PRESS transitioned to FREEFORM, "
+                                    "dist1 %0.3f >= %0.3f, dist2 %0.3f >= %0.3f, "
+                                    "cosine %0.3f < %0.3f",
+                                    dist1, mConfig->pointerGestureMultitouchMinDistance,
+                                    dist2, mConfig->pointerGestureMultitouchMinDistance,
+                                    cosine, mConfig->pointerGestureSwipeTransitionAngleCosine);
+#endif
+                            *outCancelPreviousGesture = true;
+                            mPointerGesture.currentGestureMode = PointerGesture::FREEFORM;
+                        }
                     }
                 }
             }
@@ -3988,63 +3986,28 @@
             }
         }
 
-        // Clear the reference deltas for fingers not yet included in the reference calculation.
-        for (BitSet32 idBits(mCurrentTouch.idBits.value & ~mPointerGesture.referenceIdBits.value);
-                !idBits.isEmpty(); ) {
-            uint32_t id = idBits.firstMarkedBit();
-            idBits.clearBit(id);
-
-            mPointerGesture.referenceDeltas[id].dx = 0;
-            mPointerGesture.referenceDeltas[id].dy = 0;
-        }
-        mPointerGesture.referenceIdBits = mCurrentTouch.idBits;
-
-        // Move the reference points based on the overall group motion of the fingers.
-        // The objective is to calculate a vector delta that is common to the movement
-        // of all fingers.
-        BitSet32 commonIdBits(mLastTouch.idBits.value & mCurrentTouch.idBits.value);
-        if (!commonIdBits.isEmpty()) {
-            float commonDeltaX = 0, commonDeltaY = 0;
-            for (BitSet32 idBits(commonIdBits); !idBits.isEmpty(); ) {
-                bool first = (idBits == commonIdBits);
+        // Move the reference points based on the overall group motion of the fingers
+        // except in PRESS mode while waiting for a transition to occur.
+        if (mPointerGesture.currentGestureMode != PointerGesture::PRESS
+                && (commonDeltaX || commonDeltaY)) {
+            for (BitSet32 idBits(mPointerGesture.referenceIdBits); !idBits.isEmpty(); ) {
                 uint32_t id = idBits.firstMarkedBit();
                 idBits.clearBit(id);
 
-                const PointerData& cpd = mCurrentTouch.pointers[mCurrentTouch.idToIndex[id]];
-                const PointerData& lpd = mLastTouch.pointers[mLastTouch.idToIndex[id]];
                 PointerGesture::Delta& delta = mPointerGesture.referenceDeltas[id];
-                delta.dx += cpd.x - lpd.x;
-                delta.dy += cpd.y - lpd.y;
-
-                if (first) {
-                    commonDeltaX = delta.dx;
-                    commonDeltaY = delta.dy;
-                } else {
-                    commonDeltaX = calculateCommonVector(commonDeltaX, delta.dx);
-                    commonDeltaY = calculateCommonVector(commonDeltaY, delta.dy);
-                }
+                delta.dx = 0;
+                delta.dy = 0;
             }
 
-            if (commonDeltaX || commonDeltaY) {
-                for (BitSet32 idBits(commonIdBits); !idBits.isEmpty(); ) {
-                    uint32_t id = idBits.firstMarkedBit();
-                    idBits.clearBit(id);
+            mPointerGesture.referenceTouchX += commonDeltaX;
+            mPointerGesture.referenceTouchY += commonDeltaY;
 
-                    PointerGesture::Delta& delta = mPointerGesture.referenceDeltas[id];
-                    delta.dx = 0;
-                    delta.dy = 0;
-                }
+            commonDeltaX *= mLocked.pointerGestureXMovementScale;
+            commonDeltaY *= mLocked.pointerGestureYMovementScale;
+            mPointerGesture.pointerVelocityControl.move(when, &commonDeltaX, &commonDeltaY);
 
-                mPointerGesture.referenceTouchX += commonDeltaX;
-                mPointerGesture.referenceTouchY += commonDeltaY;
-                mPointerGesture.referenceGestureX +=
-                        commonDeltaX * mLocked.pointerGestureXMovementScale;
-                mPointerGesture.referenceGestureY +=
-                        commonDeltaY * mLocked.pointerGestureYMovementScale;
-                clampPositionUsingPointerBounds(mPointerController,
-                        &mPointerGesture.referenceGestureX,
-                        &mPointerGesture.referenceGestureY);
-            }
+            mPointerGesture.referenceGestureX += commonDeltaX;
+            mPointerGesture.referenceGestureY += commonDeltaY;
         }
 
         // Report gestures.
@@ -4066,12 +4029,6 @@
             mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_Y,
                     mPointerGesture.referenceGestureY);
             mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, 1.0f);
-
-            mPointerController->setButtonState(BUTTON_STATE_PRIMARY);
-
-            if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
-                mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_PRESS;
-            }
         } else if (mPointerGesture.currentGestureMode == PointerGesture::SWIPE) {
             // SWIPE mode.
 #if DEBUG_GESTURES
@@ -4090,12 +4047,6 @@
             mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_Y,
                     mPointerGesture.referenceGestureY);
             mPointerGesture.currentGestureCoords[0].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, 1.0f);
-
-            mPointerController->setButtonState(0); // touch is not actually following the pointer
-
-            if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
-                mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_SWIPE;
-            }
         } else if (mPointerGesture.currentGestureMode == PointerGesture::FREEFORM) {
             // FREEFORM mode.
 #if DEBUG_GESTURES
@@ -4193,38 +4144,11 @@
                         "activeGestureId=%d", mPointerGesture.activeGestureId);
 #endif
             }
-
-            mPointerController->setButtonState(0); // touch is not actually following the pointer
-
-            if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
-                mPointerGesture.spotGesture = PointerControllerInterface::SPOT_GESTURE_FREEFORM;
-            }
-        }
-
-        // Update spot locations for PRESS, SWIPE and FREEFORM.
-        // We use the same calculation as we do to calculate the gesture pointers
-        // for FREEFORM so that the spots smoothly track gestures.
-        if (mParameters.gestureMode == Parameters::GESTURE_MODE_SPOTS) {
-            mPointerGesture.spotIdBits.clear();
-            for (uint32_t i = 0; i < mCurrentTouch.pointerCount; i++) {
-                uint32_t id = mCurrentTouch.pointers[i].id;
-                mPointerGesture.spotIdBits.markBit(id);
-                mPointerGesture.spotIdToIndex[id] = i;
-
-                float x = (mCurrentTouch.pointers[i].x - mPointerGesture.referenceTouchX)
-                        * mLocked.pointerGestureXZoomScale + mPointerGesture.referenceGestureX;
-                float y = (mCurrentTouch.pointers[i].y - mPointerGesture.referenceTouchY)
-                        * mLocked.pointerGestureYZoomScale + mPointerGesture.referenceGestureY;
-
-                mPointerGesture.spotCoords[i].clear();
-                mPointerGesture.spotCoords[i].setAxisValue(AMOTION_EVENT_AXIS_X, x);
-                mPointerGesture.spotCoords[i].setAxisValue(AMOTION_EVENT_AXIS_Y, y);
-                mPointerGesture.spotCoords[i].setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, 1.0f);
-            }
-            moveSpotsLocked();
         }
     }
 
+    mPointerController->setButtonState(mCurrentTouch.buttonState);
+
 #if DEBUG_GESTURES
     LOGD("Gestures: finishPreviousGesture=%s, cancelPreviousGesture=%s, "
             "currentGestureMode=%d, currentGestureIdBits=0x%08x, "
@@ -4256,11 +4180,6 @@
     return true;
 }
 
-void TouchInputMapper::moveSpotsLocked() {
-    mPointerController->setSpots(mPointerGesture.spotGesture,
-            mPointerGesture.spotCoords, mPointerGesture.spotIdToIndex, mPointerGesture.spotIdBits);
-}
-
 void TouchInputMapper::dispatchMotion(nsecs_t when, uint32_t policyFlags, uint32_t source,
         int32_t action, int32_t flags, uint32_t metaState, int32_t edgeFlags,
         const PointerCoords* coords, const uint32_t* idToIndex, BitSet32 idBits,
diff --git a/services/input/InputReader.h b/services/input/InputReader.h
index 0fbc93c..fa3239c 100644
--- a/services/input/InputReader.h
+++ b/services/input/InputReader.h
@@ -40,6 +40,117 @@
 
 
 /*
+ * Input reader configuration.
+ *
+ * Specifies various options that modify the behavior of the input reader.
+ */
+struct InputReaderConfiguration {
+    // Determines whether to turn on some hacks we have to improve the touch interaction with a
+    // certain device whose screen currently is not all that good.
+    bool filterTouchEvents;
+
+    // Determines whether to turn on some hacks to improve touch interaction with another device
+    // where touch coordinate data can get corrupted.
+    bool filterJumpyTouchEvents;
+
+    // Gets the amount of time to disable virtual keys after the screen is touched
+    // in order to filter out accidental virtual key presses due to swiping gestures
+    // or taps near the edge of the display.  May be 0 to disable the feature.
+    nsecs_t virtualKeyQuietTime;
+
+    // The excluded device names for the platform.
+    // Devices with these names will be ignored.
+    Vector<String8> excludedDeviceNames;
+
+    // Velocity control parameters for mouse pointer movements.
+    VelocityControlParameters pointerVelocityControlParameters;
+
+    // Velocity control parameters for mouse wheel movements.
+    VelocityControlParameters wheelVelocityControlParameters;
+
+    // Quiet time between certain pointer gesture transitions.
+    // Time to allow for all fingers or buttons to settle into a stable state before
+    // starting a new gesture.
+    nsecs_t pointerGestureQuietInterval;
+
+    // The minimum speed that a pointer must travel for us to consider switching the active
+    // touch pointer to it during a drag.  This threshold is set to avoid switching due
+    // to noise from a finger resting on the touch pad (perhaps just pressing it down).
+    float pointerGestureDragMinSwitchSpeed; // in pixels per second
+
+    // Tap gesture delay time.
+    // The time between down and up must be less than this to be considered a tap.
+    nsecs_t pointerGestureTapInterval;
+
+    // Tap drag gesture delay time.
+    // The time between the previous tap's up and the next down must be less than
+    // this to be considered a drag.  Otherwise, the previous tap is finished and a
+    // new tap begins.
+    //
+    // Note that the previous tap will be held down for this entire duration so this
+    // interval must be shorter than the long press timeout.
+    nsecs_t pointerGestureTapDragInterval;
+
+    // The distance in pixels that the pointer is allowed to move from initial down
+    // to up and still be called a tap.
+    float pointerGestureTapSlop; // in pixels
+
+    // Time after the first touch points go down to settle on an initial centroid.
+    // This is intended to be enough time to handle cases where the user puts down two
+    // fingers at almost but not quite exactly the same time.
+    nsecs_t pointerGestureMultitouchSettleInterval;
+
+    // The transition from PRESS to SWIPE or FREEFORM gesture mode is made when
+    // at least two pointers have moved at least this far from their starting place.
+    float pointerGestureMultitouchMinDistance; // in pixels
+
+    // The transition from PRESS to SWIPE gesture mode can only occur when the
+    // cosine of the angle between the two vectors is greater than or equal to than this value
+    // which indicates that the vectors are oriented in the same direction.
+    // When the vectors are oriented in the exactly same direction, the cosine is 1.0.
+    // (In exactly opposite directions, the cosine is -1.0.)
+    float pointerGestureSwipeTransitionAngleCosine;
+
+    // The transition from PRESS to SWIPE gesture mode can only occur when the
+    // fingers are no more than this far apart relative to the diagonal size of
+    // the touch pad.  For example, a ratio of 0.5 means that the fingers must be
+    // no more than half the diagonal size of the touch pad apart.
+    float pointerGestureSwipeMaxWidthRatio;
+
+    // The gesture movement speed factor relative to the size of the display.
+    // Movement speed applies when the fingers are moving in the same direction.
+    // Without acceleration, a full swipe of the touch pad diagonal in movement mode
+    // will cover this portion of the display diagonal.
+    float pointerGestureMovementSpeedRatio;
+
+    // The gesture zoom speed factor relative to the size of the display.
+    // Zoom speed applies when the fingers are mostly moving relative to each other
+    // to execute a scale gesture or similar.
+    // Without acceleration, a full swipe of the touch pad diagonal in zoom mode
+    // will cover this portion of the display diagonal.
+    float pointerGestureZoomSpeedRatio;
+
+    InputReaderConfiguration() :
+            filterTouchEvents(false),
+            filterJumpyTouchEvents(false),
+            virtualKeyQuietTime(0),
+            pointerVelocityControlParameters(1.0f, 500.0f, 3000.0f, 3.0f),
+            wheelVelocityControlParameters(1.0f, 15.0f, 50.0f, 4.0f),
+            pointerGestureQuietInterval(100 * 1000000LL), // 100 ms
+            pointerGestureDragMinSwitchSpeed(50), // 50 pixels per second
+            pointerGestureTapInterval(150 * 1000000LL), // 150 ms
+            pointerGestureTapDragInterval(150 * 1000000LL), // 150 ms
+            pointerGestureTapSlop(10.0f), // 10 pixels
+            pointerGestureMultitouchSettleInterval(100 * 1000000LL), // 100 ms
+            pointerGestureMultitouchMinDistance(15), // 15 pixels
+            pointerGestureSwipeTransitionAngleCosine(0.2588f), // cosine of 75 degrees
+            pointerGestureSwipeMaxWidthRatio(0.25f),
+            pointerGestureMovementSpeedRatio(0.8f),
+            pointerGestureZoomSpeedRatio(0.3f) { }
+};
+
+
+/*
  * Input reader policy interface.
  *
  * The input reader policy is used by the input reader to interact with the Window Manager
@@ -68,24 +179,8 @@
     virtual bool getDisplayInfo(int32_t displayId,
             int32_t* width, int32_t* height, int32_t* orientation) = 0;
 
-    /* Determines whether to turn on some hacks we have to improve the touch interaction with a
-     * certain device whose screen currently is not all that good.
-     */
-    virtual bool filterTouchEvents() = 0;
-
-    /* Determines whether to turn on some hacks to improve touch interaction with another device
-     * where touch coordinate data can get corrupted.
-     */
-    virtual bool filterJumpyTouchEvents() = 0;
-
-    /* Gets the amount of time to disable virtual keys after the screen is touched
-     * in order to filter out accidental virtual key presses due to swiping gestures
-     * or taps near the edge of the display.  May be 0 to disable the feature.
-     */
-    virtual nsecs_t getVirtualKeyQuietTime() = 0;
-
-    /* Gets the excluded device names for the platform. */
-    virtual void getExcludedDeviceNames(Vector<String8>& outExcludedDeviceNames) = 0;
+    /* Gets the input reader configuration. */
+    virtual void getReaderConfiguration(InputReaderConfiguration* outConfig) = 0;
 
     /* Gets a pointer controller associated with the specified cursor device (ie. a mouse). */
     virtual sp<PointerControllerInterface> obtainPointerController(int32_t deviceId) = 0;
@@ -139,6 +234,9 @@
     /* Determine whether physical keys exist for the given framework-domain key codes. */
     virtual bool hasKeys(int32_t deviceId, uint32_t sourceMask,
             size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags) = 0;
+
+    /* Reopens and reconfigures all input devices. */
+    virtual void refreshConfiguration() = 0;
 };
 
 
@@ -162,6 +260,7 @@
     virtual void requestTimeoutAtTime(nsecs_t when) = 0;
 
     virtual InputReaderPolicyInterface* getPolicy() = 0;
+    virtual const InputReaderConfiguration* getConfig() = 0;
     virtual InputDispatcherInterface* getDispatcher() = 0;
     virtual EventHubInterface* getEventHub() = 0;
 };
@@ -202,6 +301,8 @@
     virtual bool hasKeys(int32_t deviceId, uint32_t sourceMask,
             size_t numCodes, const int32_t* keyCodes, uint8_t* outFlags);
 
+    virtual void refreshConfiguration();
+
 protected:
     // These methods are protected virtual so they can be overridden and instrumented
     // by test cases.
@@ -212,7 +313,10 @@
     sp<InputReaderPolicyInterface> mPolicy;
     sp<InputDispatcherInterface> mDispatcher;
 
+    InputReaderConfiguration mConfig;
+
     virtual InputReaderPolicyInterface* getPolicy() { return mPolicy.get(); }
+    virtual const InputReaderConfiguration* getConfig() { return &mConfig; }
     virtual InputDispatcherInterface* getDispatcher() { return mDispatcher.get(); }
     virtual EventHubInterface* getEventHub() { return mEventHub.get(); }
 
@@ -240,18 +344,17 @@
     void timeoutExpired(nsecs_t when);
 
     void handleConfigurationChanged(nsecs_t when);
-    void configureExcludedDevices();
 
     // state management for all devices
     Mutex mStateLock;
 
-    int32_t mGlobalMetaState;
+    int32_t mGlobalMetaState; // guarded by mStateLock
     virtual void updateGlobalMetaState();
     virtual int32_t getGlobalMetaState();
 
     virtual void fadePointer();
 
-    InputConfiguration mInputConfiguration;
+    InputConfiguration mInputConfiguration; // guarded by mStateLock
     void updateInputConfiguration();
 
     nsecs_t mDisableVirtualKeysTimeout; // only accessed by reader thread
@@ -259,9 +362,12 @@
     virtual bool shouldDropVirtualKey(nsecs_t now,
             InputDevice* device, int32_t keyCode, int32_t scanCode);
 
-    nsecs_t mNextTimeout; // only accessed by reader thread
+    nsecs_t mNextTimeout; // only accessed by reader thread, not guarded
     virtual void requestTimeoutAtTime(nsecs_t when);
 
+    volatile int32_t mRefreshConfiguration; // atomic
+    void configure(bool firstTime);
+
     // state queries
     typedef int32_t (InputDevice::*GetStateFunc)(uint32_t sourceMask, int32_t code);
     int32_t getState(int32_t deviceId, uint32_t sourceMask, int32_t code,
@@ -353,6 +459,7 @@
     inline const String8 getDeviceName() { return mDevice->getName(); }
     inline InputReaderContext* getContext() { return mContext; }
     inline InputReaderPolicyInterface* getPolicy() { return mContext->getPolicy(); }
+    inline const InputReaderConfiguration* getConfig() { return mContext->getConfig(); }
     inline InputDispatcherInterface* getDispatcher() { return mContext->getDispatcher(); }
     inline EventHubInterface* getEventHub() { return mContext->getEventHub(); }
 
@@ -537,6 +644,12 @@
     float mVWheelScale;
     float mHWheelScale;
 
+    // Velocity controls for mouse pointer and wheel movements.
+    // The controls for X and Y wheel movements are separate to keep them decoupled.
+    VelocityControl mPointerVelocityControl;
+    VelocityControl mWheelXVelocityControl;
+    VelocityControl mWheelYVelocityControl;
+
     sp<PointerControllerInterface> mPointerController;
 
     struct LockedState {
@@ -665,6 +778,9 @@
     uint32_t mTouchSource; // sources when reporting touch data
     uint32_t mPointerSource; // sources when reporting pointer gestures
 
+    // The reader's configuration.
+    const InputReaderConfiguration* mConfig;
+
     // Immutable configuration parameters.
     struct Parameters {
         enum DeviceType {
@@ -680,7 +796,6 @@
         bool useBadTouchFilter;
         bool useJumpyTouchFilter;
         bool useAveragingTouchFilter;
-        nsecs_t virtualKeyQuietTime;
 
         enum GestureMode {
             GESTURE_MODE_POINTER,
@@ -939,6 +1054,8 @@
             // Exactly one finger dragging following a tap.
             // Pointer follows the active finger.
             // Emits DOWN, MOVE and UP events at the pointer location.
+            //
+            // Detect double-taps when the finger goes up while in TAP_DRAG mode.
             TAP_DRAG,
 
             // Button is pressed.
@@ -949,6 +1066,8 @@
             // Exactly one finger, button is not pressed.
             // Pointer follows the active finger.
             // Emits HOVER_MOVE events at the pointer location.
+            //
+            // Detect taps when the finger goes up while in HOVER mode.
             HOVER,
 
             // Exactly two fingers but neither have moved enough to clearly indicate
@@ -994,12 +1113,6 @@
         uint32_t lastGestureIdToIndex[MAX_POINTER_ID + 1];
         PointerCoords lastGestureCoords[MAX_POINTERS];
 
-        // Pointer coords and ids for the current spots.
-        PointerControllerInterface::SpotGesture spotGesture;
-        BitSet32 spotIdBits; // same set of ids as touch ids
-        uint32_t spotIdToIndex[MAX_POINTER_ID + 1];
-        PointerCoords spotCoords[MAX_POINTERS];
-
         // Time the pointer gesture last went down.
         nsecs_t downTime;
 
@@ -1035,6 +1148,9 @@
         // A velocity tracker for determining whether to switch active pointers during drags.
         VelocityTracker velocityTracker;
 
+        // Velocity control for pointer movements.
+        VelocityControl pointerVelocityControl;
+
         void reset() {
             firstTouchTime = LLONG_MIN;
             activeTouchId = -1;
@@ -1043,12 +1159,11 @@
             currentGestureIdBits.clear();
             lastGestureMode = NEUTRAL;
             lastGestureIdBits.clear();
-            spotGesture = PointerControllerInterface::SPOT_GESTURE_NEUTRAL;
-            spotIdBits.clear();
             downTime = 0;
             velocityTracker.clear();
             resetTap();
             resetQuietTime();
+            pointerVelocityControl.reset();
         }
 
         void resetTap() {
@@ -1069,7 +1184,6 @@
     void dispatchPointerGestures(nsecs_t when, uint32_t policyFlags, bool isTimeout);
     bool preparePointerGestures(nsecs_t when,
             bool* outCancelPreviousGesture, bool* outFinishPreviousGesture, bool isTimeout);
-    void moveSpotsLocked();
 
     // Dispatches a motion event.
     // If the changedId is >= 0 and the action is POINTER_DOWN or POINTER_UP, the
diff --git a/services/input/PointerController.cpp b/services/input/PointerController.cpp
index eecb76f..5e7713a 100644
--- a/services/input/PointerController.cpp
+++ b/services/input/PointerController.cpp
@@ -240,15 +240,15 @@
     }
 }
 
-void PointerController::setSpots(SpotGesture spotGesture,
-        const PointerCoords* spotCoords, const uint32_t* spotIdToIndex, BitSet32 spotIdBits) {
+void PointerController::setSpots(const PointerCoords* spotCoords,
+        const uint32_t* spotIdToIndex, BitSet32 spotIdBits) {
 #if DEBUG_POINTER_UPDATES
-    LOGD("setSpots: spotGesture=%d", spotGesture);
+    LOGD("setSpots: idBits=%08x", spotIdBits.value);
     for (BitSet32 idBits(spotIdBits); !idBits.isEmpty(); ) {
         uint32_t id = idBits.firstMarkedBit();
         idBits.clearBit(id);
         const PointerCoords& c = spotCoords[spotIdToIndex[id]];
-        LOGD("  spot %d: position=(%0.3f, %0.3f), pressure=%0.3f", id,
+        LOGD(" spot %d: position=(%0.3f, %0.3f), pressure=%0.3f", id,
                 c.getAxisValue(AMOTION_EVENT_AXIS_X),
                 c.getAxisValue(AMOTION_EVENT_AXIS_Y),
                 c.getAxisValue(AMOTION_EVENT_AXIS_PRESSURE));
diff --git a/services/input/PointerController.h b/services/input/PointerController.h
index d6e58c2..9879ec4 100644
--- a/services/input/PointerController.h
+++ b/services/input/PointerController.h
@@ -90,38 +90,6 @@
     /* Sets the mode of the pointer controller. */
     virtual void setPresentation(Presentation presentation) = 0;
 
-    // Describes the current gesture.
-    enum SpotGesture {
-        // No gesture.
-        // Do not display any spots.
-        SPOT_GESTURE_NEUTRAL,
-        // Tap at current location.
-        // Briefly display one spot at the tapped location.
-        SPOT_GESTURE_TAP,
-        // Drag at current location.
-        // Display spot at pressed location.
-        SPOT_GESTURE_DRAG,
-        // Button pressed but no finger is down.
-        // Display spot at pressed location.
-        SPOT_GESTURE_BUTTON_CLICK,
-        // Button pressed and a finger is down.
-        // Display spot at pressed location.
-        SPOT_GESTURE_BUTTON_DRAG,
-        // One finger down and hovering.
-        // Display spot at the hovered location.
-        SPOT_GESTURE_HOVER,
-        // Two fingers down but not sure in which direction they are moving so we consider
-        // it a press at the pointer location.
-        // Display two spots near the pointer location.
-        SPOT_GESTURE_PRESS,
-        // Two fingers down and moving in same direction.
-        // Display two spots near the pointer location.
-        SPOT_GESTURE_SWIPE,
-        // Two or more fingers down and moving in arbitrary directions.
-        // Display two or more spots near the pointer location, one for each finger.
-        SPOT_GESTURE_FREEFORM,
-    };
-
     /* Sets the spots for the current gesture.
      * The spots are not subject to the inactivity timeout like the pointer
      * itself it since they are expected to remain visible for so long as
@@ -131,8 +99,7 @@
      * For spotCoords, pressure != 0 indicates that the spot's location is being
      * pressed (not hovering).
      */
-    virtual void setSpots(SpotGesture spotGesture,
-            const PointerCoords* spotCoords, const uint32_t* spotIdToIndex,
+    virtual void setSpots(const PointerCoords* spotCoords, const uint32_t* spotIdToIndex,
             BitSet32 spotIdBits) = 0;
 
     /* Removes all spots. */
@@ -198,8 +165,8 @@
     virtual void unfade(Transition transition);
 
     virtual void setPresentation(Presentation presentation);
-    virtual void setSpots(SpotGesture spotGesture,
-            const PointerCoords* spotCoords, const uint32_t* spotIdToIndex, BitSet32 spotIdBits);
+    virtual void setSpots(const PointerCoords* spotCoords,
+            const uint32_t* spotIdToIndex, BitSet32 spotIdBits);
     virtual void clearSpots();
 
     void setDisplaySize(int32_t width, int32_t height);
diff --git a/services/input/tests/InputDispatcher_test.cpp b/services/input/tests/InputDispatcher_test.cpp
index 2f846c4..0a29bc6 100644
--- a/services/input/tests/InputDispatcher_test.cpp
+++ b/services/input/tests/InputDispatcher_test.cpp
@@ -35,6 +35,8 @@
 // --- FakeInputDispatcherPolicy ---
 
 class FakeInputDispatcherPolicy : public InputDispatcherPolicyInterface {
+    InputDispatcherConfiguration mConfig;
+
 protected:
     virtual ~FakeInputDispatcherPolicy() {
     }
@@ -55,16 +57,12 @@
     virtual void notifyInputChannelBroken(const sp<InputWindowHandle>& inputWindowHandle) {
     }
 
-    virtual nsecs_t getKeyRepeatTimeout() {
-        return 500 * 1000000LL;
+    virtual void getDispatcherConfiguration(InputDispatcherConfiguration* outConfig) {
+        *outConfig = mConfig;
     }
 
-    virtual nsecs_t getKeyRepeatDelay() {
-        return 50 * 1000000LL;
-    }
-
-    virtual int32_t getMaxEventsPerSecond() {
-        return 60;
+    virtual bool isKeyRepeatEnabled() {
+        return true;
     }
 
     virtual void interceptKeyBeforeQueueing(const KeyEvent* keyEvent, uint32_t& policyFlags) {
diff --git a/services/input/tests/InputReader_test.cpp b/services/input/tests/InputReader_test.cpp
index 8b3e731..aef9fd8 100644
--- a/services/input/tests/InputReader_test.cpp
+++ b/services/input/tests/InputReader_test.cpp
@@ -101,8 +101,8 @@
     virtual void setPresentation(Presentation presentation) {
     }
 
-    virtual void setSpots(SpotGesture spotGesture,
-            const PointerCoords* spotCoords, const uint32_t* spotIdToIndex, BitSet32 spotIdBits) {
+    virtual void setSpots(const PointerCoords* spotCoords,
+            const uint32_t* spotIdToIndex, BitSet32 spotIdBits) {
     }
 
     virtual void clearSpots() {
@@ -120,17 +120,14 @@
     };
 
     KeyedVector<int32_t, DisplayInfo> mDisplayInfos;
-    bool mFilterTouchEvents;
-    bool mFilterJumpyTouchEvents;
-    Vector<String8> mExcludedDeviceNames;
+    InputReaderConfiguration mConfig;
     KeyedVector<int32_t, sp<FakePointerController> > mPointerControllers;
 
 protected:
     virtual ~FakeInputReaderPolicy() { }
 
 public:
-    FakeInputReaderPolicy() :
-            mFilterTouchEvents(false), mFilterJumpyTouchEvents(false) {
+    FakeInputReaderPolicy() {
     }
 
     void removeDisplayInfo(int32_t displayId) {
@@ -148,11 +145,11 @@
     }
 
     void setFilterTouchEvents(bool enabled) {
-        mFilterTouchEvents = enabled;
+        mConfig.filterTouchEvents = enabled;
     }
 
     void setFilterJumpyTouchEvents(bool enabled) {
-        mFilterJumpyTouchEvents = enabled;
+        mConfig.filterJumpyTouchEvents = enabled;
     }
 
     virtual nsecs_t getVirtualKeyQuietTime() {
@@ -160,7 +157,7 @@
     }
 
     void addExcludedDeviceName(const String8& deviceName) {
-        mExcludedDeviceNames.push(deviceName);
+        mConfig.excludedDeviceNames.push(deviceName);
     }
 
     void setPointerController(int32_t deviceId, const sp<FakePointerController>& controller) {
@@ -187,16 +184,8 @@
         return false;
     }
 
-    virtual bool filterTouchEvents() {
-        return mFilterTouchEvents;
-    }
-
-    virtual bool filterJumpyTouchEvents() {
-        return mFilterJumpyTouchEvents;
-    }
-
-    virtual void getExcludedDeviceNames(Vector<String8>& outExcludedDeviceNames) {
-        outExcludedDeviceNames.appendVector(mExcludedDeviceNames);
+    virtual void getReaderConfiguration(InputReaderConfiguration* outConfig) {
+        *outConfig = mConfig;
     }
 
     virtual sp<PointerControllerInterface> obtainPointerController(int32_t deviceId) {
@@ -628,8 +617,8 @@
         return NAME_NOT_FOUND;
     }
 
-    virtual void addExcludedDevice(const char* deviceName) {
-        mExcludedDevices.add(String8(deviceName));
+    virtual void setExcludedDevices(const Vector<String8>& devices) {
+        mExcludedDevices = devices;
     }
 
     virtual size_t getEvents(int timeoutMillis, RawEvent* buffer, size_t bufferSize) {
@@ -727,6 +716,9 @@
 
     virtual void dump(String8& dump) {
     }
+
+    virtual void reopenDevices() {
+    }
 };
 
 
@@ -739,6 +731,8 @@
     int32_t mGlobalMetaState;
     bool mUpdateGlobalMetaStateWasCalled;
 
+    InputReaderConfiguration mConfig;
+
 public:
     FakeInputReaderContext(const sp<EventHubInterface>& eventHub,
             const sp<InputReaderPolicyInterface>& policy,
@@ -776,6 +770,11 @@
         return mPolicy.get();
     }
 
+    virtual const InputReaderConfiguration* getConfig() {
+        mPolicy->getReaderConfiguration(&mConfig);
+        return &mConfig;
+    }
+
     virtual InputDispatcherInterface* getDispatcher() {
         return mDispatcher.get();
     }
diff --git a/services/java/com/android/server/AppWidgetService.java b/services/java/com/android/server/AppWidgetService.java
index a4a95a0..65f8b34 100644
--- a/services/java/com/android/server/AppWidgetService.java
+++ b/services/java/com/android/server/AppWidgetService.java
@@ -29,6 +29,7 @@
 import java.util.List;
 import java.util.Locale;
 
+import org.apache.commons.logging.impl.SimpleLog;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 import org.xmlpull.v1.XmlSerializer;
diff --git a/services/java/com/android/server/DevicePolicyManagerService.java b/services/java/com/android/server/DevicePolicyManagerService.java
index 3bd8215..3181a9d 100644
--- a/services/java/com/android/server/DevicePolicyManagerService.java
+++ b/services/java/com/android/server/DevicePolicyManagerService.java
@@ -1925,9 +1925,8 @@
             // Check for permissions if a particular caller is specified
             if (who != null) {
                 // When checking for a single caller, status is based on caller's request
-                ActiveAdmin ap = getActiveAdminForCallerLocked(who,
-                        DeviceAdminInfo.USES_ENCRYPTED_STORAGE);
-                return ap.encryptionRequested;
+                ActiveAdmin ap = getActiveAdminUncheckedLocked(who);
+                return ap != null ? ap.encryptionRequested : false;
             }
 
             // If no particular caller is specified, return the aggregate set of requests.
diff --git a/services/java/com/android/server/StatusBarManagerService.java b/services/java/com/android/server/StatusBarManagerService.java
index 8df8177..568a5e3 100644
--- a/services/java/com/android/server/StatusBarManagerService.java
+++ b/services/java/com/android/server/StatusBarManagerService.java
@@ -16,21 +16,16 @@
 
 package com.android.server;
 
-import android.app.PendingIntent;
 import android.app.StatusBarManager;
 import android.content.BroadcastReceiver;
-import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
-import android.content.IntentFilter;
 import android.content.pm.PackageManager;
 import android.content.res.Resources;
-import android.net.Uri;
 import android.os.IBinder;
 import android.os.RemoteException;
 import android.os.Binder;
 import android.os.Handler;
-import android.os.SystemClock;
 import android.util.Slog;
 import android.view.View;
 
@@ -248,25 +243,23 @@
      * Hide or show the on-screen Menu key. Only call this from the window manager, typically in
      * response to a window with FLAG_NEEDS_MENU_KEY set.
      */
-    public void setMenuKeyVisible(final boolean visible) {
+    public void topAppWindowChanged(final boolean menuVisible) {
         enforceStatusBar();
 
-        if (SPEW) Slog.d(TAG, (visible?"showing":"hiding") + " MENU key");
+        if (SPEW) Slog.d(TAG, (menuVisible?"showing":"hiding") + " MENU key");
 
         synchronized(mLock) {
-            if (mMenuVisible != visible) {
-                mMenuVisible = visible;
-                mHandler.post(new Runnable() {
-                        public void run() {
-                            if (mBar != null) {
-                                try {
-                                    mBar.setMenuKeyVisible(visible);
-                                } catch (RemoteException ex) {
-                                }
+            mMenuVisible = menuVisible;
+            mHandler.post(new Runnable() {
+                    public void run() {
+                        if (mBar != null) {
+                            try {
+                                mBar.topAppWindowChanged(menuVisible);
+                            } catch (RemoteException ex) {
                             }
                         }
-                    });
-            }
+                    }
+                });
         }
     }
 
diff --git a/services/java/com/android/server/WifiService.java b/services/java/com/android/server/WifiService.java
index 6acc32f..6e88490 100644
--- a/services/java/com/android/server/WifiService.java
+++ b/services/java/com/android/server/WifiService.java
@@ -84,7 +84,7 @@
 
 public class WifiService extends IWifiManager.Stub {
     private static final String TAG = "WifiService";
-    private static final boolean DBG = true;
+    private static final boolean DBG = false;
 
     private final WifiStateMachine mWifiStateMachine;
 
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 65b3258..01bd7a9 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -90,7 +90,6 @@
 import android.os.FileUtils;
 import android.os.Handler;
 import android.os.IBinder;
-import android.os.IInterface;
 import android.os.IPermissionController;
 import android.os.Looper;
 import android.os.Message;
@@ -1287,7 +1286,7 @@
                         mCompatModeDialog.dismiss();
                         mCompatModeDialog = null;
                     }
-                    if (ar != null) {
+                    if (ar != null && false) {
                         if (mCompatModePackages.getPackageAskCompatModeLocked(
                                 ar.packageName)) {
                             int mode = mCompatModePackages.computeCompatModeLocked(
@@ -3642,12 +3641,12 @@
                     + processName + " with config " + mConfiguration);
             ApplicationInfo appInfo = app.instrumentationInfo != null
                     ? app.instrumentationInfo : app.info;
+            app.compat = compatibilityInfoForPackageLocked(appInfo);
             thread.bindApplication(processName, appInfo, providers,
                     app.instrumentationClass, app.instrumentationProfileFile,
                     app.instrumentationArguments, app.instrumentationWatcher, testMode, 
                     isRestrictedBackupMode || !normalMode,
-                    mConfiguration, compatibilityInfoForPackageLocked(appInfo),
-                    getCommonServicesLocked(),
+                    mConfiguration, app.compat, getCommonServicesLocked(),
                     mCoreSettingsObserver.getCoreSettingsLocked());
             updateLruProcessLocked(app, false, true);
             app.lastRequestedGc = app.lastLowMemory = SystemClock.uptimeMillis();
@@ -7537,7 +7536,8 @@
                 pw.println("  COMP_SPEC may also be a component name (com.foo/.myApp),");
                 pw.println("    a partial substring in a component name, an");
                 pw.println("    ActivityRecord hex object identifier, or");
-                pw.println("    \"all\" for all objects");
+                pw.println("    \"all\" for all objects, or");
+                pw.println("    \"top\" for the top activity.");
                 pw.println("  -a: include all available server state.");
                 pw.println("  -c: include client state.");
                 return;
@@ -8091,6 +8091,13 @@
                     activities.add(r1);
                 }
             }
+        } else if ("top".equals(name)) {
+            synchronized (this) {
+                final int N = mMainStack.mHistory.size();
+                if (N > 0) {
+                    activities.add((ActivityRecord)mMainStack.mHistory.get(N-1));
+                }
+            }
         } else {
             ComponentName componentName = ComponentName.unflattenFromString(name);
             int objectId = 0;
@@ -10977,13 +10984,11 @@
         // Special case for adding a package: by default turn on compatibility
         // mode.
         } else if (Intent.ACTION_PACKAGE_ADDED.equals(intent.getAction())) {
-            if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
-                Uri data = intent.getData();
-                String ssp;
-                if (data != null && (ssp=data.getSchemeSpecificPart()) != null) {
-                    mCompatModePackages.setPackageScreenCompatModeLocked(ssp,
-                            ActivityManager.COMPAT_MODE_ENABLED);
-                }
+            Uri data = intent.getData();
+            String ssp;
+            if (data != null && (ssp=data.getSchemeSpecificPart()) != null) {
+                mCompatModePackages.handlePackageAddedLocked(ssp,
+                        intent.getBooleanExtra(Intent.EXTRA_REPLACING, false));
             }
         }
 
@@ -12219,6 +12224,15 @@
                     ac.updateConfiguration(mConfiguration);
                 }
 
+                // Make sure all resources in our process are updated
+                // right now, so that anyone who is going to retrieve
+                // resource values after we return will be sure to get
+                // the new ones.  This is especially important during
+                // boot, where the first config change needs to guarantee
+                // all resources have that config before following boot
+                // code is executed.
+                mSystemThread.applyConfigurationToResources(newConfig);
+
                 if (Settings.System.hasInterestingConfigurationChanges(changes)) {
                     Message msg = mHandler.obtainMessage(UPDATE_CONFIGURATION_MSG);
                     msg.obj = new Configuration(mConfiguration);
diff --git a/services/java/com/android/server/am/ActivityRecord.java b/services/java/com/android/server/am/ActivityRecord.java
index d27cbda..33c12f4 100644
--- a/services/java/com/android/server/am/ActivityRecord.java
+++ b/services/java/com/android/server/am/ActivityRecord.java
@@ -24,6 +24,7 @@
 import android.content.Intent;
 import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
+import android.content.res.CompatibilityInfo;
 import android.content.res.Configuration;
 import android.graphics.Bitmap;
 import android.os.Build;
@@ -78,6 +79,7 @@
     long startTime;         // last time this activity was started
     long cpuTimeAtResume;   // the cpu time of host process at the time of resuming activity
     Configuration configuration; // configuration activity was last running in
+    CompatibilityInfo compat;// last used compatibility mode
     ActivityRecord resultTo; // who started this entry, so will get our reply
     final String resultWho; // additional identifier for use by resultTo.
     final int requestCode;  // code given by requester (resultTo)
@@ -137,6 +139,7 @@
                 pw.print(" componentSpecified="); pw.print(componentSpecified);
                 pw.print(" isHomeActivity="); pw.println(isHomeActivity);
         pw.print(prefix); pw.print("config="); pw.println(configuration);
+        pw.print(prefix); pw.print("compat="); pw.println(compat);
         if (resultTo != null || resultWho != null) {
             pw.print(prefix); pw.print("resultTo="); pw.print(resultTo);
                     pw.print(" resultWho="); pw.print(resultWho);
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index a704f88..5cbb9e1 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -546,10 +546,10 @@
             r.sleeping = false;
             r.forceNewConfig = false;
             showAskCompatModeDialogLocked(r);
+            r.compat = mService.compatibilityInfoForPackageLocked(r.info.applicationInfo);
             app.thread.scheduleLaunchActivity(new Intent(r.intent), r,
                     System.identityHashCode(r),
-                    r.info, mService.compatibilityInfoForPackageLocked(r.info.applicationInfo),
-                    r.icicle, results, newIntents, !andResume,
+                    r.info, r.compat, r.icicle, results, newIntents, !andResume,
                     mService.isNextTransitionForward());
             
             if ((app.info.flags&ApplicationInfo.FLAG_CANT_SAVE_STATE) != 0) {
@@ -1455,6 +1455,8 @@
                     if (SHOW_APP_STARTING_PREVIEW && mMainStack) {
                         mService.mWindowManager.setAppStartingWindow(
                                 next, next.packageName, next.theme,
+                                mService.compatibilityInfoForPackageLocked(
+                                        next.info.applicationInfo),
                                 next.nonLocalizedLabel,
                                 next.labelRes, next.icon, next.windowFlags,
                                 null, true);
@@ -1491,6 +1493,8 @@
                 if (SHOW_APP_STARTING_PREVIEW) {
                     mService.mWindowManager.setAppStartingWindow(
                             next, next.packageName, next.theme,
+                            mService.compatibilityInfoForPackageLocked(
+                                    next.info.applicationInfo),
                             next.nonLocalizedLabel,
                             next.labelRes, next.icon, next.windowFlags,
                             null, true);
@@ -1617,7 +1621,9 @@
                     else if (prev.nowVisible) prev = null;
                 }
                 mService.mWindowManager.setAppStartingWindow(
-                        r, r.packageName, r.theme, r.nonLocalizedLabel,
+                        r, r.packageName, r.theme,
+                        mService.compatibilityInfoForPackageLocked(
+                                r.info.applicationInfo), r.nonLocalizedLabel,
                         r.labelRes, r.icon, r.windowFlags, prev, showStartingIcon);
             }
         } else {
@@ -3795,10 +3801,10 @@
         if (DEBUG_SWITCH || DEBUG_CONFIGURATION) {
             Slog.v(TAG, "Checking to restart " + r.info.name + ": changed=0x"
                     + Integer.toHexString(changes) + ", handles=0x"
-                    + Integer.toHexString(r.info.configChanges)
+                    + Integer.toHexString(r.info.getRealConfigChanged())
                     + ", newConfig=" + newConfig);
         }
-        if ((changes&(~r.info.configChanges)) != 0 || r.forceNewConfig) {
+        if ((changes&(~r.info.getRealConfigChanged())) != 0 || r.forceNewConfig) {
             // Aha, the activity isn't handling the change, so DIE DIE DIE.
             r.configChangeFlags |= changes;
             r.startFreezingScreenLocked(r.app, globalChanges);
diff --git a/services/java/com/android/server/am/CompatModePackages.java b/services/java/com/android/server/am/CompatModePackages.java
index 221b59b..f6564862 100644
--- a/services/java/com/android/server/am/CompatModePackages.java
+++ b/services/java/com/android/server/am/CompatModePackages.java
@@ -17,6 +17,7 @@
 
 import android.app.ActivityManager;
 import android.app.AppGlobals;
+import android.content.pm.ActivityInfo;
 import android.content.pm.ApplicationInfo;
 import android.content.pm.IPackageManager;
 import android.content.res.CompatibilityInfo;
@@ -117,10 +118,37 @@
         return flags != null ? flags : 0;
     }
 
+    public void handlePackageAddedLocked(String packageName, boolean updated) {
+        ApplicationInfo ai = null;
+        try {
+            ai = AppGlobals.getPackageManager().getApplicationInfo(packageName, 0);
+        } catch (RemoteException e) {
+        }
+        if (ai == null) {
+            return;
+        }
+        CompatibilityInfo ci = compatibilityInfoForPackageLocked(ai);
+        final boolean mayCompat = !ci.alwaysSupportsScreen()
+                && !ci.neverSupportsScreen();
+
+        if (updated) {
+            // Update -- if the app no longer can run in compat mode, clear
+            // any current settings for it.
+            if (!mayCompat && mPackages.containsKey(packageName)) {
+                mPackages.remove(packageName);
+                mHandler.removeMessages(MSG_WRITE);
+                Message msg = mHandler.obtainMessage(MSG_WRITE);
+                mHandler.sendMessageDelayed(msg, 10000);
+            }
+        }
+    }
+
     public CompatibilityInfo compatibilityInfoForPackageLocked(ApplicationInfo ai) {
-        return new CompatibilityInfo(ai, mService.mConfiguration.screenLayout,
+        CompatibilityInfo ci = new CompatibilityInfo(ai, mService.mConfiguration.screenLayout,
                 mService.mConfiguration.smallestScreenWidthDp,
                 (getPackageFlags(ai.packageName)&COMPAT_FLAG_ENABLED) != 0);
+        //Slog.i(TAG, "*********** COMPAT FOR PKG " + ai.packageName + ": " + ci);
+        return ci;
     }
 
     public int computeCompatModeLocked(ApplicationInfo ai) {
@@ -242,28 +270,47 @@
             newFlags &= ~COMPAT_FLAG_ENABLED;
         }
 
+        CompatibilityInfo ci = compatibilityInfoForPackageLocked(ai);
+        if (ci.alwaysSupportsScreen()) {
+            Slog.w(TAG, "Ignoring compat mode change of " + packageName
+                    + "; compatibility never needed");
+            newFlags = 0;
+        }
+        if (ci.neverSupportsScreen()) {
+            Slog.w(TAG, "Ignoring compat mode change of " + packageName
+                    + "; compatibility always needed");
+            newFlags = 0;
+        }
+
         if (newFlags != curFlags) {
             if (newFlags != 0) {
                 mPackages.put(packageName, newFlags);
             } else {
                 mPackages.remove(packageName);
             }
-            CompatibilityInfo ci = compatibilityInfoForPackageLocked(ai);
-            if (ci.alwaysSupportsScreen()) {
-                Slog.w(TAG, "Ignoring compat mode change of " + packageName
-                        + "; compatibility never needed");
-                return;
-            }
-            if (ci.neverSupportsScreen()) {
-                Slog.w(TAG, "Ignoring compat mode change of " + packageName
-                        + "; compatibility always needed");
-                return;
-            }
+
+            // Need to get compatibility info in new state.
+            ci = compatibilityInfoForPackageLocked(ai);
 
             mHandler.removeMessages(MSG_WRITE);
             Message msg = mHandler.obtainMessage(MSG_WRITE);
             mHandler.sendMessageDelayed(msg, 10000);
 
+            ActivityRecord starting = mService.mMainStack.topRunningActivityLocked(null);
+
+            // All activities that came from the package must be
+            // restarted as if there was a config change.
+            for (int i=mService.mMainStack.mHistory.size()-1; i>=0; i--) {
+                ActivityRecord a = (ActivityRecord)mService.mMainStack.mHistory.get(i);
+                if (a.info.packageName.equals(packageName)) {
+                    a.forceNewConfig = true;
+                    if (starting != null && a == starting && a.visible) {
+                        a.startFreezingScreenLocked(starting.app,
+                                ActivityInfo.CONFIG_SCREEN_LAYOUT);
+                    }
+                }
+            }
+
             // Tell all processes that loaded this package about the change.
             for (int i=mService.mLruProcesses.size()-1; i>=0; i--) {
                 ProcessRecord app = mService.mLruProcesses.get(i);
@@ -280,16 +327,6 @@
                 }
             }
 
-            // All activities that came from the packge must be
-            // restarted as if there was a config change.
-            for (int i=mService.mMainStack.mHistory.size()-1; i>=0; i--) {
-                ActivityRecord a = (ActivityRecord)mService.mMainStack.mHistory.get(i);
-                if (a.info.packageName.equals(packageName)) {
-                    a.forceNewConfig = true;
-                }
-            }
-
-            ActivityRecord starting = mService.mMainStack.topRunningActivityLocked(null);
             if (starting != null) {
                 mService.mMainStack.ensureActivityConfigurationLocked(starting, 0);
                 // And we need to make sure at this point that all other activities
diff --git a/services/java/com/android/server/am/ProcessRecord.java b/services/java/com/android/server/am/ProcessRecord.java
index a63ffae..5465e37 100644
--- a/services/java/com/android/server/am/ProcessRecord.java
+++ b/services/java/com/android/server/am/ProcessRecord.java
@@ -69,6 +69,7 @@
     IBinder forcingToForeground;// Token that is forcing this process to be foreground
     int adjSeq;                 // Sequence id for identifying oom_adj assignment cycles
     int lruSeq;                 // Sequence id for identifying LRU update cycles
+    CompatibilityInfo compat;   // last used compatibility mode
     ComponentName instrumentationClass;// class installed to instrument app
     ApplicationInfo instrumentationInfo; // the application being instrumented
     String instrumentationProfileFile; // where to save profiling
@@ -145,6 +146,7 @@
                 pw.print(" publicDir="); pw.print(info.publicSourceDir);
                 pw.print(" data="); pw.println(info.dataDir);
         pw.print(prefix); pw.print("packageList="); pw.println(pkgList);
+        pw.print(prefix); pw.print("compat="); pw.println(compat);
         if (instrumentationClass != null || instrumentationProfileFile != null
                 || instrumentationArguments != null) {
             pw.print(prefix); pw.print("instrumentationClass=");
diff --git a/services/java/com/android/server/wm/BlackFrame.java b/services/java/com/android/server/wm/BlackFrame.java
index f9f5758..d8fd7fe 100644
--- a/services/java/com/android/server/wm/BlackFrame.java
+++ b/services/java/com/android/server/wm/BlackFrame.java
@@ -38,6 +38,9 @@
             top = t;
             surface = new Surface(session, 0, "BlackSurface",
                     -1, w, h, PixelFormat.OPAQUE, Surface.FX_SURFACE_DIM);
+            if (WindowManagerService.SHOW_TRANSACTIONS ||
+                    WindowManagerService.SHOW_SURFACE_ALLOC) Slog.i(WindowManagerService.TAG,
+                            "  BLACK " + surface + ": CREATE layer=" + layer);
             surface.setAlpha(1.0f);
             surface.setLayer(layer);
         }
@@ -104,6 +107,10 @@
         if (mBlackSurfaces != null) {
             for (int i=0; i<mBlackSurfaces.length; i++) {
                 if (mBlackSurfaces[i] != null) {
+                    if (WindowManagerService.SHOW_TRANSACTIONS ||
+                            WindowManagerService.SHOW_SURFACE_ALLOC) Slog.i(
+                                    WindowManagerService.TAG,
+                                    "  BLACK " + mBlackSurfaces[i].surface + ": DESTROY");
                     mBlackSurfaces[i].surface.destroy();
                     mBlackSurfaces[i] = null;
                 }
diff --git a/services/java/com/android/server/wm/DimAnimator.java b/services/java/com/android/server/wm/DimAnimator.java
index a266d70..a3293e8 100644
--- a/services/java/com/android/server/wm/DimAnimator.java
+++ b/services/java/com/android/server/wm/DimAnimator.java
@@ -41,8 +41,9 @@
 
     DimAnimator (SurfaceSession session) {
         if (mDimSurface == null) {
-            if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG, "  DIM "
-                    + mDimSurface + ": CREATE");
+            if (WindowManagerService.SHOW_TRANSACTIONS ||
+                    WindowManagerService.SHOW_SURFACE_ALLOC) Slog.i(WindowManagerService.TAG,
+                            "  DIM " + mDimSurface + ": CREATE");
             try {
                 mDimSurface = new Surface(session, 0,
                         "DimAnimator",
diff --git a/services/java/com/android/server/wm/DimSurface.java b/services/java/com/android/server/wm/DimSurface.java
index 220c7fb..d7bb8b3 100644
--- a/services/java/com/android/server/wm/DimSurface.java
+++ b/services/java/com/android/server/wm/DimSurface.java
@@ -32,8 +32,9 @@
 
     DimSurface(SurfaceSession session) {
         if (mDimSurface == null) {
-            if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG, "  DIM "
-                    + mDimSurface + ": CREATE");
+            if (WindowManagerService.SHOW_TRANSACTIONS ||
+                    WindowManagerService.SHOW_SURFACE_ALLOC) Slog.i(WindowManagerService.TAG,
+                            "  DIM " + mDimSurface + ": CREATE");
             try {
                 mDimSurface = new Surface(session, 0,
                         "DimSurface",
diff --git a/services/java/com/android/server/wm/InputManager.java b/services/java/com/android/server/wm/InputManager.java
index becd44a..3b01217 100644
--- a/services/java/com/android/server/wm/InputManager.java
+++ b/services/java/com/android/server/wm/InputManager.java
@@ -23,10 +23,14 @@
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.content.res.Configuration;
+import android.database.ContentObserver;
 import android.os.Environment;
+import android.os.Handler;
 import android.os.Looper;
 import android.os.MessageQueue;
 import android.os.SystemProperties;
+import android.provider.Settings;
+import android.provider.Settings.SettingNotFoundException;
 import android.util.Slog;
 import android.util.Xml;
 import android.view.InputChannel;
@@ -56,7 +60,7 @@
     private final Callbacks mCallbacks;
     private final Context mContext;
     private final WindowManagerService mWindowManagerService;
-    
+
     private static native void nativeInit(Context context,
             Callbacks callbacks, MessageQueue messageQueue);
     private static native void nativeStart();
@@ -85,6 +89,7 @@
     private static native int[] nativeGetInputDeviceIds();
     private static native boolean nativeTransferTouchFocus(InputChannel fromChannel,
             InputChannel toChannel);
+    private static native void nativeSetPointerSpeed(int speed);
     private static native String nativeDump();
     
     // Input event injection constants defined in InputDispatcher.h.
@@ -123,10 +128,13 @@
         Slog.i(TAG, "Initializing input manager");
         nativeInit(mContext, mCallbacks, looper.getQueue());
     }
-    
+
     public void start() {
         Slog.i(TAG, "Starting input manager");
         nativeStart();
+
+        registerPointerSpeedSettingObserver();
+        updatePointerSpeedFromSettings();
     }
     
     public void setDisplaySize(int displayId, int width, int height) {
@@ -359,6 +367,42 @@
         return nativeTransferTouchFocus(fromChannel, toChannel);
     }
 
+    /**
+     * Set the pointer speed.
+     * @param speed The pointer speed as a value between -7 (slowest) and 7 (fastest)
+     * where 0 is the default speed.
+     */
+    public void setPointerSpeed(int speed) {
+        speed = Math.min(Math.max(speed, -7), 7);
+        nativeSetPointerSpeed(speed);
+    }
+
+    public void updatePointerSpeedFromSettings() {
+        int speed = getPointerSpeedSetting(0);
+        setPointerSpeed(speed);
+    }
+
+    private void registerPointerSpeedSettingObserver() {
+        mContext.getContentResolver().registerContentObserver(
+                Settings.System.getUriFor(Settings.System.POINTER_SPEED), true,
+                new ContentObserver(mWindowManagerService.mH) {
+                    @Override
+                    public void onChange(boolean selfChange) {
+                        updatePointerSpeedFromSettings();
+                    }
+                });
+    }
+
+    private int getPointerSpeedSetting(int defaultValue) {
+        int speed = defaultValue;
+        try {
+            speed = Settings.System.getInt(mContext.getContentResolver(),
+                    Settings.System.POINTER_SPEED);
+        } catch (SettingNotFoundException snfe) {
+        }
+        return speed;
+    }
+
     public void dump(PrintWriter pw) {
         String dumpStr = nativeDump();
         if (dumpStr != null) {
@@ -496,6 +540,26 @@
         }
 
         @SuppressWarnings("unused")
+        public int getHoverTapTimeout() {
+            return ViewConfiguration.getHoverTapTimeout();
+        }
+
+        @SuppressWarnings("unused")
+        public int getHoverTapSlop() {
+            return ViewConfiguration.getHoverTapSlop();
+        }
+
+        @SuppressWarnings("unused")
+        public int getDoubleTapTimeout() {
+            return ViewConfiguration.getDoubleTapTimeout();
+        }
+
+        @SuppressWarnings("unused")
+        public int getLongPressTimeout() {
+            return ViewConfiguration.getLongPressTimeout();
+        }
+
+        @SuppressWarnings("unused")
         public int getMaxEventsPerSecond() {
             int result = 0;
             try {
diff --git a/services/java/com/android/server/wm/ScreenRotationAnimation.java b/services/java/com/android/server/wm/ScreenRotationAnimation.java
index bb01633..8470918 100644
--- a/services/java/com/android/server/wm/ScreenRotationAnimation.java
+++ b/services/java/com/android/server/wm/ScreenRotationAnimation.java
@@ -69,7 +69,7 @@
         mContext = context;
         mDisplay = display;
 
-        display.getMetrics(mDisplayMetrics);
+        display.getRealMetrics(mDisplayMetrics);
 
         Bitmap screenshot = Surface.screenshot(0, 0);
 
@@ -102,6 +102,10 @@
                 Slog.w(TAG, "Unable to allocate freeze surface", e);
             }
 
+            if (WindowManagerService.SHOW_TRANSACTIONS ||
+                    WindowManagerService.SHOW_SURFACE_ALLOC) Slog.i(WindowManagerService.TAG,
+                            "  FREEZE " + mSurface + ": CREATE");
+
             setRotation(display.getRotation());
 
             if (mSurface != null) {
@@ -244,7 +248,7 @@
                 break;
         }
 
-        mDisplay.getMetrics(mDisplayMetrics);
+        mDisplay.getRealMetrics(mDisplayMetrics);
 
         // Initialize the animations.  This is a hack, redefining what "parent"
         // means to allow supplying the last and next size.  In this definition
@@ -284,6 +288,9 @@
 
     public void kill() {
         if (mSurface != null) {
+            if (WindowManagerService.SHOW_TRANSACTIONS ||
+                    WindowManagerService.SHOW_SURFACE_ALLOC) Slog.i(WindowManagerService.TAG,
+                            "  FREEZE " + mSurface + ": DESTROY");
             mSurface.destroy();
             mSurface = null;
         }
diff --git a/services/java/com/android/server/wm/StartingData.java b/services/java/com/android/server/wm/StartingData.java
index 625fcfe..46bb480 100644
--- a/services/java/com/android/server/wm/StartingData.java
+++ b/services/java/com/android/server/wm/StartingData.java
@@ -16,18 +16,23 @@
 
 package com.android.server.wm;
 
+import android.content.res.CompatibilityInfo;
+
 final class StartingData {
     final String pkg;
     final int theme;
+    final CompatibilityInfo compatInfo;
     final CharSequence nonLocalizedLabel;
     final int labelRes;
     final int icon;
     final int windowFlags;
 
-    StartingData(String _pkg, int _theme, CharSequence _nonLocalizedLabel,
+    StartingData(String _pkg, int _theme, CompatibilityInfo _compatInfo,
+            CharSequence _nonLocalizedLabel,
             int _labelRes, int _icon, int _windowFlags) {
         pkg = _pkg;
         theme = _theme;
+        compatInfo = _compatInfo;
         nonLocalizedLabel = _nonLocalizedLabel;
         labelRes = _labelRes;
         icon = _icon;
diff --git a/services/java/com/android/server/wm/StrictModeFlash.java b/services/java/com/android/server/wm/StrictModeFlash.java
index 2c62080..71b5952 100644
--- a/services/java/com/android/server/wm/StrictModeFlash.java
+++ b/services/java/com/android/server/wm/StrictModeFlash.java
@@ -39,7 +39,7 @@
 
     public StrictModeFlash(Display display, SurfaceSession session) {
         final DisplayMetrics dm = new DisplayMetrics();
-        display.getMetrics(dm);
+        display.getRealMetrics(dm);
 
         try {
             mSurface = new Surface(session, 0, "StrictModeFlash", -1, 1, 1, PixelFormat.TRANSLUCENT, 0);
diff --git a/services/java/com/android/server/wm/Watermark.java b/services/java/com/android/server/wm/Watermark.java
index 22126f3..375abe5 100644
--- a/services/java/com/android/server/wm/Watermark.java
+++ b/services/java/com/android/server/wm/Watermark.java
@@ -52,7 +52,7 @@
 
     Watermark(Display display, SurfaceSession session, String[] tokens) {
         final DisplayMetrics dm = new DisplayMetrics();
-        display.getMetrics(dm);
+        display.getRealMetrics(dm);
 
         if (false) {
             Log.i(WindowManagerService.TAG, "*********************** WATERMARK");
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 9c98296..c40c7fcd 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -19,6 +19,7 @@
 import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
 import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW;
 import static android.view.WindowManager.LayoutParams.FLAG_BLUR_BEHIND;
+import static android.view.WindowManager.LayoutParams.FLAG_COMPATIBLE_WINDOW;
 import static android.view.WindowManager.LayoutParams.FLAG_DIM_BEHIND;
 import static android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
 import static android.view.WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
@@ -153,12 +154,14 @@
     static final boolean DEBUG_WINDOW_MOVEMENT = false;
     static final boolean DEBUG_TOKEN_MOVEMENT = false;
     static final boolean DEBUG_ORIENTATION = false;
+    static final boolean DEBUG_APP_ORIENTATION = false;
     static final boolean DEBUG_CONFIGURATION = false;
     static final boolean DEBUG_APP_TRANSITIONS = false;
     static final boolean DEBUG_STARTING_WINDOW = false;
     static final boolean DEBUG_REORDER = false;
     static final boolean DEBUG_WALLPAPER = false;
     static final boolean DEBUG_DRAG = false;
+    static final boolean SHOW_SURFACE_ALLOC = false;
     static final boolean SHOW_TRANSACTIONS = false;
     static final boolean HIDE_STACK_CRAWLS = true;
 
@@ -427,6 +430,7 @@
     boolean mWindowsFreezingScreen = false;
     long mFreezeGcPending = 0;
     int mAppsFreezingScreen = 0;
+    int mLastWindowForcedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
 
     int mLayoutSeq = 0;
     
@@ -461,6 +465,10 @@
 
     Display mDisplay;
 
+    final DisplayMetrics mDisplayMetrics = new DisplayMetrics();
+    final DisplayMetrics mTmpDisplayMetrics = new DisplayMetrics();
+    final DisplayMetrics mCompatDisplayMetrics = new DisplayMetrics();
+
     H mH = new H();
 
     WindowState mCurrentFocus = null;
@@ -602,8 +610,7 @@
 
     final Configuration mTempConfiguration = new Configuration();
 
-    // The frame use to limit the size of the app running in compatibility mode.
-    Rect mCompatibleScreenFrame = new Rect();
+    // The desired scaling factor for compatible apps.
     float mCompatibleScreenScale;
 
     public static WindowManagerService main(Context context,
@@ -2488,6 +2495,8 @@
 
             if (DEBUG_LAYOUT) Slog.v(TAG, "Relayout " + win + ": " + win.mAttrs);
 
+            win.mEnforceSizeCompat = (win.mAttrs.flags & FLAG_COMPATIBLE_WINDOW) != 0;
+
             if ((attrChanges & WindowManager.LayoutParams.ALPHA_CHANGED) != 0) {
                 win.mAlpha = attrs.alpha;
             }
@@ -3188,6 +3197,15 @@
     }
 
     public int getOrientationFromWindowsLocked() {
+        if (mDisplayFrozen || mOpeningApps.size() > 0 || mClosingApps.size() > 0) {
+            // If the display is frozen, some activities may be in the middle
+            // of restarting, and thus have removed their old window.  If the
+            // window has the flag to hide the lock screen, then the lock screen
+            // can re-appear and inflict its own orientation on us.  Keep the
+            // orientation stable until this all settles down.
+            return mLastWindowForcedOrientation;
+        }
+
         int pos = mWindows.size() - 1;
         while (pos >= 0) {
             WindowState wtoken = mWindows.get(pos);
@@ -3195,7 +3213,7 @@
             if (wtoken.mAppToken != null) {
                 // We hit an application window. so the orientation will be determined by the
                 // app window. No point in continuing further.
-                return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
+                return (mLastWindowForcedOrientation=ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
             }
             if (!wtoken.isVisibleLw() || !wtoken.mPolicyVisibilityAfterAnim) {
                 continue;
@@ -3205,10 +3223,10 @@
                     (req == ActivityInfo.SCREEN_ORIENTATION_BEHIND)){
                 continue;
             } else {
-                return req;
+                return (mLastWindowForcedOrientation=req);
             }
         }
-        return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
+        return (mLastWindowForcedOrientation=ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED);
     }
 
     public int getOrientationFromAppTokensLocked() {
@@ -3221,16 +3239,23 @@
         while (pos >= 0) {
             AppWindowToken wtoken = mAppTokens.get(pos);
             pos--;
+
+            if (DEBUG_APP_ORIENTATION) Slog.v(TAG, "Checking app orientation: " + wtoken);
+
             // if we're about to tear down this window and not seek for
             // the behind activity, don't use it for orientation
             if (!findingBehind
                     && (!wtoken.hidden && wtoken.hiddenRequested)) {
+                if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping " + wtoken
+                        + " -- going to hide");
                 continue;
             }
 
             if (!haveGroup) {
                 // We ignore any hidden applications on the top.
                 if (wtoken.hiddenRequested || wtoken.willBeHidden) {
+                    if (DEBUG_ORIENTATION) Slog.v(TAG, "Skipping " + wtoken
+                            + " -- hidden on top");
                     continue;
                 }
                 haveGroup = true;
@@ -3244,6 +3269,8 @@
                 // user's orientation.
                 if (lastOrientation != ActivityInfo.SCREEN_ORIENTATION_BEHIND
                         && lastFullscreen) {
+                    if (DEBUG_ORIENTATION) Slog.v(TAG, "Done at " + wtoken
+                            + " -- end of group, return " + lastOrientation);
                     return lastOrientation;
                 }
             }
@@ -3254,16 +3281,21 @@
             lastFullscreen = wtoken.appFullscreen;
             if (lastFullscreen
                     && or != ActivityInfo.SCREEN_ORIENTATION_BEHIND) {
+                if (DEBUG_ORIENTATION) Slog.v(TAG, "Done at " + wtoken
+                        + " -- full screen, return " + or);
                 return or;
             }
             // If this application has requested an explicit orientation,
             // then use it.
             if (or != ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
                     && or != ActivityInfo.SCREEN_ORIENTATION_BEHIND) {
+                if (DEBUG_ORIENTATION) Slog.v(TAG, "Done at " + wtoken
+                        + " -- explicitly set, return " + or);
                 return or;
             }
             findingBehind |= (or == ActivityInfo.SCREEN_ORIENTATION_BEHIND);
         }
+        if (DEBUG_ORIENTATION) Slog.v(TAG, "No app is requesting an orientation");
         return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
     }
 
@@ -3336,15 +3368,6 @@
      * android.os.IBinder)
      */
     boolean updateOrientationFromAppTokensLocked(boolean inTransaction) {
-        if (mDisplayFrozen || mOpeningApps.size() > 0 || mClosingApps.size() > 0) {
-            // If the display is frozen, some activities may be in the middle
-            // of restarting, and thus have removed their old window.  If the
-            // window has the flag to hide the lock screen, then the lock screen
-            // can re-appear and inflict its own orientation on us.  Keep the
-            // orientation stable until this all settles down.
-            return false;
-        }
-
         boolean changed = false;
         long ident = Binder.clearCallingIdentity();
         try {
@@ -3526,7 +3549,8 @@
     }
 
     public void setAppStartingWindow(IBinder token, String pkg,
-            int theme, CharSequence nonLocalizedLabel, int labelRes, int icon,
+            int theme, CompatibilityInfo compatInfo,
+            CharSequence nonLocalizedLabel, int labelRes, int icon,
             int windowFlags, IBinder transferFrom, boolean createIfNeeded) {
         if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS,
                 "setAppStartingIcon()")) {
@@ -3676,8 +3700,7 @@
             }
 
             mStartingIconInTransition = true;
-            wtoken.startingData = new StartingData(
-                    pkg, theme, nonLocalizedLabel,
+            wtoken.startingData = new StartingData(pkg, theme, compatInfo, nonLocalizedLabel,
                     labelRes, icon, windowFlags);
             Message m = mH.obtainMessage(H.ADD_STARTING, wtoken);
             // Note: we really want to do sendMessageAtFrontOfQueue() because we
@@ -5037,7 +5060,7 @@
             mWaitingForConfig = true;
             mLayoutNeeded = true;
             startFreezingDisplayLocked(inTransaction);
-            Slog.i(TAG, "Setting rotation to " + rotation + ", animFlags=" + animFlags);
+            //Slog.i(TAG, "Setting rotation to " + rotation + ", animFlags=" + animFlags);
             mInputManager.setDisplayOrientation(0, rotation);
             if (mDisplayEnabled) {
                 // NOTE: We disable the rotation in the emulator because
@@ -5507,6 +5530,56 @@
         return curSize;
     }
 
+    private int computeSmallestWidth(boolean rotated, int dw, int dh, float density) {
+        // We need to determine the smallest width that will occur under normal
+        // operation.  To this, start with the base screen size and compute the
+        // width under the different possible rotations.  We need to un-rotate
+        // the current screen dimensions before doing this.
+        int unrotDw, unrotDh;
+        if (rotated) {
+            unrotDw = dh;
+            unrotDh = dw;
+        } else {
+            unrotDw = dw;
+            unrotDh = dh;
+        }
+        int sw = reduceConfigWidthSize(unrotDw, Surface.ROTATION_0, density, unrotDw);
+        sw = reduceConfigWidthSize(sw, Surface.ROTATION_90, density, unrotDh);
+        sw = reduceConfigWidthSize(sw, Surface.ROTATION_180, density, unrotDw);
+        sw = reduceConfigWidthSize(sw, Surface.ROTATION_270, density, unrotDh);
+        return sw;
+    }
+
+    private int reduceCompatConfigWidthSize(int curSize, int rotation, DisplayMetrics dm,
+            int dw, int dh) {
+        dm.unscaledWidthPixels = mPolicy.getNonDecorDisplayWidth(rotation, dw);
+        dm.unscaledHeightPixels = mPolicy.getNonDecorDisplayHeight(rotation, dh);
+        float scale = CompatibilityInfo.computeCompatibleScaling(dm, null);
+        int size = (int)(((dm.unscaledWidthPixels / scale) / dm.density) + .5f);
+        if (curSize == 0 || size < curSize) {
+            curSize = size;
+        }
+        return curSize;
+    }
+
+    private int computeCompatSmallestWidth(boolean rotated, DisplayMetrics dm, int dw, int dh) {
+        mTmpDisplayMetrics.setTo(dm);
+        dm = mTmpDisplayMetrics;
+        int unrotDw, unrotDh;
+        if (rotated) {
+            unrotDw = dh;
+            unrotDh = dw;
+        } else {
+            unrotDw = dw;
+            unrotDh = dh;
+        }
+        int sw = reduceCompatConfigWidthSize(0, Surface.ROTATION_0, dm, unrotDw, unrotDh);
+        sw = reduceCompatConfigWidthSize(sw, Surface.ROTATION_90, dm, unrotDh, unrotDw);
+        sw = reduceCompatConfigWidthSize(sw, Surface.ROTATION_180, dm, unrotDw, unrotDh);
+        sw = reduceCompatConfigWidthSize(sw, Surface.ROTATION_270, dm, unrotDh, unrotDw);
+        return sw;
+    }
+
     boolean computeNewConfigurationLocked(Configuration config) {
         if (mDisplay == null) {
             return false;
@@ -5552,7 +5625,7 @@
         }
         config.orientation = orientation;
 
-        DisplayMetrics dm = new DisplayMetrics();
+        DisplayMetrics dm = mDisplayMetrics;
         mDisplay.getRealMetrics(dm);
 
         // Override display width and height with what we are computing,
@@ -5562,11 +5635,16 @@
         dm.heightPixels = dm.unscaledHeightPixels = mAppDisplayHeight
                 = mPolicy.getNonDecorDisplayHeight(mRotation, dh);
 
-        mCompatibleScreenScale = CompatibilityInfo.updateCompatibleScreenFrame(
-                dm, mCompatibleScreenFrame, null);
+        mCompatibleScreenScale = CompatibilityInfo.computeCompatibleScaling(dm,
+                mCompatDisplayMetrics);
 
         config.screenWidthDp = (int)(mPolicy.getConfigDisplayWidth(mRotation, dw) / dm.density);
         config.screenHeightDp = (int)(mPolicy.getConfigDisplayHeight(mRotation, dh) / dm.density);
+        config.smallestScreenWidthDp = computeSmallestWidth(rotated, dw, dh, dm.density);
+
+        config.compatScreenWidthDp = (int)(config.screenWidthDp / mCompatibleScreenScale);
+        config.compatScreenHeightDp = (int)(config.screenHeightDp / mCompatibleScreenScale);
+        config.compatSmallestScreenWidthDp = computeCompatSmallestWidth(rotated, dm, dw, dh);
 
         // We need to determine the smallest width that will occur under normal
         // operation.  To this, start with the base screen size and compute the
@@ -5949,6 +6027,19 @@
         }
     }
 
+    /**
+     * Temporarily set the pointer speed.  Does not save the new setting.
+     * Used by the settings application.
+     */
+    public void setPointerSpeed(int speed) {
+        if (!checkCallingPermission(android.Manifest.permission.SET_POINTER_SPEED,
+                "setPointerSpeed()")) {
+            throw new SecurityException("Requires SET_POINTER_SPEED permission");
+        }
+
+        mInputManager.setPointerSpeed(speed);
+    }
+
     private WindowState getFocusedWindow() {
         synchronized (mWindowMap) {
             return getFocusedWindowLocked();
@@ -6138,9 +6229,8 @@
                     View view = null;
                     try {
                         view = mPolicy.addStartingWindow(
-                            wtoken.token, sd.pkg,
-                            sd.theme, sd.nonLocalizedLabel, sd.labelRes,
-                            sd.icon, sd.windowFlags);
+                            wtoken.token, sd.pkg, sd.theme, sd.compatInfo,
+                            sd.nonLocalizedLabel, sd.labelRes, sd.icon, sd.windowFlags);
                     } catch (Exception e) {
                         Slog.w(TAG, "Exception when adding starting window", e);
                     }
@@ -8031,7 +8121,7 @@
                                 if (mDimAnimator == null) {
                                     mDimAnimator = new DimAnimator(mFxSession);
                                 }
-                                mDimAnimator.show(dw, dh);
+                                mDimAnimator.show(innerDw, innerDh);
                                 mDimAnimator.updateParameters(mContext.getResources(),
                                         w, currentTime);
                             }
@@ -8420,7 +8510,8 @@
                 // surface and ask the app to request another one.
                 Slog.w(TAG, "Looks like we have reclaimed some memory, clearing surface for retry.");
                 if (surface != null) {
-                    if (SHOW_TRANSACTIONS) logSurface(win, "RECOVER DESTROY", null);
+                    if (SHOW_TRANSACTIONS || SHOW_SURFACE_ALLOC) logSurface(win,
+                            "RECOVER DESTROY", null);
                     surface.destroy();
                     win.mSurfaceShown = false;
                     win.mSurface = null;
@@ -8924,9 +9015,10 @@
                     pw.print(" mAppsFreezingScreen="); pw.print(mAppsFreezingScreen);
                     pw.print(" mWaitingForConfig="); pw.println(mWaitingForConfig);
             pw.print("  mRotation="); pw.print(mRotation);
-                    pw.print(" mForcedAppOrientation="); pw.print(mForcedAppOrientation);
                     pw.print(" mRequestedRotation="); pw.print(mRequestedRotation);
                     pw.print(" mAltOrientation="); pw.println(mAltOrientation);
+            pw.print("  mLastWindowForcedOrientation"); pw.print(mLastWindowForcedOrientation);
+                    pw.print(" mForcedAppOrientation="); pw.println(mForcedAppOrientation);
             pw.print("  mDeferredRotation="); pw.print(mDeferredRotation);
                     pw.print(", mDeferredRotationAnimFlags="); pw.println(mDeferredRotationAnimFlags);
             pw.print("  mAnimationPending="); pw.print(mAnimationPending);
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index 144341b..587685e 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -54,6 +54,10 @@
  * A window in the window manager.
  */
 final class WindowState implements WindowManagerPolicy.WindowState {
+    static final boolean DEBUG_VISIBILITY = WindowManagerService.DEBUG_VISIBILITY;
+    static final boolean SHOW_TRANSACTIONS = WindowManagerService.SHOW_TRANSACTIONS;
+    static final boolean SHOW_SURFACE_ALLOC = WindowManagerService.SHOW_SURFACE_ALLOC;
+
     final WindowManagerService mService;
     final Session mSession;
     final IWindow mClient;
@@ -71,7 +75,7 @@
     final boolean mIsImWindow;
     final boolean mIsWallpaper;
     final boolean mIsFloatingLayer;
-    final boolean mEnforceSizeCompat;
+    boolean mEnforceSizeCompat;
     int mViewVisibility;
     boolean mPolicyVisibility = true;
     boolean mPolicyVisibilityAfterAnim = true;
@@ -600,7 +604,7 @@
             if ((mAttrs.flags&WindowManager.LayoutParams.FLAG_SECURE) != 0) {
                 flags |= Surface.SECURE;
             }
-            if (WindowManagerService.DEBUG_VISIBILITY) Slog.v(
+            if (DEBUG_VISIBILITY) Slog.v(
                 WindowManagerService.TAG, "Creating surface in session "
                 + mSession.mSurfaceSession + " window " + this
                 + " w=" + mCompatFrame.width()
@@ -639,7 +643,8 @@
                         mSession.mSurfaceSession, mSession.mPid,
                         mAttrs.getTitle().toString(),
                         0, w, h, format, flags);
-                if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG, "  CREATE SURFACE "
+                if (SHOW_TRANSACTIONS || SHOW_SURFACE_ALLOC) Slog.i(WindowManagerService.TAG,
+                        "  CREATE SURFACE "
                         + mSurface + " IN SESSION "
                         + mSession.mSurfaceSession
                         + ": pid=" + mSession.mPid + " format="
@@ -659,7 +664,7 @@
                 WindowManagerService.TAG, "Got surface: " + mSurface
                 + ", set left=" + mFrame.left + " top=" + mFrame.top
                 + ", animLayer=" + mAnimLayer);
-            if (WindowManagerService.SHOW_TRANSACTIONS) {
+            if (SHOW_TRANSACTIONS) {
                 Slog.i(WindowManagerService.TAG, ">>> OPEN TRANSACTION createSurfaceLocked");
                 WindowManagerService.logSurface(this, "CREATE pos=(" + mFrame.left
                         + "," + mFrame.top + ") (" +
@@ -677,7 +682,7 @@
                     mSurfaceShown = false;
                     mSurface.hide();
                     if ((mAttrs.flags&WindowManager.LayoutParams.FLAG_DITHER) != 0) {
-                        if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(this, "DITHER", null);
+                        if (SHOW_TRANSACTIONS) WindowManagerService.logSurface(this, "DITHER", null);
                         mSurface.setFlags(Surface.SURFACE_DITHER,
                                 Surface.SURFACE_DITHER);
                     }
@@ -688,7 +693,7 @@
                 mLastHidden = true;
             } finally {
                 Surface.closeTransaction();
-                if (WindowManagerService.SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG, "<<< CLOSE TRANSACTION createSurfaceLocked");
+                if (SHOW_TRANSACTIONS) Slog.i(WindowManagerService.TAG, "<<< CLOSE TRANSACTION createSurfaceLocked");
             }
             if (WindowManagerService.localLOGV) Slog.v(
                     WindowManagerService.TAG, "Created surface " + this);
@@ -725,7 +730,7 @@
             }
 
             try {
-                if (WindowManagerService.DEBUG_VISIBILITY) {
+                if (DEBUG_VISIBILITY) {
                     RuntimeException e = null;
                     if (!WindowManagerService.HIDE_STACK_CRAWLS) {
                         e = new RuntimeException();
@@ -734,13 +739,13 @@
                     Slog.w(WindowManagerService.TAG, "Window " + this + " destroying surface "
                             + mSurface + ", session " + mSession, e);
                 }
-                if (WindowManagerService.SHOW_TRANSACTIONS) {
+                if (SHOW_TRANSACTIONS || SHOW_SURFACE_ALLOC) {
                     RuntimeException e = null;
                     if (!WindowManagerService.HIDE_STACK_CRAWLS) {
                         e = new RuntimeException();
                         e.fillInStackTrace();
                     }
-                    if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(this, "DESTROY", e);
+                    WindowManagerService.logSurface(this, "DESTROY", e);
                 }
                 mSurface.destroy();
             } catch (RuntimeException e) {
@@ -756,7 +761,7 @@
 
     boolean finishDrawingLocked() {
         if (mDrawPending) {
-            if (WindowManagerService.SHOW_TRANSACTIONS || WindowManagerService.DEBUG_ORIENTATION) Slog.v(
+            if (SHOW_TRANSACTIONS || WindowManagerService.DEBUG_ORIENTATION) Slog.v(
                 WindowManagerService.TAG, "finishDrawingLocked: " + mSurface);
             mCommitDrawPending = true;
             mDrawPending = false;
@@ -783,7 +788,7 @@
 
     // This must be called while inside a transaction.
     boolean performShowLocked() {
-        if (WindowManagerService.DEBUG_VISIBILITY) {
+        if (DEBUG_VISIBILITY) {
             RuntimeException e = null;
             if (!WindowManagerService.HIDE_STACK_CRAWLS) {
                 e = new RuntimeException();
@@ -794,9 +799,9 @@
                     + " starting=" + (mAttrs.type == TYPE_APPLICATION_STARTING), e);
         }
         if (mReadyToShow && isReadyForDisplay()) {
-            if (WindowManagerService.SHOW_TRANSACTIONS || WindowManagerService.DEBUG_ORIENTATION) WindowManagerService.logSurface(this,
+            if (SHOW_TRANSACTIONS || WindowManagerService.DEBUG_ORIENTATION) WindowManagerService.logSurface(this,
                     "SHOW (performShowLocked)", null);
-            if (WindowManagerService.DEBUG_VISIBILITY) Slog.v(WindowManagerService.TAG, "Showing " + this
+            if (DEBUG_VISIBILITY) Slog.v(WindowManagerService.TAG, "Showing " + this
                     + " during animation: policyVis=" + mPolicyVisibility
                     + " attHidden=" + mAttachedHidden
                     + " tok.hiddenRequested="
@@ -958,7 +963,7 @@
         mHasTransformation = false;
         mHasLocalTransformation = false;
         if (mPolicyVisibility != mPolicyVisibilityAfterAnim) {
-            if (WindowManagerService.DEBUG_VISIBILITY) {
+            if (DEBUG_VISIBILITY) {
                 Slog.v(WindowManagerService.TAG, "Policy visibility changing after anim in " + this + ": "
                         + mPolicyVisibilityAfterAnim);
             }
@@ -1020,7 +1025,7 @@
         if (mSurface != null) {
             mService.mDestroySurface.add(this);
             mDestroying = true;
-            if (WindowManagerService.SHOW_TRANSACTIONS) WindowManagerService.logSurface(this, "HIDE (finishExit)", null);
+            if (SHOW_TRANSACTIONS) WindowManagerService.logSurface(this, "HIDE (finishExit)", null);
             mSurfaceShown = false;
             try {
                 mSurface.hide();
@@ -1414,9 +1419,9 @@
         if (mPolicyVisibility && mPolicyVisibilityAfterAnim) {
             return false;
         }
-        if (WindowManagerService.DEBUG_VISIBILITY) Slog.v(WindowManagerService.TAG, "Policy visibility true: " + this);
+        if (DEBUG_VISIBILITY) Slog.v(WindowManagerService.TAG, "Policy visibility true: " + this);
         if (doAnimation) {
-            if (WindowManagerService.DEBUG_VISIBILITY) Slog.v(WindowManagerService.TAG, "doAnimation: mPolicyVisibility="
+            if (DEBUG_VISIBILITY) Slog.v(WindowManagerService.TAG, "doAnimation: mPolicyVisibility="
                     + mPolicyVisibility + " mAnimation=" + mAnimation);
             if (mService.mDisplayFrozen || !mService.mPolicy.isScreenOn()) {
                 doAnimation = false;
@@ -1462,7 +1467,7 @@
         if (doAnimation) {
             mPolicyVisibilityAfterAnim = false;
         } else {
-            if (WindowManagerService.DEBUG_VISIBILITY) Slog.v(WindowManagerService.TAG, "Policy visibility false: " + this);
+            if (DEBUG_VISIBILITY) Slog.v(WindowManagerService.TAG, "Policy visibility false: " + this);
             mPolicyVisibilityAfterAnim = false;
             mPolicyVisibility = false;
             // Window is no longer visible -- make sure if we were waiting
diff --git a/services/jni/com_android_server_InputManager.cpp b/services/jni/com_android_server_InputManager.cpp
index dde4776..608ea1a 100644
--- a/services/jni/com_android_server_InputManager.cpp
+++ b/services/jni/com_android_server_InputManager.cpp
@@ -53,6 +53,11 @@
 
 namespace android {
 
+// The exponent used to calculate the pointer speed scaling factor.
+// The scaling factor is calculated as 2 ^ (speed * exponent),
+// where the speed ranges from -7 to + 7 and is supplied by the user.
+static const float POINTER_SPEED_EXPONENT = 1.0f / 4;
+
 static struct {
     jclass clazz;
 
@@ -72,6 +77,10 @@
     jmethodID getKeyRepeatTimeout;
     jmethodID getKeyRepeatDelay;
     jmethodID getMaxEventsPerSecond;
+    jmethodID getHoverTapTimeout;
+    jmethodID getHoverTapSlop;
+    jmethodID getDoubleTapTimeout;
+    jmethodID getLongPressTimeout;
     jmethodID getPointerLayer;
     jmethodID getPointerIcon;
 } gCallbacksClassInfo;
@@ -107,6 +116,16 @@
 
 // --- Global functions ---
 
+template<typename T>
+inline static T min(const T& a, const T& b) {
+    return a < b ? a : b;
+}
+
+template<typename T>
+inline static T max(const T& a, const T& b) {
+    return a > b ? a : b;
+}
+
 static jobject getInputApplicationHandleObjLocalRef(JNIEnv* env,
         const sp<InputApplicationHandle>& inputApplicationHandle) {
     if (inputApplicationHandle == NULL) {
@@ -165,15 +184,13 @@
     void setFocusedApplication(JNIEnv* env, jobject applicationObj);
     void setInputDispatchMode(bool enabled, bool frozen);
     void setSystemUiVisibility(int32_t visibility);
+    void setPointerSpeed(int32_t speed);
 
     /* --- InputReaderPolicyInterface implementation --- */
 
     virtual bool getDisplayInfo(int32_t displayId,
             int32_t* width, int32_t* height, int32_t* orientation);
-    virtual bool filterTouchEvents();
-    virtual bool filterJumpyTouchEvents();
-    virtual nsecs_t getVirtualKeyQuietTime();
-    virtual void getExcludedDeviceNames(Vector<String8>& outExcludedDeviceNames);
+    virtual void getReaderConfiguration(InputReaderConfiguration* outConfig);
     virtual sp<PointerControllerInterface> obtainPointerController(int32_t deviceId);
 
     /* --- InputDispatcherPolicyInterface implementation --- */
@@ -184,9 +201,8 @@
     virtual nsecs_t notifyANR(const sp<InputApplicationHandle>& inputApplicationHandle,
             const sp<InputWindowHandle>& inputWindowHandle);
     virtual void notifyInputChannelBroken(const sp<InputWindowHandle>& inputWindowHandle);
-    virtual nsecs_t getKeyRepeatTimeout();
-    virtual nsecs_t getKeyRepeatDelay();
-    virtual int32_t getMaxEventsPerSecond();
+    virtual void getDispatcherConfiguration(InputDispatcherConfiguration* outConfig);
+    virtual bool isKeyRepeatEnabled();
     virtual void interceptKeyBeforeQueueing(const KeyEvent* keyEvent, uint32_t& policyFlags);
     virtual void interceptMotionBeforeQueueing(nsecs_t when, uint32_t& policyFlags);
     virtual bool interceptKeyBeforeDispatching(const sp<InputWindowHandle>& inputWindowHandle,
@@ -208,18 +224,6 @@
     jobject mCallbacksObj;
     sp<Looper> mLooper;
 
-    // Cached filtering policies.
-    int32_t mFilterTouchEvents;
-    int32_t mFilterJumpyTouchEvents;
-    nsecs_t mVirtualKeyQuietTime;
-
-    // Cached key repeat policy.
-    nsecs_t mKeyRepeatTimeout;
-    nsecs_t mKeyRepeatDelay;
-
-    // Cached throttling policy.
-    int32_t mMaxEventsPerSecond;
-
     Mutex mLock;
     struct Locked {
         // Display size information.
@@ -229,6 +233,9 @@
         // System UI visibility.
         int32_t systemUiVisibility;
 
+        // Pointer speed.
+        int32_t pointerSpeed;
+
         // Sprite controller singleton, created on first use.
         sp<SpriteController> spriteController;
 
@@ -255,10 +262,7 @@
 
 NativeInputManager::NativeInputManager(jobject contextObj,
         jobject callbacksObj, const sp<Looper>& looper) :
-        mLooper(looper),
-        mFilterTouchEvents(-1), mFilterJumpyTouchEvents(-1), mVirtualKeyQuietTime(-1),
-        mKeyRepeatTimeout(-1), mKeyRepeatDelay(-1),
-        mMaxEventsPerSecond(-1) {
+        mLooper(looper) {
     JNIEnv* env = jniEnv();
 
     mContextObj = env->NewGlobalRef(contextObj);
@@ -271,6 +275,7 @@
         mLocked.displayOrientation = ROTATION_0;
 
         mLocked.systemUiVisibility = ASYSTEM_UI_VISIBILITY_STATUS_BAR_VISIBLE;
+        mLocked.pointerSpeed = 0;
     }
 
     sp<EventHub> eventHub = new EventHub();
@@ -371,74 +376,76 @@
     return result;
 }
 
-bool NativeInputManager::filterTouchEvents() {
-    if (mFilterTouchEvents < 0) {
-        JNIEnv* env = jniEnv();
-
-        jboolean result = env->CallBooleanMethod(mCallbacksObj,
-                gCallbacksClassInfo.filterTouchEvents);
-        if (checkAndClearExceptionFromCallback(env, "filterTouchEvents")) {
-            result = false;
-        }
-
-        mFilterTouchEvents = result ? 1 : 0;
-    }
-    return mFilterTouchEvents;
-}
-
-bool NativeInputManager::filterJumpyTouchEvents() {
-    if (mFilterJumpyTouchEvents < 0) {
-        JNIEnv* env = jniEnv();
-
-        jboolean result = env->CallBooleanMethod(mCallbacksObj,
-                gCallbacksClassInfo.filterJumpyTouchEvents);
-        if (checkAndClearExceptionFromCallback(env, "filterJumpyTouchEvents")) {
-            result = false;
-        }
-
-        mFilterJumpyTouchEvents = result ? 1 : 0;
-    }
-    return mFilterJumpyTouchEvents;
-}
-
-nsecs_t NativeInputManager::getVirtualKeyQuietTime() {
-    if (mVirtualKeyQuietTime < 0) {
-        JNIEnv* env = jniEnv();
-
-        jint result = env->CallIntMethod(mCallbacksObj,
-                gCallbacksClassInfo.getVirtualKeyQuietTimeMillis);
-        if (checkAndClearExceptionFromCallback(env, "getVirtualKeyQuietTimeMillis")) {
-            result = 0;
-        }
-        if (result < 0) {
-            result = 0;
-        }
-
-        mVirtualKeyQuietTime = milliseconds_to_nanoseconds(result);
-    }
-    return mVirtualKeyQuietTime;
-}
-
-void NativeInputManager::getExcludedDeviceNames(Vector<String8>& outExcludedDeviceNames) {
-    outExcludedDeviceNames.clear();
-
+void NativeInputManager::getReaderConfiguration(InputReaderConfiguration* outConfig) {
     JNIEnv* env = jniEnv();
 
-    jobjectArray result = jobjectArray(env->CallObjectMethod(mCallbacksObj,
+    jboolean filterTouchEvents = env->CallBooleanMethod(mCallbacksObj,
+            gCallbacksClassInfo.filterTouchEvents);
+    if (!checkAndClearExceptionFromCallback(env, "filterTouchEvents")) {
+        outConfig->filterTouchEvents = filterTouchEvents;
+    }
+
+    jboolean filterJumpyTouchEvents = env->CallBooleanMethod(mCallbacksObj,
+            gCallbacksClassInfo.filterJumpyTouchEvents);
+    if (!checkAndClearExceptionFromCallback(env, "filterJumpyTouchEvents")) {
+        outConfig->filterJumpyTouchEvents = filterJumpyTouchEvents;
+    }
+
+    jint virtualKeyQuietTime = env->CallIntMethod(mCallbacksObj,
+            gCallbacksClassInfo.getVirtualKeyQuietTimeMillis);
+    if (!checkAndClearExceptionFromCallback(env, "getVirtualKeyQuietTimeMillis")) {
+        outConfig->virtualKeyQuietTime = milliseconds_to_nanoseconds(virtualKeyQuietTime);
+    }
+
+    outConfig->excludedDeviceNames.clear();
+    jobjectArray excludedDeviceNames = jobjectArray(env->CallObjectMethod(mCallbacksObj,
             gCallbacksClassInfo.getExcludedDeviceNames));
-    if (! checkAndClearExceptionFromCallback(env, "getExcludedDeviceNames") && result) {
-        jsize length = env->GetArrayLength(result);
+    if (!checkAndClearExceptionFromCallback(env, "getExcludedDeviceNames") && excludedDeviceNames) {
+        jsize length = env->GetArrayLength(excludedDeviceNames);
         for (jsize i = 0; i < length; i++) {
-            jstring item = jstring(env->GetObjectArrayElement(result, i));
-
+            jstring item = jstring(env->GetObjectArrayElement(excludedDeviceNames, i));
             const char* deviceNameChars = env->GetStringUTFChars(item, NULL);
-            outExcludedDeviceNames.add(String8(deviceNameChars));
+            outConfig->excludedDeviceNames.add(String8(deviceNameChars));
             env->ReleaseStringUTFChars(item, deviceNameChars);
-
             env->DeleteLocalRef(item);
         }
-        env->DeleteLocalRef(result);
+        env->DeleteLocalRef(excludedDeviceNames);
     }
+
+    jint hoverTapTimeout = env->CallIntMethod(mCallbacksObj,
+            gCallbacksClassInfo.getHoverTapTimeout);
+    if (!checkAndClearExceptionFromCallback(env, "getHoverTapTimeout")) {
+        jint doubleTapTimeout = env->CallIntMethod(mCallbacksObj,
+                gCallbacksClassInfo.getDoubleTapTimeout);
+        if (!checkAndClearExceptionFromCallback(env, "getDoubleTapTimeout")) {
+            jint longPressTimeout = env->CallIntMethod(mCallbacksObj,
+                    gCallbacksClassInfo.getLongPressTimeout);
+            if (!checkAndClearExceptionFromCallback(env, "getLongPressTimeout")) {
+                outConfig->pointerGestureTapInterval = milliseconds_to_nanoseconds(hoverTapTimeout);
+
+                // We must ensure that the tap-drag interval is significantly shorter than
+                // the long-press timeout because the tap is held down for the entire duration
+                // of the double-tap timeout.
+                jint tapDragInterval = max(min(longPressTimeout - 100,
+                        doubleTapTimeout), hoverTapTimeout);
+                outConfig->pointerGestureTapDragInterval =
+                        milliseconds_to_nanoseconds(tapDragInterval);
+            }
+        }
+    }
+
+    jint hoverTapSlop = env->CallIntMethod(mCallbacksObj,
+            gCallbacksClassInfo.getHoverTapSlop);
+    if (!checkAndClearExceptionFromCallback(env, "getHoverTapSlop")) {
+        outConfig->pointerGestureTapSlop = hoverTapSlop;
+    }
+
+    { // acquire lock
+        AutoMutex _l(mLock);
+
+        outConfig->pointerVelocityControlParameters.scale = exp2f(mLocked.pointerSpeed
+                * POINTER_SPEED_EXPONENT);
+    } // release lock
 }
 
 sp<PointerControllerInterface> NativeInputManager::obtainPointerController(int32_t deviceId) {
@@ -559,54 +566,31 @@
     }
 }
 
-nsecs_t NativeInputManager::getKeyRepeatTimeout() {
-    if (! isScreenOn()) {
-        // Disable key repeat when the screen is off.
-        return -1;
-    } else {
-        if (mKeyRepeatTimeout < 0) {
-            JNIEnv* env = jniEnv();
+void NativeInputManager::getDispatcherConfiguration(InputDispatcherConfiguration* outConfig) {
+    JNIEnv* env = jniEnv();
 
-            jint result = env->CallIntMethod(mCallbacksObj,
-                    gCallbacksClassInfo.getKeyRepeatTimeout);
-            if (checkAndClearExceptionFromCallback(env, "getKeyRepeatTimeout")) {
-                result = 500;
-            }
+    jint keyRepeatTimeout = env->CallIntMethod(mCallbacksObj,
+            gCallbacksClassInfo.getKeyRepeatTimeout);
+    if (!checkAndClearExceptionFromCallback(env, "getKeyRepeatTimeout")) {
+        outConfig->keyRepeatTimeout = milliseconds_to_nanoseconds(keyRepeatTimeout);
+    }
 
-            mKeyRepeatTimeout = milliseconds_to_nanoseconds(result);
-        }
-        return mKeyRepeatTimeout;
+    jint keyRepeatDelay = env->CallIntMethod(mCallbacksObj,
+            gCallbacksClassInfo.getKeyRepeatDelay);
+    if (!checkAndClearExceptionFromCallback(env, "getKeyRepeatDelay")) {
+        outConfig->keyRepeatDelay = milliseconds_to_nanoseconds(keyRepeatDelay);
+    }
+
+    jint maxEventsPerSecond = env->CallIntMethod(mCallbacksObj,
+            gCallbacksClassInfo.getMaxEventsPerSecond);
+    if (!checkAndClearExceptionFromCallback(env, "getMaxEventsPerSecond")) {
+        outConfig->maxEventsPerSecond = maxEventsPerSecond;
     }
 }
 
-nsecs_t NativeInputManager::getKeyRepeatDelay() {
-    if (mKeyRepeatDelay < 0) {
-        JNIEnv* env = jniEnv();
-
-        jint result = env->CallIntMethod(mCallbacksObj,
-                gCallbacksClassInfo.getKeyRepeatDelay);
-        if (checkAndClearExceptionFromCallback(env, "getKeyRepeatDelay")) {
-            result = 50;
-        }
-
-        mKeyRepeatDelay = milliseconds_to_nanoseconds(result);
-    }
-    return mKeyRepeatDelay;
-}
-
-int32_t NativeInputManager::getMaxEventsPerSecond() {
-    if (mMaxEventsPerSecond < 0) {
-        JNIEnv* env = jniEnv();
-
-        jint result = env->CallIntMethod(mCallbacksObj,
-                gCallbacksClassInfo.getMaxEventsPerSecond);
-        if (checkAndClearExceptionFromCallback(env, "getMaxEventsPerSecond")) {
-            result = 60;
-        }
-
-        mMaxEventsPerSecond = result;
-    }
-    return mMaxEventsPerSecond;
+bool NativeInputManager::isKeyRepeatEnabled() {
+    // Only enable automatic key repeating when the screen is on.
+    return isScreenOn();
 }
 
 void NativeInputManager::setInputWindows(JNIEnv* env, jobjectArray windowObjArray) {
@@ -667,6 +651,17 @@
             : PointerController::INACTIVITY_TIMEOUT_NORMAL);
 }
 
+void NativeInputManager::setPointerSpeed(int32_t speed) {
+    AutoMutex _l(mLock);
+
+    if (mLocked.pointerSpeed != speed) {
+        LOGI("Setting pointer speed to %d.", speed);
+        mLocked.pointerSpeed = speed;
+
+        mInputManager->getReader()->refreshConfiguration();
+    }
+}
+
 bool NativeInputManager::isScreenOn() {
     return android_server_PowerManagerService_isScreenOn();
 }
@@ -1213,6 +1208,15 @@
             transferTouchFocus(fromChannel, toChannel);
 }
 
+static void android_server_InputManager_nativeSetPointerSpeed(JNIEnv* env,
+        jclass clazz, jint speed) {
+    if (checkInputManagerUnitialized(env)) {
+        return;
+    }
+
+    gNativeInputManager->setPointerSpeed(speed);
+}
+
 static jstring android_server_InputManager_nativeDump(JNIEnv* env, jclass clazz) {
     if (checkInputManagerUnitialized(env)) {
         return NULL;
@@ -1267,6 +1271,8 @@
             (void*) android_server_InputManager_nativeGetInputConfiguration },
     { "nativeTransferTouchFocus", "(Landroid/view/InputChannel;Landroid/view/InputChannel;)Z",
             (void*) android_server_InputManager_nativeTransferTouchFocus },
+    { "nativeSetPointerSpeed", "(I)V",
+            (void*) android_server_InputManager_nativeSetPointerSpeed },
     { "nativeDump", "()Ljava/lang/String;",
             (void*) android_server_InputManager_nativeDump },
 };
@@ -1342,6 +1348,18 @@
     GET_METHOD_ID(gCallbacksClassInfo.getKeyRepeatDelay, gCallbacksClassInfo.clazz,
             "getKeyRepeatDelay", "()I");
 
+    GET_METHOD_ID(gCallbacksClassInfo.getHoverTapTimeout, gCallbacksClassInfo.clazz,
+            "getHoverTapTimeout", "()I");
+
+    GET_METHOD_ID(gCallbacksClassInfo.getHoverTapSlop, gCallbacksClassInfo.clazz,
+            "getHoverTapSlop", "()I");
+
+    GET_METHOD_ID(gCallbacksClassInfo.getDoubleTapTimeout, gCallbacksClassInfo.clazz,
+            "getDoubleTapTimeout", "()I");
+
+    GET_METHOD_ID(gCallbacksClassInfo.getLongPressTimeout, gCallbacksClassInfo.clazz,
+            "getLongPressTimeout", "()I");
+
     GET_METHOD_ID(gCallbacksClassInfo.getMaxEventsPerSecond, gCallbacksClassInfo.clazz,
             "getMaxEventsPerSecond", "()I");
 
diff --git a/services/jni/com_android_server_UsbService.cpp b/services/jni/com_android_server_UsbService.cpp
index 6aeede2..93f23c3 100644
--- a/services/jni/com_android_server_UsbService.cpp
+++ b/services/jni/com_android_server_UsbService.cpp
@@ -135,7 +135,7 @@
     jobject thiz = (jobject)client_data;
 
     jstring deviceName = env->NewStringUTF(devname);
-    env->CallVoidMethod(thiz, method_usbDeviceRemoved, env->NewStringUTF(devname));
+    env->CallVoidMethod(thiz, method_usbDeviceRemoved, deviceName);
     env->DeleteLocalRef(deviceName);
     checkAndClearExceptionFromCallback(env, __FUNCTION__);
     return 0;
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 23b67e3..5a417b3 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -427,8 +427,7 @@
     public static final int NETWORK_TYPE_LTE = 13;
     /** Current network is eHRPD */
     public static final int NETWORK_TYPE_EHRPD = 14;
-    /** Current network is HSPA+
-     * @hide */
+    /** Current network is HSPA+ */
     public static final int NETWORK_TYPE_HSPAP = 15;
 
     /**
@@ -451,6 +450,7 @@
      * @see #NETWORK_TYPE_IDEN
      * @see #NETWORK_TYPE_LTE
      * @see #NETWORK_TYPE_EHRPD
+     * @see #NETWORK_TYPE_HSPAP
      */
     public int getNetworkType() {
         try{
@@ -507,6 +507,8 @@
                 return "CDMA - eHRPD";
             case NETWORK_TYPE_IDEN:
                 return "iDEN";
+            case NETWORK_TYPE_HSPAP:
+                return "HSPA+";
             default:
                 return "UNKNOWN";
         }
diff --git a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
index e0f0f05..f015378 100644
--- a/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
+++ b/tests/permission/src/com/android/framework/permission/tests/WindowManagerPermissionTests.java
@@ -164,7 +164,7 @@
         }
         
         try {
-            mWm.setAppStartingWindow(null, "foo", 0, null, 0, 0, 0, null, false);
+            mWm.setAppStartingWindow(null, "foo", 0, null, null, 0, 0, 0, null, false);
             fail("IWindowManager.setAppStartingWindow did not throw SecurityException as"
                     + " expected");
         } catch (SecurityException e) {
diff --git a/tools/aapt/AaptAssets.cpp b/tools/aapt/AaptAssets.cpp
index 4894196..29d2b87 100644
--- a/tools/aapt/AaptAssets.cpp
+++ b/tools/aapt/AaptAssets.cpp
@@ -969,6 +969,11 @@
         return true;
     }
     
+    if (strcmp(name, "tvdpi") == 0) {
+        if (out) out->density = ResTable_config::DENSITY_TV;
+        return true;
+    }
+    
     if (strcmp(name, "hdpi") == 0) {
         if (out) out->density = ResTable_config::DENSITY_HIGH;
         return true;
diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp
index 8ac7590..7852197 100644
--- a/tools/aapt/Command.cpp
+++ b/tools/aapt/Command.cpp
@@ -291,6 +291,27 @@
     return value.data;
 }
 
+static int32_t getResolvedIntegerAttribute(const ResTable* resTable, const ResXMLTree& tree,
+        uint32_t attrRes, String8* outError, int32_t defValue = -1)
+{
+    ssize_t idx = indexOfAttribute(tree, attrRes);
+    if (idx < 0) {
+        return defValue;
+    }
+    Res_value value;
+    if (tree.getAttributeValue(idx, &value) != NO_ERROR) {
+        if (value.dataType == Res_value::TYPE_REFERENCE) {
+            resTable->resolveReference(&value, 0);
+        }
+        if (value.dataType < Res_value::TYPE_FIRST_INT
+                || value.dataType > Res_value::TYPE_LAST_INT) {
+            if (outError != NULL) *outError = "attribute is not an integer value";
+            return defValue;
+        }
+    }
+    return value.data;
+}
+
 static String8 getResolvedAttribute(const ResTable* resTable, const ResXMLTree& tree,
         uint32_t attrRes, String8* outError)
 {
@@ -320,11 +341,12 @@
 // These are attribute resource constants for the platform, as found
 // in android.R.attr
 enum {
+    LABEL_ATTR = 0x01010001,
+    ICON_ATTR = 0x01010002,
     NAME_ATTR = 0x01010003,
     VERSION_CODE_ATTR = 0x0101021b,
     VERSION_NAME_ATTR = 0x0101021c,
-    LABEL_ATTR = 0x01010001,
-    ICON_ATTR = 0x01010002,
+    SCREEN_ORIENTATION_ATTR = 0x0101001e,
     MIN_SDK_VERSION_ATTR = 0x0101020c,
     MAX_SDK_VERSION_ATTR = 0x01010271,
     REQ_TOUCH_SCREEN_ATTR = 0x01010227,
@@ -343,6 +365,9 @@
     REQUIRED_ATTR = 0x0101028e,
     SCREEN_SIZE_ATTR = 0x010102ca,
     SCREEN_DENSITY_ATTR = 0x010102cb,
+    REQUIRES_SMALLEST_WIDTH_DP_ATTR = 0x01010364,
+    COMPATIBLE_WIDTH_LIMIT_DP_ATTR = 0x01010365,
+    LARGEST_WIDTH_LIMIT_DP_ATTR = 0x01010366,
 };
 
 const char *getComponentName(String8 &pkgName, String8 &componentName) {
@@ -423,6 +448,24 @@
         return 1;
     }
 
+    // Make a dummy config for retrieving resources...  we need to supply
+    // non-default values for some configs so that we can retrieve resources
+    // in the app that don't have a default.  The most important of these is
+    // the API version because key resources like icons will have an implicit
+    // version if they are using newer config types like density.
+    ResTable_config config;
+    config.language[0] = 'e';
+    config.language[1] = 'n';
+    config.country[0] = 'U';
+    config.country[1] = 'S';
+    config.orientation = ResTable_config::ORIENTATION_PORT;
+    config.density = ResTable_config::DENSITY_MEDIUM;
+    config.sdkVersion = 10000; // Very high.
+    config.screenWidthDp = 320;
+    config.screenHeightDp = 480;
+    config.smallestScreenWidthDp = 320;
+    assets.setConfiguration(config);
+
     const ResTable& res = assets.getResources(false);
     if (&res == NULL) {
         fprintf(stderr, "ERROR: dump failed because no resource table was found\n");
@@ -542,6 +585,19 @@
                 }
             }
         } else if (strcmp("badging", option) == 0) {
+            Vector<String8> locales;
+            res.getLocales(&locales);
+
+            Vector<ResTable_config> configs;
+            res.getConfigurations(&configs);
+            SortedVector<int> densities;
+            const size_t NC = configs.size();
+            for (size_t i=0; i<NC; i++) {
+                int dens = configs[i].density;
+                if (dens == 0) dens = 160;
+                densities.add(dens);
+            }
+
             size_t len;
             ResXMLTree::event_code_t code;
             int depth = 0;
@@ -598,6 +654,10 @@
             bool specTouchscreenFeature = false; // touchscreen-related
             bool specMultitouchFeature = false;
             bool reqDistinctMultitouchFeature = false;
+            bool specScreenPortraitFeature = false;
+            bool specScreenLandscapeFeature = false;
+            bool reqScreenPortraitFeature = false;
+            bool reqScreenLandscapeFeature = false;
             // 2.2 also added some other features that apps can request, but that
             // have no corresponding permission, so we cannot implement any
             // back-compatibility heuristic for them. The below are thus unnecessary
@@ -614,6 +674,9 @@
             int largeScreen = 1;
             int xlargeScreen = 1;
             int anyDensity = 1;
+            int requiresSmallestWidthDp = 0;
+            int compatibleWidthLimitDp = 0;
+            int largestWidthLimitDp = 0;
             String8 pkg;
             String8 activityName;
             String8 activityLabel;
@@ -628,10 +691,11 @@
                     } else if (depth < 3) {
                         if (withinActivity && isMainActivity && isLauncherActivity) {
                             const char *aName = getComponentName(pkg, activityName);
+                            printf("launchable-activity:");
                             if (aName != NULL) {
-                                printf("launchable activity name='%s'", aName);
+                                printf(" name='%s' ", aName);
                             }
-                            printf("label='%s' icon='%s'\n",
+                            printf(" label='%s' icon='%s'\n",
                                     activityLabel.string(),
                                     activityIcon.string());
                         }
@@ -696,23 +760,51 @@
                     withinApplication = false;
                     if (tag == "application") {
                         withinApplication = true;
-                        String8 label = getResolvedAttribute(&res, tree, LABEL_ATTR, &error);
-                         if (error != "") {
-                             fprintf(stderr, "ERROR getting 'android:label' attribute: %s\n", error.string());
-                             goto bail;
+
+                        String8 label;
+                        const size_t NL = locales.size();
+                        for (size_t i=0; i<NL; i++) {
+                            const char* localeStr =  locales[i].string();
+                            assets.setLocale(localeStr != NULL ? localeStr : "");
+                            String8 llabel = getResolvedAttribute(&res, tree, LABEL_ATTR, &error);
+                            if (llabel != "") {
+                                if (localeStr == NULL || strlen(localeStr) == 0) {
+                                    label = llabel;
+                                    printf("application-label:'%s'\n", llabel.string());
+                                } else {
+                                    if (label == "") {
+                                        label = llabel;
+                                    }
+                                    printf("application-label-%s:'%s'\n", localeStr,
+                                            llabel.string());
+                                }
+                            }
                         }
-                        printf("application: label='%s' ", label.string());
+
+                        ResTable_config tmpConfig = config;
+                        const size_t ND = densities.size();
+                        for (size_t i=0; i<ND; i++) {
+                            tmpConfig.density = densities[i];
+                            assets.setConfiguration(tmpConfig);
+                            String8 icon = getResolvedAttribute(&res, tree, ICON_ATTR, &error);
+                            if (icon != "") {
+                                printf("application-icon-%d:'%s'\n", densities[i], icon.string());
+                            }
+                        }
+                        assets.setConfiguration(config);
+
                         String8 icon = getResolvedAttribute(&res, tree, ICON_ATTR, &error);
                         if (error != "") {
                             fprintf(stderr, "ERROR getting 'android:icon' attribute: %s\n", error.string());
                             goto bail;
                         }
-                        printf("icon='%s'\n", icon.string());
                         int32_t testOnly = getIntegerAttribute(tree, TEST_ONLY_ATTR, &error, 0);
                         if (error != "") {
                             fprintf(stderr, "ERROR getting 'android:testOnly' attribute: %s\n", error.string());
                             goto bail;
                         }
+                        printf("application: label='%s' ", label.string());
+                        printf("icon='%s'\n", icon.string());
                         if (testOnly != 0) {
                             printf("testOnly='%d'\n", testOnly);
                         }
@@ -792,6 +884,12 @@
                                 XLARGE_SCREEN_ATTR, NULL, 1);
                         anyDensity = getIntegerAttribute(tree,
                                 ANY_DENSITY_ATTR, NULL, 1);
+                        requiresSmallestWidthDp = getIntegerAttribute(tree,
+                                REQUIRES_SMALLEST_WIDTH_DP_ATTR, NULL, 0);
+                        compatibleWidthLimitDp = getIntegerAttribute(tree,
+                                COMPATIBLE_WIDTH_LIMIT_DP_ATTR, NULL, 0);
+                        largestWidthLimitDp = getIntegerAttribute(tree,
+                                LARGEST_WIDTH_LIMIT_DP_ATTR, NULL, 0);
                     } else if (tag == "uses-feature") {
                         String8 name = getAttribute(tree, NAME_ATTR, &error);
 
@@ -837,6 +935,10 @@
                                 // these have no corresponding permission to check for,
                                 // but should imply the foundational telephony permission
                                 reqTelephonySubFeature = true;
+                            } else if (name == "android.hardware.screen.portrait") {
+                                specScreenPortraitFeature = true;
+                            } else if (name == "android.hardware.screen.landscape") {
+                                specScreenLandscapeFeature = true;
                             }
                             printf("uses-feature%s:'%s'\n",
                                     req ? "" : "-not-required", name.string());
@@ -944,6 +1046,18 @@
                             fprintf(stderr, "ERROR getting 'android:icon' attribute: %s\n", error.string());
                             goto bail;
                         }
+
+                        int32_t orien = getResolvedIntegerAttribute(&res, tree,
+                                SCREEN_ORIENTATION_ATTR, &error);
+                        if (error == "") {
+                            if (orien == 0 || orien == 6 || orien == 8) {
+                                // Requests landscape, sensorLandscape, or reverseLandscape.
+                                reqScreenLandscapeFeature = true;
+                            } else if (orien == 1 || orien == 7 || orien == 9) {
+                                // Requests portrait, sensorPortrait, or reversePortrait.
+                                reqScreenPortraitFeature = true;
+                            }
+                        }
                     } else if (tag == "uses-library") {
                         String8 libraryName = getAttribute(tree, NAME_ATTR, &error);
                         if (error != "") {
@@ -1103,6 +1217,19 @@
                 printf("uses-feature:'android.hardware.touchscreen.multitouch'\n");
             }
 
+            // Landscape/portrait-related compatibility logic
+            if (!specScreenLandscapeFeature && !specScreenPortraitFeature) {
+                // If the app has specified any activities in its manifest
+                // that request a specific orientation, then assume that
+                // orientation is required.
+                if (reqScreenLandscapeFeature) {
+                    printf("uses-feature:'android.hardware.screen.landscape'\n");
+                }
+                if (reqScreenPortraitFeature) {
+                    printf("uses-feature:'android.hardware.screen.portrait'\n");
+                }
+            }
+
             if (hasMainActivity) {
                 printf("main\n");
             }
@@ -1128,6 +1255,34 @@
                 printf("other-services\n");
             }
 
+            // For modern apps, if screen size buckets haven't been specified
+            // but the new width ranges have, then infer the buckets from them.
+            if (smallScreen > 0 && normalScreen > 0 && largeScreen > 0 && xlargeScreen > 0
+                    && requiresSmallestWidthDp > 0) {
+                int compatWidth = compatibleWidthLimitDp;
+                if (compatWidth <= 0) compatWidth = requiresSmallestWidthDp;
+                if (requiresSmallestWidthDp <= 240 && compatWidth >= 240) {
+                    smallScreen = -1;
+                } else {
+                    smallScreen = 0;
+                }
+                if (requiresSmallestWidthDp <= 320 && compatWidth >= 320) {
+                    normalScreen = -1;
+                } else {
+                    normalScreen = 0;
+                }
+                if (requiresSmallestWidthDp <= 480 && compatWidth >= 480) {
+                    largeScreen = -1;
+                } else {
+                    largeScreen = 0;
+                }
+                if (requiresSmallestWidthDp <= 720 && compatWidth >= 720) {
+                    xlargeScreen = -1;
+                } else {
+                    xlargeScreen = 0;
+                }
+            }
+
             // Determine default values for any unspecified screen sizes,
             // based on the target SDK of the package.  As of 4 (donut)
             // the screen size support was introduced, so all default to
@@ -1146,7 +1301,8 @@
                 xlargeScreen = targetSdk >= 9 ? -1 : 0;
             }
             if (anyDensity > 0) {
-                anyDensity = targetSdk >= 4 ? -1 : 0;
+                anyDensity = (targetSdk >= 4 || requiresSmallestWidthDp > 0
+                        || compatibleWidthLimitDp > 0) ? -1 : 0;
             }
             printf("supports-screens:");
             if (smallScreen != 0) printf(" 'small'");
@@ -1154,12 +1310,18 @@
             if (largeScreen != 0) printf(" 'large'");
             if (xlargeScreen != 0) printf(" 'xlarge'");
             printf("\n");
-
             printf("supports-any-density: '%s'\n", anyDensity ? "true" : "false");
+            if (requiresSmallestWidthDp > 0) {
+                printf("requires-smallest-width:'%d'\n", requiresSmallestWidthDp);
+            }
+            if (compatibleWidthLimitDp > 0) {
+                printf("compatible-width-limit:'%d'\n", compatibleWidthLimitDp);
+            }
+            if (largestWidthLimitDp > 0) {
+                printf("largest-width-limit:'%d'\n", largestWidthLimitDp);
+            }
 
             printf("locales:");
-            Vector<String8> locales;
-            res.getLocales(&locales);
             const size_t NL = locales.size();
             for (size_t i=0; i<NL; i++) {
                 const char* localeStr =  locales[i].string();
@@ -1170,16 +1332,6 @@
             }
             printf("\n");
 
-            Vector<ResTable_config> configs;
-            res.getConfigurations(&configs);
-            SortedVector<int> densities;
-            const size_t NC = configs.size();
-            for (size_t i=0; i<NC; i++) {
-                int dens = configs[i].density;
-                if (dens == 0) dens = 160;
-                densities.add(dens);
-            }
-
             printf("densities:");
             const size_t ND = densities.size();
             for (size_t i=0; i<ND; i++) {
diff --git a/tools/aapt/ResourceTable.cpp b/tools/aapt/ResourceTable.cpp
index 68c3892..d98b285 100644
--- a/tools/aapt/ResourceTable.cpp
+++ b/tools/aapt/ResourceTable.cpp
@@ -1963,10 +1963,11 @@
                                  bool onlyPublic) const
 {
     String16 package, type, name;
+    bool refOnlyPublic = true;
     if (!ResTable::expandResourceRef(
         ref.string(), ref.size(), &package, &type, &name,
         defType, defPackage ? defPackage:&mAssetsPackage,
-        outErrorMsg)) {
+        outErrorMsg, &refOnlyPublic)) {
         NOISY(printf("Expanding resource: ref=%s\n",
                      String8(ref).string()));
         NOISY(printf("Expanding resource: defType=%s\n",
@@ -1979,7 +1980,7 @@
                      String8(name).string()));
         return 0;
     }
-    uint32_t res = getResId(package, type, name, onlyPublic);
+    uint32_t res = getResId(package, type, name, onlyPublic && refOnlyPublic);
     NOISY(printf("Expanded resource: p=%s, t=%s, n=%s, res=%d\n",
                  String8(package).string(), String8(type).string(),
                  String8(name).string(), res));
diff --git a/tools/aapt/ResourceTable.h b/tools/aapt/ResourceTable.h
index bbb8140..734c541 100644
--- a/tools/aapt/ResourceTable.h
+++ b/tools/aapt/ResourceTable.h
@@ -162,13 +162,13 @@
     uint32_t getResId(const String16& package,
                       const String16& type,
                       const String16& name,
-                      bool onlyPublic = false) const;
+                      bool onlyPublic = true) const;
 
     uint32_t getResId(const String16& ref,
                       const String16* defType = NULL,
                       const String16* defPackage = NULL,
                       const char** outErrorMsg = NULL,
-                      bool onlyPublic = false) const;
+                      bool onlyPublic = true) const;
 
     static bool isValidResourceName(const String16& s);
     
diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
index 922cd4c..8e3ed93 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
@@ -425,7 +425,7 @@
         AffineTransform matrixTx = matrixDelegate.getAffineTransform();
 
         // combine them so that the given matrix is applied after.
-        currentTx.preConcatenate(matrixTx);
+        currentTx.concatenate(matrixTx);
 
         // give it to the graphics2D as a new matrix replacing all previous transform
         snapshot.setTransform(currentTx);
@@ -717,7 +717,7 @@
     /*package*/ static void native_drawCircle(int nativeCanvas,
             float cx, float cy, float radius, int paint) {
         native_drawOval(nativeCanvas,
-                new RectF(cx - radius, cy - radius, radius*2, radius*2),
+                new RectF(cx - radius, cy - radius, radius, radius),
                 paint);
     }
 
diff --git a/tools/layoutlib/bridge/src/android/os/HandlerThread_Delegate.java b/tools/layoutlib/bridge/src/android/os/HandlerThread_Delegate.java
new file mode 100644
index 0000000..afbe97c0
--- /dev/null
+++ b/tools/layoutlib/bridge/src/android/os/HandlerThread_Delegate.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.os;
+
+import com.android.layoutlib.bridge.android.BridgeContext;
+import com.android.layoutlib.bridge.impl.RenderAction;
+import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Delegate overriding selected methods of android.os.HandlerThread
+ *
+ * Through the layoutlib_create tool, selected methods of Handler have been replaced
+ * by calls to methods of the same name in this delegate class.
+ *
+ *
+ */
+public class HandlerThread_Delegate {
+
+    private static Map<BridgeContext, List<HandlerThread>> sThreads =
+            new HashMap<BridgeContext, List<HandlerThread>>();
+
+    public static void cleanUp(BridgeContext context) {
+        List<HandlerThread> list = sThreads.get(context);
+        if (list != null) {
+            for (HandlerThread thread : list) {
+                thread.quit();
+            }
+
+            list.clear();
+            sThreads.remove(context);
+        }
+    }
+
+    // -------- Delegate methods
+
+    @LayoutlibDelegate
+    /*package*/ static void run(HandlerThread theThread) {
+        // record the thread so that it can be quit() on clean up.
+        BridgeContext context = RenderAction.getCurrentContext();
+        List<HandlerThread> list = sThreads.get(context);
+        if (list == null) {
+            list = new ArrayList<HandlerThread>();
+            sThreads.put(context, list);
+        }
+
+        list.add(theThread);
+
+        // ---- START DEFAULT IMPLEMENTATION.
+
+        theThread.mTid = Process.myTid();
+        Looper.prepare();
+        synchronized (theThread) {
+            theThread.mLooper = Looper.myLooper();
+            theThread.notifyAll();
+        }
+        Process.setThreadPriority(theThread.mPriority);
+        theThread.onLooperPrepared();
+        Looper.loop();
+        theThread.mTid = -1;
+    }
+}
diff --git a/tools/layoutlib/bridge/src/android/view/LayoutInflater_Delegate.java b/tools/layoutlib/bridge/src/android/view/LayoutInflater_Delegate.java
index 0f3cf57..3ef3288 100644
--- a/tools/layoutlib/bridge/src/android/view/LayoutInflater_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/view/LayoutInflater_Delegate.java
@@ -22,7 +22,10 @@
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 
+import android.content.res.TypedArray;
+import android.content.res.XmlResourceParser;
 import android.util.AttributeSet;
+import android.util.Xml;
 
 import java.io.IOException;
 
@@ -35,6 +38,8 @@
  */
 public class LayoutInflater_Delegate {
 
+    public static boolean sIsInInclude = false;
+
     /**
      * Recursive method used to descend down the xml hierarchy and instantiate
      * views, instantiate their children, and then call onFinishInflate().
@@ -94,4 +99,128 @@
             }
         }
     }
+
+    @LayoutlibDelegate
+    public static void parseInclude(
+            LayoutInflater thisInflater,
+            XmlPullParser parser, View parent, AttributeSet attrs)
+            throws XmlPullParserException, IOException {
+
+        int type;
+
+        if (parent instanceof ViewGroup) {
+            final int layout = attrs.getAttributeResourceValue(null, "layout", 0);
+            if (layout == 0) {
+                final String value = attrs.getAttributeValue(null, "layout");
+                if (value == null) {
+                    throw new InflateException("You must specifiy a layout in the"
+                            + " include tag: <include layout=\"@layout/layoutID\" />");
+                } else {
+                    throw new InflateException("You must specifiy a valid layout "
+                            + "reference. The layout ID " + value + " is not valid.");
+                }
+            } else {
+                final XmlResourceParser childParser =
+                    thisInflater.getContext().getResources().getLayout(layout);
+
+                try {
+                    final AttributeSet childAttrs = Xml.asAttributeSet(childParser);
+
+                    while ((type = childParser.next()) != XmlPullParser.START_TAG &&
+                            type != XmlPullParser.END_DOCUMENT) {
+                        // Empty.
+                    }
+
+                    if (type != XmlPullParser.START_TAG) {
+                        throw new InflateException(childParser.getPositionDescription() +
+                                ": No start tag found!");
+                    }
+
+                    final String childName = childParser.getName();
+
+                    if (LayoutInflater.TAG_MERGE.equals(childName)) {
+                        // Inflate all children.
+                        thisInflater.rInflate(childParser, parent, childAttrs, false);
+                    } else {
+                        final View view = thisInflater.createViewFromTag(parent, childName, childAttrs);
+                        final ViewGroup group = (ViewGroup) parent;
+
+                        // We try to load the layout params set in the <include /> tag. If
+                        // they don't exist, we will rely on the layout params set in the
+                        // included XML file.
+                        // During a layoutparams generation, a runtime exception is thrown
+                        // if either layout_width or layout_height is missing. We catch
+                        // this exception and set localParams accordingly: true means we
+                        // successfully loaded layout params from the <include /> tag,
+                        // false means we need to rely on the included layout params.
+                        ViewGroup.LayoutParams params = null;
+                        try {
+                            // ---- START CHANGES
+                            sIsInInclude = true;
+                            // ---- END CHANGES
+
+                            params = group.generateLayoutParams(attrs);
+
+                        } catch (RuntimeException e) {
+                            // ---- START CHANGES
+                            sIsInInclude = false;
+                            // ---- END CHANGES
+
+                            params = group.generateLayoutParams(childAttrs);
+                        } finally {
+                            // ---- START CHANGES
+                            sIsInInclude = false;
+                            // ---- END CHANGES
+
+                            if (params != null) {
+                                view.setLayoutParams(params);
+                            }
+                        }
+
+                        // Inflate all children.
+                        thisInflater.rInflate(childParser, view, childAttrs, true);
+
+                        // Attempt to override the included layout's android:id with the
+                        // one set on the <include /> tag itself.
+                        TypedArray a = thisInflater.mContext.obtainStyledAttributes(attrs,
+                            com.android.internal.R.styleable.View, 0, 0);
+                        int id = a.getResourceId(com.android.internal.R.styleable.View_id, View.NO_ID);
+                        // While we're at it, let's try to override android:visibility.
+                        int visibility = a.getInt(com.android.internal.R.styleable.View_visibility, -1);
+                        a.recycle();
+
+                        if (id != View.NO_ID) {
+                            view.setId(id);
+                        }
+
+                        switch (visibility) {
+                            case 0:
+                                view.setVisibility(View.VISIBLE);
+                                break;
+                            case 1:
+                                view.setVisibility(View.INVISIBLE);
+                                break;
+                            case 2:
+                                view.setVisibility(View.GONE);
+                                break;
+                        }
+
+                        group.addView(view);
+                    }
+                } finally {
+                    childParser.close();
+                }
+            }
+        } else {
+            throw new InflateException("<include /> can only be used inside of a ViewGroup");
+        }
+
+        final int currentDepth = parser.getDepth();
+        while (((type = parser.next()) != XmlPullParser.END_TAG ||
+                parser.getDepth() > currentDepth) && type != XmlPullParser.END_DOCUMENT) {
+            // Empty
+        }
+    }
+
+
 }
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
index 144ec42..3ba3257 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
@@ -196,7 +196,7 @@
                 Capability.UNBOUND_RENDERING,
                 Capability.CUSTOM_BACKGROUND_COLOR,
                 Capability.RENDER,
-                //Capability.LAYOUT_ONLY, // disable to run on ADT 10.0 which doesn't include this.
+                Capability.LAYOUT_ONLY,
                 Capability.EMBEDDED_LAYOUT,
                 Capability.VIEW_MANIPULATION,
                 Capability.PLAY_ANIMATION,
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
index e536028..47fa68e 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
@@ -25,11 +25,11 @@
 import com.android.ide.common.rendering.api.StyleResourceValue;
 import com.android.layoutlib.bridge.Bridge;
 import com.android.layoutlib.bridge.BridgeConstants;
+import com.android.layoutlib.bridge.impl.ParserFactory;
 import com.android.layoutlib.bridge.impl.Stack;
 import com.android.resources.ResourceType;
 import com.android.util.Pair;
 
-import org.kxml2.io.KXmlParser;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 
@@ -71,7 +71,6 @@
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
-import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.HashMap;
@@ -79,6 +78,8 @@
 import java.util.Map;
 import java.util.TreeMap;
 import java.util.Map.Entry;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
 
 /**
  * Custom implementation of Context/Activity to handle non compiled resources.
@@ -205,6 +206,9 @@
      * @param parser the parser to add.
      */
     public void pushParser(BridgeXmlBlockParser parser) {
+        if (ParserFactory.LOG_PARSER) {
+            System.out.println("PUSH " + parser.getParser().toString());
+        }
         mParserStack.push(parser);
     }
 
@@ -212,7 +216,10 @@
      * Removes the parser at the top of the stack
      */
     public void popParser() {
-        mParserStack.pop();
+        BridgeXmlBlockParser parser = mParserStack.pop();
+        if (ParserFactory.LOG_PARSER) {
+            System.out.println("POPD " + parser.getParser().toString());
+        }
     }
 
     /**
@@ -300,12 +307,17 @@
 
     public Pair<View, Boolean> inflateView(ResourceReference resource, ViewGroup parent,
             boolean attachToRoot, boolean skipCallbackParser) {
-        String layoutName = resource.getName();
         boolean isPlatformLayout = resource.isFramework();
 
         if (isPlatformLayout == false && skipCallbackParser == false) {
             // check if the project callback can provide us with a custom parser.
-            ILayoutPullParser parser = mProjectCallback.getParser(layoutName);
+            ILayoutPullParser parser;
+            if (resource instanceof ResourceValue) {
+                parser = mProjectCallback.getParser((ResourceValue) resource);
+            } else {
+                parser = mProjectCallback.getParser(resource.getName());
+            }
+
             if (parser != null) {
                 BridgeXmlBlockParser blockParser = new BridgeXmlBlockParser(parser,
                         this, resource.isFramework());
@@ -340,9 +352,7 @@
                 // we need to create a pull parser around the layout XML file, and then
                 // give that to our XmlBlockParser
                 try {
-                    KXmlParser parser = new KXmlParser();
-                    parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
-                    parser.setInput(new FileReader(xml));
+                    XmlPullParser parser = ParserFactory.create(xml);
 
                     // set the resource ref to have correct view cookies
                     mBridgeInflater.setResourceReference(resource);
@@ -373,7 +383,7 @@
         } else {
             Bridge.getLog().error(LayoutLog.TAG_BROKEN,
                     String.format("Layout %s%s does not exist.", isPlatformLayout ? "android:" : "",
-                            layoutName), null);
+                            resource.getName()), null);
         }
 
         return Pair.of(null, false);
@@ -508,20 +518,20 @@
             return null;
         }
 
-        boolean[] frameworkAttributes = new boolean[1];
-        TreeMap<Integer, String> styleNameMap = searchAttrs(attrs, frameworkAttributes);
+        AtomicBoolean frameworkAttributes = new AtomicBoolean();
+        AtomicReference<String> attrName = new AtomicReference<String>();
+        TreeMap<Integer, String> styleNameMap = searchAttrs(attrs, frameworkAttributes, attrName);
 
         BridgeTypedArray ta = ((BridgeResources) mSystemResources).newTypeArray(attrs.length,
-                isPlatformFile);
-
-        // resolve the defStyleAttr value into a IStyleResourceValue
-        StyleResourceValue defStyleValues = null;
+                isPlatformFile, frameworkAttributes.get(), attrName.get());
 
         // look for a custom style.
         String customStyle = null;
         if (set != null) {
             customStyle = set.getAttributeValue(null /* namespace*/, "style");
         }
+
+        StyleResourceValue customStyleValues = null;
         if (customStyle != null) {
             ResourceValue item = mRenderResources.findResValue(customStyle,
                     false /*forceFrameworkOnly*/);
@@ -530,80 +540,81 @@
             item = mRenderResources.resolveResValue(item);
 
             if (item instanceof StyleResourceValue) {
-                defStyleValues = (StyleResourceValue)item;
+                customStyleValues = (StyleResourceValue)item;
             }
         }
 
-        if (defStyleValues == null) {
-            if (defStyleAttr != 0) {
-                // get the name from the int.
-                String defStyleName = searchAttr(defStyleAttr);
+        // resolve the defStyleAttr value into a IStyleResourceValue
+        StyleResourceValue defStyleValues = null;
 
-                if (defaultPropMap != null) {
-                    defaultPropMap.put("style", defStyleName);
+        if (defStyleAttr != 0) {
+            // get the name from the int.
+            String defStyleName = searchAttr(defStyleAttr);
+
+            if (defaultPropMap != null) {
+                defaultPropMap.put("style", defStyleName);
+            }
+
+            // look for the style in the current theme, and its parent:
+            ResourceValue item = mRenderResources.findItemInTheme(defStyleName);
+
+            if (item != null) {
+                // item is a reference to a style entry. Search for it.
+                item = mRenderResources.findResValue(item.getValue(),
+                        false /*forceFrameworkOnly*/);
+
+                if (item instanceof StyleResourceValue) {
+                    defStyleValues = (StyleResourceValue)item;
                 }
+            } else {
+                Bridge.getLog().error(null,
+                        String.format(
+                                "Failed to find style '%s' in current theme", defStyleName),
+                        null /*data*/);
+            }
+        } else if (defStyleRes != 0) {
+            Pair<ResourceType, String> value = Bridge.resolveResourceId(defStyleRes);
+            if (value == null) {
+                value = mProjectCallback.resolveResourceId(defStyleRes);
+            }
 
-                // look for the style in the current theme, and its parent:
-                ResourceValue item = mRenderResources.findItemInTheme(defStyleName);
-
-                if (item != null) {
-                    // item is a reference to a style entry. Search for it.
-                    item = mRenderResources.findResValue(item.getValue(),
-                            false /*forceFrameworkOnly*/);
-
-                    if (item instanceof StyleResourceValue) {
-                        defStyleValues = (StyleResourceValue)item;
-                    }
-                } else {
-                    Bridge.getLog().error(null,
-                            String.format(
-                                    "Failed to find style '%s' in current theme", defStyleName),
-                            null /*data*/);
-                }
-            } else if (defStyleRes != 0) {
-                Pair<ResourceType, String> value = Bridge.resolveResourceId(defStyleRes);
-                if (value == null) {
-                    value = mProjectCallback.resolveResourceId(defStyleRes);
-                }
-
-                if (value != null) {
-                    if (value.getFirst() == ResourceType.STYLE) {
-                        // look for the style in the current theme, and its parent:
-                        ResourceValue item = mRenderResources.findItemInTheme(value.getSecond());
-                        if (item != null) {
-                            if (item instanceof StyleResourceValue) {
-                                if (defaultPropMap != null) {
-                                    defaultPropMap.put("style", item.getName());
-                                }
-
-                                defStyleValues = (StyleResourceValue)item;
+            if (value != null) {
+                if (value.getFirst() == ResourceType.STYLE) {
+                    // look for the style in the current theme, and its parent:
+                    ResourceValue item = mRenderResources.findItemInTheme(value.getSecond());
+                    if (item != null) {
+                        if (item instanceof StyleResourceValue) {
+                            if (defaultPropMap != null) {
+                                defaultPropMap.put("style", item.getName());
                             }
-                        } else {
-                            Bridge.getLog().error(null,
-                                    String.format(
-                                            "Style with id 0x%x (resolved to '%s') does not exist.",
-                                            defStyleRes, value.getSecond()),
-                                    null /*data*/);
+
+                            defStyleValues = (StyleResourceValue)item;
                         }
                     } else {
                         Bridge.getLog().error(null,
                                 String.format(
-                                        "Resouce id 0x%x is not of type STYLE (instead %s)",
-                                        defStyleRes, value.getFirst().toString()),
+                                        "Style with id 0x%x (resolved to '%s') does not exist.",
+                                        defStyleRes, value.getSecond()),
                                 null /*data*/);
                     }
                 } else {
                     Bridge.getLog().error(null,
                             String.format(
-                                    "Failed to find style with id 0x%x in current theme",
-                                    defStyleRes),
+                                    "Resouce id 0x%x is not of type STYLE (instead %s)",
+                                    defStyleRes, value.getFirst().toString()),
                             null /*data*/);
                 }
+            } else {
+                Bridge.getLog().error(null,
+                        String.format(
+                                "Failed to find style with id 0x%x in current theme",
+                                defStyleRes),
+                        null /*data*/);
             }
         }
 
         String namespace = BridgeConstants.NS_RESOURCES;
-        if (frameworkAttributes[0] == false) {
+        if (frameworkAttributes.get() == false) {
             // need to use the application namespace
             namespace = mProjectCallback.getNamespace();
         }
@@ -623,8 +634,13 @@
                 if (value == null) {
                     ResourceValue resValue = null;
 
-                    // look for the value in the defStyle first (and its parent if needed)
-                    if (defStyleValues != null) {
+                    // look for the value in the custom style first (and its parent if needed)
+                    if (customStyleValues != null) {
+                        resValue = mRenderResources.findItemInStyle(customStyleValues, name);
+                    }
+
+                    // then look for the value in the default Style (and its parent if needed)
+                    if (resValue == null && defStyleValues != null) {
                         resValue = mRenderResources.findItemInStyle(defStyleValues, name);
                     }
 
@@ -675,23 +691,25 @@
      */
     private BridgeTypedArray createStyleBasedTypedArray(StyleResourceValue style, int[] attrs)
             throws Resources.NotFoundException {
-        TreeMap<Integer, String> styleNameMap = searchAttrs(attrs, null);
 
         BridgeTypedArray ta = ((BridgeResources) mSystemResources).newTypeArray(attrs.length,
-                false /* platformResourceFlag */);
+                false, true, null);
 
-        // loop through all the values in the style map, and init the TypedArray with
-        // the style we got from the dynamic id
-        for (Entry<Integer, String> styleAttribute : styleNameMap.entrySet()) {
-            int index = styleAttribute.getKey().intValue();
+        // for each attribute, get its name so that we can search it in the style
+        for (int i = 0 ; i < attrs.length ; i++) {
+            Pair<ResourceType, String> resolvedResource = Bridge.resolveResourceId(attrs[i]);
+            if (resolvedResource != null) {
+                String attrName = resolvedResource.getSecond();
+                // look for the value in the given style
+                ResourceValue resValue = mRenderResources.findItemInStyle(style, attrName);
 
-            String name = styleAttribute.getValue();
+                if (resValue != null) {
+                    // resolve it to make sure there are no references left.
+                    ta.bridgeSetValue(i, attrName, mRenderResources.resolveResValue(resValue));
 
-            // get the value from the style, or its parent styles.
-            ResourceValue resValue = mRenderResources.findItemInStyle(style, name);
-
-            // resolve it to make sure there are no references left.
-            ta.bridgeSetValue(index, name, mRenderResources.resolveResValue(resValue));
+                    resValue = mRenderResources.resolveResValue(resValue);
+                }
+            }
         }
 
         ta.sealArray();
@@ -710,10 +728,13 @@
      * that is used to reference the attribute later in the TypedArray.
      *
      * @param attrs An attribute array reference given to obtainStyledAttributes.
+     * @param outFrameworkFlag out value indicating if the attr array is a framework value
+     * @param outAttrName out value for the resolved attr name.
      * @return A sorted map Attribute-Value to Attribute-Name for all attributes declared by the
      *         attribute array. Returns null if nothing is found.
      */
-    private TreeMap<Integer,String> searchAttrs(int[] attrs, boolean[] outFrameworkFlag) {
+    private TreeMap<Integer,String> searchAttrs(int[] attrs, AtomicBoolean outFrameworkFlag,
+            AtomicReference<String> outAttrName) {
         // get the name of the array from the framework resources
         String arrayName = Bridge.resolveResourceId(attrs);
         if (arrayName != null) {
@@ -730,7 +751,10 @@
             }
 
             if (outFrameworkFlag != null) {
-                outFrameworkFlag[0] = true;
+                outFrameworkFlag.set(true);
+            }
+            if (outAttrName != null) {
+                outAttrName.set(arrayName);
             }
 
             return attributes;
@@ -752,7 +776,10 @@
             }
 
             if (outFrameworkFlag != null) {
-                outFrameworkFlag[0] = false;
+                outFrameworkFlag.set(false);
+            }
+            if (outAttrName != null) {
+                outAttrName.set(arrayName);
             }
 
             return attributes;
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java
index d6bbebd..4a6393d 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java
@@ -22,10 +22,10 @@
 import com.android.ide.common.rendering.api.ResourceReference;
 import com.android.ide.common.rendering.api.ResourceValue;
 import com.android.layoutlib.bridge.Bridge;
+import com.android.layoutlib.bridge.impl.ParserFactory;
 import com.android.resources.ResourceType;
 import com.android.util.Pair;
 
-import org.kxml2.io.KXmlParser;
 import org.xmlpull.v1.XmlPullParser;
 
 import android.content.Context;
@@ -36,7 +36,6 @@
 import android.view.ViewGroup;
 
 import java.io.File;
-import java.io.FileReader;
 
 /**
  * Custom implementation of {@link LayoutInflater} to handle custom views.
@@ -175,9 +174,7 @@
                 File f = new File(value.getValue());
                 if (f.isFile()) {
                     try {
-                        KXmlParser parser = new KXmlParser();
-                        parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
-                        parser.setInput(new FileReader(f));
+                        XmlPullParser parser = ParserFactory.create(f);
 
                         BridgeXmlBlockParser bridgeParser = new BridgeXmlBlockParser(
                                 parser, bridgeContext, false);
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java
index 273e493..1756496f 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java
@@ -21,12 +21,12 @@
 import com.android.ide.common.rendering.api.ResourceValue;
 import com.android.layoutlib.bridge.Bridge;
 import com.android.layoutlib.bridge.BridgeConstants;
+import com.android.layoutlib.bridge.impl.ParserFactory;
 import com.android.layoutlib.bridge.impl.ResourceHelper;
 import com.android.ninepatch.NinePatch;
 import com.android.resources.ResourceType;
 import com.android.util.Pair;
 
-import org.kxml2.io.KXmlParser;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 
@@ -46,7 +46,6 @@
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
-import java.io.FileReader;
 import java.io.InputStream;
 
 /**
@@ -126,18 +125,22 @@
         mProjectCallback = projectCallback;
     }
 
-    public BridgeTypedArray newTypeArray(int numEntries, boolean platformFile) {
-        return new BridgeTypedArray(this, mContext, numEntries, platformFile);
+    public BridgeTypedArray newTypeArray(int numEntries, boolean platformFile,
+            boolean platformStyleable, String styleableName) {
+        return new BridgeTypedArray(this, mContext, numEntries, platformFile,
+                platformStyleable, styleableName);
     }
 
-    private ResourceValue getResourceValue(int id, boolean[] platformResFlag_out) {
+    private Pair<String, ResourceValue> getResourceValue(int id, boolean[] platformResFlag_out) {
         // first get the String related to this id in the framework
         Pair<ResourceType, String> resourceInfo = Bridge.resolveResourceId(id);
 
         if (resourceInfo != null) {
             platformResFlag_out[0] = true;
-            return mContext.getRenderResources().getFrameworkResource(
-                    resourceInfo.getFirst(), resourceInfo.getSecond());
+            String attributeName = resourceInfo.getSecond();
+
+            return Pair.of(attributeName, mContext.getRenderResources().getFrameworkResource(
+                    resourceInfo.getFirst(), attributeName));
         }
 
         // didn't find a match in the framework? look in the project.
@@ -146,8 +149,10 @@
 
             if (resourceInfo != null) {
                 platformResFlag_out[0] = false;
-                return mContext.getRenderResources().getProjectResource(
-                        resourceInfo.getFirst(), resourceInfo.getSecond());
+                String attributeName = resourceInfo.getSecond();
+
+                return Pair.of(attributeName, mContext.getRenderResources().getProjectResource(
+                        resourceInfo.getFirst(), attributeName));
             }
         }
 
@@ -156,10 +161,10 @@
 
     @Override
     public Drawable getDrawable(int id) throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> value = getResourceValue(id, mPlatformResourceFlag);
 
         if (value != null) {
-            return ResourceHelper.getDrawable(value, mContext);
+            return ResourceHelper.getDrawable(value.getSecond(), mContext);
         }
 
         // id was not found or not resolved. Throw a NotFoundException.
@@ -171,11 +176,11 @@
 
     @Override
     public int getColor(int id) throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> value = getResourceValue(id, mPlatformResourceFlag);
 
         if (value != null) {
             try {
-                return ResourceHelper.getColor(value.getValue());
+                return ResourceHelper.getColor(value.getSecond().getValue());
             } catch (NumberFormatException e) {
                 Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT, e.getMessage(), e,
                         null /*data*/);
@@ -192,10 +197,11 @@
 
     @Override
     public ColorStateList getColorStateList(int id) throws NotFoundException {
-        ResourceValue resValue = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> resValue = getResourceValue(id, mPlatformResourceFlag);
 
         if (resValue != null) {
-            ColorStateList stateList = ResourceHelper.getColorStateList(resValue, mContext);
+            ColorStateList stateList = ResourceHelper.getColorStateList(resValue.getSecond(),
+                    mContext);
             if (stateList != null) {
                 return stateList;
             }
@@ -210,10 +216,10 @@
 
     @Override
     public CharSequence getText(int id) throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> value = getResourceValue(id, mPlatformResourceFlag);
 
         if (value != null) {
-            return value.getValue();
+            return value.getSecond().getValue();
         }
 
         // id was not found or not resolved. Throw a NotFoundException.
@@ -225,15 +231,16 @@
 
     @Override
     public XmlResourceParser getLayout(int id) throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> v = getResourceValue(id, mPlatformResourceFlag);
 
-        if (value != null) {
+        if (v != null) {
+            ResourceValue value = v.getSecond();
             XmlPullParser parser = null;
 
             try {
                 // check if the current parser can provide us with a custom parser.
                 if (mPlatformResourceFlag[0] == false) {
-                    parser = mProjectCallback.getParser(value.getName());
+                    parser = mProjectCallback.getParser(value);
                 }
 
                 // create a new one manually if needed.
@@ -242,9 +249,7 @@
                     if (xml.isFile()) {
                         // we need to create a pull parser around the layout XML file, and then
                         // give that to our XmlBlockParser
-                        parser = new KXmlParser();
-                        parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
-                        parser.setInput(new FileReader(xml));
+                        parser = ParserFactory.create(xml);
                     }
                 }
 
@@ -270,9 +275,10 @@
 
     @Override
     public XmlResourceParser getAnimation(int id) throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> v = getResourceValue(id, mPlatformResourceFlag);
 
-        if (value != null) {
+        if (v != null) {
+            ResourceValue value = v.getSecond();
             XmlPullParser parser = null;
 
             try {
@@ -280,9 +286,7 @@
                 if (xml.isFile()) {
                     // we need to create a pull parser around the layout XML file, and then
                     // give that to our XmlBlockParser
-                    parser = new KXmlParser();
-                    parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
-                    parser.setInput(new FileReader(xml));
+                    parser = ParserFactory.create(xml);
 
                     return new BridgeXmlBlockParser(parser, mContext, mPlatformResourceFlag[0]);
                 }
@@ -316,10 +320,10 @@
 
     @Override
     public float getDimension(int id) throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> value = getResourceValue(id, mPlatformResourceFlag);
 
         if (value != null) {
-            String v = value.getValue();
+            String v = value.getSecond().getValue();
 
             if (v != null) {
                 if (v.equals(BridgeConstants.MATCH_PARENT) ||
@@ -329,7 +333,8 @@
                     return LayoutParams.WRAP_CONTENT;
                 }
 
-                if (ResourceHelper.stringToFloat(v, mTmpValue) &&
+                if (ResourceHelper.parseFloatAttribute(
+                        value.getFirst(), v, mTmpValue, true /*requireUnit*/) &&
                         mTmpValue.type == TypedValue.TYPE_DIMENSION) {
                     return mTmpValue.getDimension(mMetrics);
                 }
@@ -345,13 +350,14 @@
 
     @Override
     public int getDimensionPixelOffset(int id) throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> value = getResourceValue(id, mPlatformResourceFlag);
 
         if (value != null) {
-            String v = value.getValue();
+            String v = value.getSecond().getValue();
 
             if (v != null) {
-                if (ResourceHelper.stringToFloat(v, mTmpValue) &&
+                if (ResourceHelper.parseFloatAttribute(
+                        value.getFirst(), v, mTmpValue, true /*requireUnit*/) &&
                         mTmpValue.type == TypedValue.TYPE_DIMENSION) {
                     return TypedValue.complexToDimensionPixelOffset(mTmpValue.data, mMetrics);
                 }
@@ -367,13 +373,14 @@
 
     @Override
     public int getDimensionPixelSize(int id) throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> value = getResourceValue(id, mPlatformResourceFlag);
 
         if (value != null) {
-            String v = value.getValue();
+            String v = value.getSecond().getValue();
 
             if (v != null) {
-                if (ResourceHelper.stringToFloat(v, mTmpValue) &&
+                if (ResourceHelper.parseFloatAttribute(
+                        value.getFirst(), v, mTmpValue, true /*requireUnit*/) &&
                         mTmpValue.type == TypedValue.TYPE_DIMENSION) {
                     return TypedValue.complexToDimensionPixelSize(mTmpValue.data, mMetrics);
                 }
@@ -389,10 +396,10 @@
 
     @Override
     public int getInteger(int id) throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> value = getResourceValue(id, mPlatformResourceFlag);
 
-        if (value != null && value.getValue() != null) {
-            String v = value.getValue();
+        if (value != null && value.getSecond().getValue() != null) {
+            String v = value.getSecond().getValue();
             int radix = 10;
             if (v.startsWith("0x")) {
                 v = v.substring(2);
@@ -444,10 +451,10 @@
 
     @Override
     public String getString(int id) throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> value = getResourceValue(id, mPlatformResourceFlag);
 
-        if (value != null && value.getValue() != null) {
-            return value.getValue();
+        if (value != null && value.getSecond().getValue() != null) {
+            return value.getSecond().getValue();
         }
 
         // id was not found or not resolved. Throw a NotFoundException.
@@ -460,13 +467,14 @@
     @Override
     public void getValue(int id, TypedValue outValue, boolean resolveRefs)
             throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> value = getResourceValue(id, mPlatformResourceFlag);
 
         if (value != null) {
-            String v = value.getValue();
+            String v = value.getSecond().getValue();
 
             if (v != null) {
-                if (ResourceHelper.stringToFloat(v, outValue)) {
+                if (ResourceHelper.parseFloatAttribute(value.getFirst(), v, outValue,
+                        false /*requireUnit*/)) {
                     return;
                 }
 
@@ -489,19 +497,17 @@
 
     @Override
     public XmlResourceParser getXml(int id) throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> value = getResourceValue(id, mPlatformResourceFlag);
 
         if (value != null) {
-            String v = value.getValue();
+            String v = value.getSecond().getValue();
 
             if (v != null) {
                 // check this is a file
-                File f = new File(value.getValue());
+                File f = new File(v);
                 if (f.isFile()) {
                     try {
-                        KXmlParser parser = new KXmlParser();
-                        parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
-                        parser.setInput(new FileReader(f));
+                        XmlPullParser parser = ParserFactory.create(f);
 
                         return new BridgeXmlBlockParser(parser, mContext, mPlatformResourceFlag[0]);
                     } catch (XmlPullParserException e) {
@@ -534,9 +540,7 @@
 
         File f = new File(file);
         try {
-            KXmlParser parser = new KXmlParser();
-            parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
-            parser.setInput(new FileReader(f));
+            XmlPullParser parser = ParserFactory.create(f);
 
             return new BridgeXmlBlockParser(parser, mContext, mPlatformResourceFlag[0]);
         } catch (XmlPullParserException e) {
@@ -553,10 +557,10 @@
 
     @Override
     public InputStream openRawResource(int id) throws NotFoundException {
-        ResourceValue value = getResourceValue(id, mPlatformResourceFlag);
+        Pair<String, ResourceValue> value = getResourceValue(id, mPlatformResourceFlag);
 
         if (value != null) {
-            String path = value.getValue();
+            String path = value.getSecond().getValue();
 
             if (path != null) {
                 // check this is a file
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java
index b9f769f..260cdc8 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java
@@ -16,6 +16,7 @@
 
 package com.android.layoutlib.bridge.android;
 
+import com.android.ide.common.rendering.api.DeclareStyleableResourceValue;
 import com.android.ide.common.rendering.api.LayoutLog;
 import com.android.ide.common.rendering.api.RenderResources;
 import com.android.ide.common.rendering.api.ResourceValue;
@@ -23,10 +24,10 @@
 import com.android.internal.util.XmlUtils;
 import com.android.layoutlib.bridge.Bridge;
 import com.android.layoutlib.bridge.BridgeConstants;
+import com.android.layoutlib.bridge.impl.ParserFactory;
 import com.android.layoutlib.bridge.impl.ResourceHelper;
 import com.android.resources.ResourceType;
 
-import org.kxml2.io.KXmlParser;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 
@@ -36,10 +37,10 @@
 import android.graphics.drawable.Drawable;
 import android.util.DisplayMetrics;
 import android.util.TypedValue;
+import android.view.LayoutInflater_Delegate;
 import android.view.ViewGroup.LayoutParams;
 
 import java.io.File;
-import java.io.FileReader;
 import java.util.Arrays;
 import java.util.Map;
 
@@ -48,18 +49,23 @@
  */
 public final class BridgeTypedArray extends TypedArray {
 
-    private BridgeResources mBridgeResources;
-    private BridgeContext mContext;
+    private final BridgeResources mBridgeResources;
+    private final BridgeContext mContext;
+    private final boolean mPlatformFile;
+    private final boolean mPlatformStyleable;
+    private final String mStyleableName;
+
     private ResourceValue[] mResourceData;
     private String[] mNames;
-    private final boolean mPlatformFile;
 
     public BridgeTypedArray(BridgeResources resources, BridgeContext context, int len,
-            boolean platformFile) {
+            boolean platformFile, boolean platformStyleable, String styleableName) {
         super(null, null, null, 0);
         mBridgeResources = resources;
         mContext = context;
         mPlatformFile = platformFile;
+        mPlatformStyleable = platformStyleable;
+        mStyleableName = styleableName;
         mResourceData = new ResourceValue[len];
         mNames = new String[len];
     }
@@ -201,7 +207,18 @@
         // Field is not null and is not an integer.
         // Check for possible constants and try to find them.
         // Get the map of attribute-constant -> IntegerValue
-        Map<String, Integer> map = Bridge.getEnumValues(mNames[index]);
+        Map<String, Integer> map = null;
+        if (mPlatformStyleable) {
+            map = Bridge.getEnumValues(mNames[index]);
+        } else if (mStyleableName != null) {
+            // get the styleable matching the resolved name
+            RenderResources res = mContext.getRenderResources();
+            ResourceValue styleable = res.getProjectResource(ResourceType.DECLARE_STYLEABLE,
+                    mStyleableName);
+            if (styleable instanceof DeclareStyleableResourceValue) {
+                map = ((DeclareStyleableResourceValue) styleable).getAttributeValues(mNames[index]);
+            }
+        }
 
         if (map != null) {
             // accumulator to store the value of the 1+ constants.
@@ -313,9 +330,7 @@
         File f = new File(value);
         if (f.isFile()) {
             try {
-                KXmlParser parser = new KXmlParser();
-                parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
-                parser.setInput(new FileReader(f));
+                XmlPullParser parser = ParserFactory.create(f);
 
                 BridgeXmlBlockParser blockParser = new BridgeXmlBlockParser(
                         parser, mContext, resValue.isFramework());
@@ -359,26 +374,7 @@
      */
     @Override
     public int getInteger(int index, int defValue) {
-        if (mResourceData[index] == null) {
-            return defValue;
-        }
-
-        String s = mResourceData[index].getValue();
-
-        if (s != null) {
-            try {
-                return Integer.parseInt(s);
-            } catch (NumberFormatException e) {
-                Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
-                        String.format(
-                            "\"%s\" in attribute \"%2$s\" cannont be converted to an integer.",
-                            s, mNames[index]), null /*data*/);
-
-                // The default value is returned below.
-            }
-        }
-
-        return defValue;
+        return getInt(index, defValue);
     }
 
     /**
@@ -416,7 +412,7 @@
             return defValue;
         }
 
-        if (ResourceHelper.stringToFloat(s, mValue)) {
+        if (ResourceHelper.parseFloatAttribute(mNames[index], s, mValue, true /*requireUnit*/)) {
             return mValue.getDimension(mBridgeResources.mMetrics);
         }
 
@@ -471,40 +467,23 @@
      */
     @Override
     public int getDimensionPixelSize(int index, int defValue) {
-        if (mResourceData[index] == null) {
+        try {
+            return getDimension(index);
+        } catch (RuntimeException e) {
+            if (mResourceData[index] != null) {
+                String s = mResourceData[index].getValue();
+
+                if (s != null) {
+                    // looks like we were unable to resolve the dimension value
+                    Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
+                            String.format(
+                                "\"%1$s\" in attribute \"%2$s\" is not a valid format.",
+                                s, mNames[index]), null /*data*/);
+                }
+            }
+
             return defValue;
         }
-
-        String s = mResourceData[index].getValue();
-
-        if (s == null) {
-            return defValue;
-        } else if (s.equals(BridgeConstants.MATCH_PARENT) ||
-                s.equals(BridgeConstants.FILL_PARENT)) {
-            return LayoutParams.MATCH_PARENT;
-        } else if (s.equals(BridgeConstants.WRAP_CONTENT)) {
-            return LayoutParams.WRAP_CONTENT;
-        } else if (RenderResources.REFERENCE_NULL.equals(s)) {
-            return defValue;
-        }
-
-        if (ResourceHelper.stringToFloat(s, mValue)) {
-            float f = mValue.getDimension(mBridgeResources.mMetrics);
-
-            final int res = (int)(f+0.5f);
-            if (res != 0) return res;
-            if (f == 0) return 0;
-            if (f > 0) return 1;
-            return defValue; // this is basically unreachable.
-        }
-
-        // looks like we were unable to resolve the dimension value
-        Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
-                String.format(
-                    "\"%1$s\" in attribute \"%2$s\" is not a valid format.",
-                    s, mNames[index]), null /*data*/);
-
-        return defValue;
     }
 
     /**
@@ -521,7 +500,20 @@
      */
     @Override
     public int getLayoutDimension(int index, String name) {
-        return getDimensionPixelSize(index, 0);
+        try {
+            // this will throw an exception
+            return getDimension(index);
+        } catch (RuntimeException e) {
+
+            if (LayoutInflater_Delegate.sIsInInclude) {
+                throw new RuntimeException();
+            }
+
+            Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
+                    "You must supply a " + name + " attribute.", null);
+
+            return 0;
+        }
     }
 
     @Override
@@ -529,6 +521,36 @@
         return getDimensionPixelSize(index, defValue);
     }
 
+    private int getDimension(int index) {
+        if (mResourceData[index] == null) {
+            throw new RuntimeException();
+        }
+
+        String s = mResourceData[index].getValue();
+
+        if (s == null) {
+            throw new RuntimeException();
+        } else if (s.equals(BridgeConstants.MATCH_PARENT) ||
+                s.equals(BridgeConstants.FILL_PARENT)) {
+            return LayoutParams.MATCH_PARENT;
+        } else if (s.equals(BridgeConstants.WRAP_CONTENT)) {
+            return LayoutParams.WRAP_CONTENT;
+        } else if (RenderResources.REFERENCE_NULL.equals(s)) {
+            throw new RuntimeException();
+        }
+
+        if (ResourceHelper.parseFloatAttribute(mNames[index], s, mValue, true /*requireUnit*/)) {
+            float f = mValue.getDimension(mBridgeResources.mMetrics);
+
+            final int res = (int)(f+0.5f);
+            if (res != 0) return res;
+            if (f == 0) return 0;
+            if (f > 0) return 1;
+        }
+
+        throw new RuntimeException();
+    }
+
     /**
      * Retrieve a fractional unit attribute at <var>index</var>.
      *
@@ -555,14 +577,15 @@
             return defValue;
         }
 
-        if (ResourceHelper.stringToFloat(value, mValue)) {
+        if (ResourceHelper.parseFloatAttribute(mNames[index], value, mValue,
+                false /*requireUnit*/)) {
             return mValue.getFraction(base, pbase);
         }
 
         // looks like we were unable to resolve the fraction value
         Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_FORMAT,
                 String.format(
-                    "\"%1$s\" in attribute \"%2$s\" cannont be converted to a fraction.",
+                    "\"%1$s\" in attribute \"%2$s\" cannot be converted to a fraction.",
                     value, mNames[index]), null /*data*/);
 
         return defValue;
@@ -759,7 +782,8 @@
 
         String s = mResourceData[index].getValue();
 
-        return ResourceHelper.stringToFloat(s, outValue);
+        return ResourceHelper.parseFloatAttribute(mNames[index], s, outValue,
+                false /*requireUnit*/);
     }
 
     /**
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParser.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParser.java
index 70dbaa4..1016b32 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParser.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParser.java
@@ -18,6 +18,7 @@
 
 
 import com.android.ide.common.rendering.api.ILayoutPullParser;
+import com.android.layoutlib.bridge.impl.ParserFactory;
 
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
@@ -54,6 +55,10 @@
      * @param platformFile Indicates whether the the file is a platform file or not.
      */
     public BridgeXmlBlockParser(XmlPullParser parser, BridgeContext context, boolean platformFile) {
+        if (ParserFactory.LOG_PARSER) {
+            System.out.println("CRTE " + parser.toString());
+        }
+
         mParser = parser;
         mContext = context;
         mPlatformFile = platformFile;
@@ -65,6 +70,10 @@
         }
     }
 
+    public XmlPullParser getParser() {
+        return mParser;
+    }
+
     public boolean isPlatformFile() {
         return mPlatformFile;
     }
@@ -247,18 +256,63 @@
     public int next() throws XmlPullParserException, IOException {
         if (!mStarted) {
             mStarted = true;
+
+            if (ParserFactory.LOG_PARSER) {
+                System.out.println("STRT " + mParser.toString());
+            }
+
             return START_DOCUMENT;
         }
+
         int ev = mParser.next();
 
+        if (ParserFactory.LOG_PARSER) {
+            System.out.println("NEXT " + mParser.toString() + " " +
+                    eventTypeToString(mEventType) + " -> " + eventTypeToString(ev));
+        }
+
         if (ev == END_TAG && mParser.getDepth() == 1) {
             // done with parser remove it from the context stack.
             ensurePopped();
+
+            if (ParserFactory.LOG_PARSER) {
+                System.out.println("");
+            }
         }
+
         mEventType = ev;
         return ev;
     }
 
+    public static String eventTypeToString(int eventType) {
+        switch (eventType) {
+            case START_DOCUMENT:
+                return "START_DOC";
+            case END_DOCUMENT:
+                return "END_DOC";
+            case START_TAG:
+                return "START_TAG";
+            case END_TAG:
+                return "END_TAG";
+            case TEXT:
+                return "TEXT";
+            case CDSECT:
+                return "CDSECT";
+            case ENTITY_REF:
+                return "ENTITY_REF";
+            case IGNORABLE_WHITESPACE:
+                return "IGNORABLE_WHITESPACE";
+            case PROCESSING_INSTRUCTION:
+                return "PROCESSING_INSTRUCTION";
+            case COMMENT:
+                return "COMMENT";
+            case DOCDECL:
+                return "DOCDECL";
+        }
+
+        return "????";
+    }
+
     public void require(int type, String namespace, String name)
             throws XmlPullParserException {
         if (type != getEventType()
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java
index 0c4b0d3..df701d5 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java
@@ -22,11 +22,11 @@
 import com.android.layoutlib.bridge.Bridge;
 import com.android.layoutlib.bridge.android.BridgeContext;
 import com.android.layoutlib.bridge.android.BridgeXmlBlockParser;
+import com.android.layoutlib.bridge.impl.ParserFactory;
 import com.android.layoutlib.bridge.impl.ResourceHelper;
 import com.android.resources.Density;
 import com.android.resources.ResourceType;
 
-import org.kxml2.io.KXmlParser;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 
@@ -60,7 +60,7 @@
 
     protected abstract TextView getStyleableTextView();
 
-    protected CustomBar(Context context, Density density, String layoutPath)
+    protected CustomBar(Context context, Density density, String layoutPath, String name)
             throws XmlPullParserException {
         super(context);
         setOrientation(LinearLayout.HORIZONTAL);
@@ -69,11 +69,8 @@
         LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(
                 Context.LAYOUT_INFLATER_SERVICE);
 
-        KXmlParser parser = new KXmlParser();
-        parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
-        parser.setInput(
-                getClass().getResourceAsStream(layoutPath),
-                "UTF8");
+        XmlPullParser parser = ParserFactory.create(getClass().getResourceAsStream(layoutPath),
+                name);
 
         BridgeXmlBlockParser bridgeParser = new BridgeXmlBlockParser(
                 parser, (BridgeContext) context, false /*platformFile*/);
@@ -230,7 +227,8 @@
 
                 if (textSize != null) {
                     TypedValue out = new TypedValue();
-                    if (ResourceHelper.stringToFloat(textSize.getValue(), out)) {
+                    if (ResourceHelper.parseFloatAttribute("textSize", textSize.getValue(), out,
+                            true /*requireUnit*/)) {
                         textView.setTextSize(
                                 out.getDimension(bridgeContext.getResources().mMetrics));
                     }
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FakeActionBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FakeActionBar.java
index 3af4e3a..f6edea4 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FakeActionBar.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FakeActionBar.java
@@ -29,7 +29,7 @@
 
     public FakeActionBar(Context context, Density density, String label, String icon)
             throws XmlPullParserException {
-        super(context, density, "/bars/action_bar.xml");
+        super(context, density, "/bars/action_bar.xml", "action_bar.xml");
 
         // Cannot access the inside items through id because no R.id values have been
         // created for them.
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/PhoneSystemBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/PhoneSystemBar.java
index 9fab51a..5569e06 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/PhoneSystemBar.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/PhoneSystemBar.java
@@ -30,7 +30,7 @@
 public class PhoneSystemBar extends CustomBar {
 
     public PhoneSystemBar(Context context, Density density) throws XmlPullParserException {
-        super(context, density, "/bars/phone_system_bar.xml");
+        super(context, density, "/bars/phone_system_bar.xml", "phone_system_bar.xml");
 
         setGravity(mGravity | Gravity.RIGHT);
         setBackgroundColor(0xFF000000);
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TabletSystemBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TabletSystemBar.java
index 5ca68fa..456ddb4 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TabletSystemBar.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TabletSystemBar.java
@@ -29,7 +29,7 @@
 public class TabletSystemBar extends CustomBar {
 
     public TabletSystemBar(Context context, Density density) throws XmlPullParserException {
-        super(context, density, "/bars/tablet_system_bar.xml");
+        super(context, density, "/bars/tablet_system_bar.xml", "tablet_system_bar.xml");
 
         setBackgroundColor(0xFF000000);
 
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TitleBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TitleBar.java
index d7401d9..5f5ebc4 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TitleBar.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/TitleBar.java
@@ -29,7 +29,7 @@
 
     public TitleBar(Context context, Density density, String label)
             throws XmlPullParserException {
-        super(context, density, "/bars/title_bar.xml");
+        super(context, density, "/bars/title_bar.xml", "title_bar.xml");
 
         // Cannot access the inside items through id because no R.id values have been
         // created for them.
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ParserFactory.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ParserFactory.java
new file mode 100644
index 0000000..a235ec3
--- /dev/null
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ParserFactory.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.layoutlib.bridge.impl;
+
+
+import org.kxml2.io.KXmlParser;
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
+/**
+ * A factory for {@link XmlPullParser}.
+ *
+ */
+public class ParserFactory {
+
+    private final static String ENCODING = "UTF-8"; //$NON-NLS-1$
+
+    public final static boolean LOG_PARSER = false;
+
+    public static XmlPullParser create(File f)
+            throws XmlPullParserException, FileNotFoundException {
+        KXmlParser parser = instantiateParser(f.getName());
+        parser.setInput(new FileInputStream(f), ENCODING);
+        return parser;
+    }
+
+    public static XmlPullParser create(InputStream stream, String name)
+            throws XmlPullParserException {
+        KXmlParser parser = instantiateParser(name);
+        parser.setInput(stream, ENCODING);
+        return parser;
+    }
+
+    private static KXmlParser instantiateParser(String name) throws XmlPullParserException {
+        KXmlParser parser;
+        if (name != null) {
+            parser = new CustomParser(name);
+        } else {
+            parser = new KXmlParser();
+        }
+        parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
+        return parser;
+    }
+
+    private static class CustomParser extends KXmlParser {
+        private final String mName;
+
+        CustomParser(String name) {
+            super();
+            mName = name;
+        }
+
+        @Override
+        public String toString() {
+            return mName;
+        }
+    }
+}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java
index 8e80c21..6194f5d 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderAction.java
@@ -29,6 +29,7 @@
 import com.android.layoutlib.bridge.android.BridgeContext;
 import com.android.resources.ResourceType;
 
+import android.os.HandlerThread_Delegate;
 import android.util.DisplayMetrics;
 
 import java.util.concurrent.TimeUnit;
@@ -228,6 +229,10 @@
     private void tearDown() {
         // Make sure to remove static references, otherwise we could not unload the lib
         mContext.disposeResources();
+
+        // quit HandlerThread created during this session.
+        HandlerThread_Delegate.cleanUp(sCurrentContext);
+
         sCurrentContext = null;
 
         Bridge.setLog(null);
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
index b800519..aa30e29 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
@@ -984,7 +984,8 @@
                         "status_bar_height");
 
                 if (value != null) {
-                    TypedValue typedValue = ResourceHelper.getValue(value.getValue());
+                    TypedValue typedValue = ResourceHelper.getValue("status_bar_height",
+                            value.getValue(), true /*requireUnit*/);
                     if (typedValue != null) {
                         // compute the pixel value based on the display metrics
                         mStatusBarSize = (int)typedValue.getDimension(metrics);
@@ -1016,7 +1017,8 @@
 
             if (value != null) {
                 // get the numerical value, if available
-                TypedValue typedValue = ResourceHelper.getValue(value.getValue());
+                TypedValue typedValue = ResourceHelper.getValue("actionBarSize", value.getValue(),
+                        true /*requireUnit*/);
                 if (typedValue != null) {
                     // compute the pixel value based on the display metrics
                     mActionBarSize = (int)typedValue.getDimension(metrics);
@@ -1040,7 +1042,8 @@
 
                 if (value != null) {
                     // get the numerical value, if available
-                    TypedValue typedValue = ResourceHelper.getValue(value.getValue());
+                    TypedValue typedValue = ResourceHelper.getValue("windowTitleSize",
+                            value.getValue(), true /*requireUnit*/);
                     if (typedValue != null) {
                         // compute the pixel value based on the display metrics
                         mTitleBarSize = (int)typedValue.getDimension(metrics);
@@ -1062,7 +1065,8 @@
                     "status_bar_height");
 
             if (value != null) {
-                TypedValue typedValue = ResourceHelper.getValue(value.getValue());
+                TypedValue typedValue = ResourceHelper.getValue("status_bar_height",
+                        value.getValue(), true /*requireUnit*/);
                 if (typedValue != null) {
                     // compute the pixel value based on the display metrics
                     mSystemBarSize = (int)typedValue.getDimension(metrics);
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
index 96ab30f..6dcb693 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
@@ -27,7 +27,6 @@
 import com.android.ninepatch.NinePatchChunk;
 import com.android.resources.Density;
 
-import org.kxml2.io.KXmlParser;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 
@@ -44,7 +43,6 @@
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.MalformedURLException;
@@ -122,9 +120,7 @@
                 try {
                     // let the framework inflate the ColorStateList from the XML file, by
                     // providing an XmlPullParser
-                    KXmlParser parser = new KXmlParser();
-                    parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
-                    parser.setInput(new FileReader(f));
+                    XmlPullParser parser = ParserFactory.create(f);
 
                     BridgeXmlBlockParser blockParser = new BridgeXmlBlockParser(
                             parser, context, resValue.isFramework());
@@ -204,9 +200,7 @@
             if (f.isFile()) {
                 try {
                     // let the framework inflate the Drawable from the XML file.
-                    KXmlParser parser = new KXmlParser();
-                    parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
-                    parser.setInput(new FileReader(f));
+                    XmlPullParser parser = ParserFactory.create(f);
 
                     BridgeXmlBlockParser blockParser = new BridgeXmlBlockParser(
                             parser, context, value.isFramework());
@@ -342,11 +336,11 @@
     };
 
     /**
-     * Returns the raw value from the given string.
+     * Returns the raw value from the given attribute float-type value string.
      * This object is only valid until the next call on to {@link ResourceHelper}.
      */
-    public static TypedValue getValue(String s) {
-        if (stringToFloat(s, mValue)) {
+    public static TypedValue getValue(String attribute, String value, boolean requireUnit) {
+        if (parseFloatAttribute(attribute, value, mValue, requireUnit)) {
             return mValue;
         }
 
@@ -354,22 +348,27 @@
     }
 
     /**
-     * Convert the string into a {@link TypedValue}.
-     * @param s
-     * @param outValue
+     * Parse a float attribute and return the parsed value into a given TypedValue.
+     * @param attribute the name of the attribute. Can be null if <var>requireUnit</var> is false.
+     * @param value the string value of the attribute
+     * @param outValue the TypedValue to receive the parsed value
+     * @param requireUnit whether the value is expected to contain a unit.
      * @return true if success.
      */
-    public static boolean stringToFloat(String s, TypedValue outValue) {
+    public static boolean parseFloatAttribute(String attribute, String value,
+            TypedValue outValue, boolean requireUnit) {
+        assert requireUnit == false || attribute != null;
+
         // remove the space before and after
-        s = s.trim();
-        int len = s.length();
+        value = value.trim();
+        int len = value.length();
 
         if (len <= 0) {
             return false;
         }
 
         // check that there's no non ascii characters.
-        char[] buf = s.toCharArray();
+        char[] buf = value.toCharArray();
         for (int i = 0 ; i < len ; i++) {
             if (buf[i] > 255) {
                 return false;
@@ -382,7 +381,7 @@
         }
 
         // now look for the string that is after the float...
-        Matcher m = sFloatPattern.matcher(s);
+        Matcher m = sFloatPattern.matcher(value);
         if (m.matches()) {
             String f_str = m.group(1);
             String end = m.group(2);
@@ -398,45 +397,7 @@
             if (end.length() > 0 && end.charAt(0) != ' ') {
                 // Might be a unit...
                 if (parseUnit(end, outValue, sFloatOut)) {
-
-                    f *= sFloatOut[0];
-                    boolean neg = f < 0;
-                    if (neg) {
-                        f = -f;
-                    }
-                    long bits = (long)(f*(1<<23)+.5f);
-                    int radix;
-                    int shift;
-                    if ((bits&0x7fffff) == 0) {
-                        // Always use 23p0 if there is no fraction, just to make
-                        // things easier to read.
-                        radix = TypedValue.COMPLEX_RADIX_23p0;
-                        shift = 23;
-                    } else if ((bits&0xffffffffff800000L) == 0) {
-                        // Magnitude is zero -- can fit in 0 bits of precision.
-                        radix = TypedValue.COMPLEX_RADIX_0p23;
-                        shift = 0;
-                    } else if ((bits&0xffffffff80000000L) == 0) {
-                        // Magnitude can fit in 8 bits of precision.
-                        radix = TypedValue.COMPLEX_RADIX_8p15;
-                        shift = 8;
-                    } else if ((bits&0xffffff8000000000L) == 0) {
-                        // Magnitude can fit in 16 bits of precision.
-                        radix = TypedValue.COMPLEX_RADIX_16p7;
-                        shift = 16;
-                    } else {
-                        // Magnitude needs entire range, so no fractional part.
-                        radix = TypedValue.COMPLEX_RADIX_23p0;
-                        shift = 23;
-                    }
-                    int mantissa = (int)(
-                        (bits>>shift) & TypedValue.COMPLEX_MANTISSA_MASK);
-                    if (neg) {
-                        mantissa = (-mantissa) & TypedValue.COMPLEX_MANTISSA_MASK;
-                    }
-                    outValue.data |=
-                        (radix<<TypedValue.COMPLEX_RADIX_SHIFT)
-                        | (mantissa<<TypedValue.COMPLEX_MANTISSA_SHIFT);
+                    computeTypedValue(outValue, f, sFloatOut[0]);
                     return true;
                 }
                 return false;
@@ -447,8 +408,20 @@
 
             if (end.length() == 0) {
                 if (outValue != null) {
-                    outValue.type = TypedValue.TYPE_FLOAT;
-                    outValue.data = Float.floatToIntBits(f);
+                    if (requireUnit == false) {
+                        outValue.type = TypedValue.TYPE_FLOAT;
+                        outValue.data = Float.floatToIntBits(f);
+                    } else {
+                        // no unit when required? Use dp and out an error.
+                        applyUnit(sUnitNames[1], outValue, sFloatOut);
+                        computeTypedValue(outValue, f, sFloatOut[0]);
+
+                        Bridge.getLog().error(LayoutLog.TAG_RESOURCES_RESOLVE,
+                                String.format(
+                                        "Dimension \"%1$s\" in attribute \"%2$s\" is missing unit!",
+                                        value, attribute),
+                                null);
+                    }
                     return true;
                 }
             }
@@ -457,20 +430,64 @@
         return false;
     }
 
+    private static void computeTypedValue(TypedValue outValue, float value, float scale) {
+        value *= scale;
+        boolean neg = value < 0;
+        if (neg) {
+            value = -value;
+        }
+        long bits = (long)(value*(1<<23)+.5f);
+        int radix;
+        int shift;
+        if ((bits&0x7fffff) == 0) {
+            // Always use 23p0 if there is no fraction, just to make
+            // things easier to read.
+            radix = TypedValue.COMPLEX_RADIX_23p0;
+            shift = 23;
+        } else if ((bits&0xffffffffff800000L) == 0) {
+            // Magnitude is zero -- can fit in 0 bits of precision.
+            radix = TypedValue.COMPLEX_RADIX_0p23;
+            shift = 0;
+        } else if ((bits&0xffffffff80000000L) == 0) {
+            // Magnitude can fit in 8 bits of precision.
+            radix = TypedValue.COMPLEX_RADIX_8p15;
+            shift = 8;
+        } else if ((bits&0xffffff8000000000L) == 0) {
+            // Magnitude can fit in 16 bits of precision.
+            radix = TypedValue.COMPLEX_RADIX_16p7;
+            shift = 16;
+        } else {
+            // Magnitude needs entire range, so no fractional part.
+            radix = TypedValue.COMPLEX_RADIX_23p0;
+            shift = 23;
+        }
+        int mantissa = (int)(
+            (bits>>shift) & TypedValue.COMPLEX_MANTISSA_MASK);
+        if (neg) {
+            mantissa = (-mantissa) & TypedValue.COMPLEX_MANTISSA_MASK;
+        }
+        outValue.data |=
+            (radix<<TypedValue.COMPLEX_RADIX_SHIFT)
+            | (mantissa<<TypedValue.COMPLEX_MANTISSA_SHIFT);
+    }
+
     private static boolean parseUnit(String str, TypedValue outValue, float[] outScale) {
         str = str.trim();
 
         for (UnitEntry unit : sUnitNames) {
             if (unit.name.equals(str)) {
-                outValue.type = unit.type;
-                outValue.data = unit.unit << TypedValue.COMPLEX_UNIT_SHIFT;
-                outScale[0] = unit.scale;
-
+                applyUnit(unit, outValue, outScale);
                 return true;
             }
         }
 
         return false;
     }
+
+    private static void applyUnit(UnitEntry unit, TypedValue outValue, float[] outScale) {
+        outValue.type = unit.type;
+        outValue.data = unit.unit << TypedValue.COMPLEX_UNIT_SHIFT;
+        outScale[0] = unit.scale;
+    }
 }
 
diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParserTest.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParserTest.java
index 3252fb49..96436fe 100644
--- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParserTest.java
+++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParserTest.java
@@ -16,14 +16,11 @@
 
 package com.android.layoutlib.bridge.android;
 
-import com.android.layoutlib.bridge.android.BridgeXmlBlockParser;
+import com.android.layoutlib.bridge.impl.ParserFactory;
 
-import org.kxml2.io.KXmlParser;
 import org.w3c.dom.Node;
 import org.xmlpull.v1.XmlPullParser;
 
-import java.io.InputStream;
-
 import junit.framework.TestCase;
 
 public class BridgeXmlBlockParserTest extends TestCase {
@@ -39,12 +36,12 @@
     }
 
     public void testXmlBlockParser() throws Exception {
-        XmlPullParser parser = new KXmlParser();
-        parser = new BridgeXmlBlockParser(parser, null, false /* platformResourceFlag */);
 
-        InputStream input = this.getClass().getClassLoader().getResourceAsStream(
-            "com/android/layoutlib/testdata/layout1.xml");
-        parser.setInput(input, null /*encoding*/);
+        XmlPullParser parser = ParserFactory.create(
+                getClass().getResourceAsStream("com/android/layoutlib/testdata/layout1.xml"),
+                        "layout1.xml");
+
+        parser = new BridgeXmlBlockParser(parser, null, false /* platformResourceFlag */);
 
         assertEquals(XmlPullParser.START_DOCUMENT, parser.next());
 
diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
index eff6bbc..5c60318 100644
--- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
+++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/CreateInfo.java
@@ -99,8 +99,10 @@
         "android.content.res.Resources$Theme#resolveAttribute",
         "android.graphics.BitmapFactory#finishDecode",
         "android.os.Handler#sendMessageAtTime",
+        "android.os.HandlerThread#run",
         "android.os.Build#getString",
         "android.view.LayoutInflater#rInflate",
+        "android.view.LayoutInflater#parseInclude",
         "android.view.View#isInEditMode",
         "com.android.internal.util.XmlUtils#convertValueToInt",
         // TODO: comment out once DelegateClass is working