Merge "update action bar guide for support lib ABC" into jb-mr2-dev
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 6487c92..697bde9 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -1358,4 +1358,16 @@
         }
         return timeOutMs;
     }
+
+    /**
+     * Get the carrier provisioning url.
+     * {@hide}
+     */
+    public String getMobileProvisioningUrl() {
+        try {
+            return mService.getMobileProvisioningUrl();
+        } catch (RemoteException e) {
+        }
+        return null;
+    }
 }
diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl
index 3dbe078..4600c1a 100644
--- a/core/java/android/net/IConnectivityManager.aidl
+++ b/core/java/android/net/IConnectivityManager.aidl
@@ -134,4 +134,6 @@
     int findConnectionTypeForIface(in String iface);
 
     int checkMobileProvisioning(boolean sendNotification, int suggestedTimeOutMs, in ResultReceiver resultReceiver);
+
+    String getMobileProvisioningUrl();
 }
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 4aa540a..4bff536 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -2384,6 +2384,12 @@
             </intent-filter>
         </receiver>
 
+        <receiver android:name="com.android.server.updates.CarrierProvisioningUrlsInstallReceiver" >
+            <intent-filter>
+                <action android:name="android.intent.action.UPDATE_CARRIER_PROVISIONING_URLS" />
+            </intent-filter>
+        </receiver>
+
         <receiver android:name="com.android.server.updates.TZInfoInstallReceiver" >
             <intent-filter>
                 <action android:name="android.intent.action.UPDATE_TZINFO" />
diff --git a/data/sounds/AudioPackage11.mk b/data/sounds/AudioPackage11.mk
index e16a92d..2897b04 100644
--- a/data/sounds/AudioPackage11.mk
+++ b/data/sounds/AudioPackage11.mk
@@ -43,7 +43,7 @@
 	$(LOCAL_PATH)/notifications/ogg/Spica.ogg:system/media/audio/notifications/Spica.ogg \
 	$(LOCAL_PATH)/notifications/ogg/Syrma.ogg:system/media/audio/notifications/Syrma.ogg \
 	$(LOCAL_PATH)/notifications/ogg/Talitha.ogg:system/media/audio/notifications/Talitha.ogg \
-	$(LOCAL_PATH)/notifications/ogg/Tejat.ogg:system/media/audio/notifications/Tejat.ogg \
+	$(LOCAL_PATH)/notifications/ogg/Tejat_proc48.ogg:system/media/audio/notifications/Tejat.ogg \
 	$(LOCAL_PATH)/notifications/ogg/Vega.ogg:system/media/audio/notifications/Vega.ogg \
 	$(LOCAL_PATH)/ringtones/ogg/Andromeda.ogg:system/media/audio/ringtones/Andromeda.ogg \
 	$(LOCAL_PATH)/ringtones/ogg/Aquila.ogg:system/media/audio/ringtones/Aquila.ogg \
diff --git a/data/sounds/notifications/ogg/Tejat_proc48.ogg b/data/sounds/notifications/ogg/Tejat_proc48.ogg
new file mode 100644
index 0000000..b1637d7
--- /dev/null
+++ b/data/sounds/notifications/ogg/Tejat_proc48.ogg
Binary files differ
diff --git a/data/sounds/notifications/wav/Deneb_processed_48kHz.wav b/data/sounds/notifications/wav/Deneb_processed_48kHz.wav
new file mode 100644
index 0000000..e2df8e9
--- /dev/null
+++ b/data/sounds/notifications/wav/Deneb_processed_48kHz.wav
Binary files differ
diff --git a/docs/html/about/versions/android-4.3.jd b/docs/html/about/versions/android-4.3.jd
index 0ca3bc6..d0ccfbe 100644
--- a/docs/html/about/versions/android-4.3.jd
+++ b/docs/html/about/versions/android-4.3.jd
@@ -7,7 +7,7 @@
 
 <div id="qv-wrapper">
 <div id="qv">
-  
+
 <h2>In this document
     <a href="#" onclick="hideNestedItems('#toc43',this);return false;" class="header-toggle">
         <span class="more">show more</span>
@@ -62,7 +62,6 @@
   </li>
   <li><a href="#UserInput">User Input</a>
     <ol>
-      <li><a href="#SignificantMotion">Detect significant motion</a></li>
       <li><a href="#Sensors">New sensor types</a></li>
     </ol>
   </li>
@@ -133,7 +132,7 @@
 Then build your apps against the Android {@sdkPlatformVersion} platform to begin using the
 latest APIs.</p>
 
-  
+
 <h3 id="ApiLevel">Update your target API level</h3>
 
 <p>To better optimize your app for devices running Android {@sdkPlatformVersion},
@@ -145,7 +144,7 @@
 <p>You can use APIs in Android {@sdkPlatformVersion} while also supporting older versions by adding
 conditions to your code that check for the system API level before executing
 APIs not supported by your <a
-href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a>. 
+href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code minSdkVersion}</a>.
 To learn more about maintaining backward compatibility, read <a
 href="{@docRoot}training/basics/supporting-devices/platforms.html">Supporting Different
 Platform Versions</a>.</p>
@@ -172,11 +171,11 @@
 
 <p>Your app might misbehave in a restricted profile environment.</p>
 
-<p>Users in a <a href="#RestrictedProfiles">restricted profile</a> environment might not 
-have all the standard Android apps available. For example, a restricted profile might have the 
-web browser and camera app disabled. So your app should not make assumptions about which apps are 
-available, because if you call {@link android.app.Activity#startActivity startActivity()} without 
-verifying whether an app is available to handle the {@link android.content.Intent}, 
+<p>Users in a <a href="#RestrictedProfiles">restricted profile</a> environment might not
+have all the standard Android apps available. For example, a restricted profile might have the
+web browser and camera app disabled. So your app should not make assumptions about which apps are
+available, because if you call {@link android.app.Activity#startActivity startActivity()} without
+verifying whether an app is available to handle the {@link android.content.Intent},
 your app might crash in a restricted profile.</p>
 
 <p>When using an implicit intent, you should always verify that an app is available to handle the intent by calling {@link android.content.Intent#resolveActivity resolveActivity()} or {@link android.content.pm.PackageManager#queryIntentActivities queryIntentActivities()}. For example:</p>
@@ -197,20 +196,20 @@
 <p>Your app might misbehave in a restricted profile environment.</p>
 
 <p>Users within a restricted profile environment do not have access to user accounts by default.
-If your app depends on an {@link android.accounts.Account}, then your app might crash or behave 
+If your app depends on an {@link android.accounts.Account}, then your app might crash or behave
 unexpectedly when used in a restricted profile.</p>
 
 <p>If you'd like to prevent restricted profiles from using your app entirely because your
-app depends on account information that's sensitive, specify the <a 
-href="{@docRoot}guide/topics/manifest/application-element.html#requiredAccountType">{@code 
-android:requiredAccountType}</a> attribute in your manifest's <a 
-href="{@docRoot}guide/topics/manifest/application-element.html">{@code &lt;application>}</a> 
+app depends on account information that's sensitive, specify the <a
+href="{@docRoot}guide/topics/manifest/application-element.html#requiredAccountType">{@code
+android:requiredAccountType}</a> attribute in your manifest's <a
+href="{@docRoot}guide/topics/manifest/application-element.html">{@code &lt;application>}</a>
 element.</p>
 
-<p>If you’d like to allow restricted profiles to continue using your app even though they can’t 
-create their own accounts, then you can either disable your app features that require an account 
+<p>If you’d like to allow restricted profiles to continue using your app even though they can’t
+create their own accounts, then you can either disable your app features that require an account
 or allow restricted profiles to access the accounts created by the primary user. For more
-information, see the section 
+information, see the section
 below about <a href="#AccountsInProfile">Supporting accounts in a restricted profile</a>.</p>
 
 
@@ -218,67 +217,67 @@
 
 <h2 id="RestrictedProfiles">Restricted Profiles</h2>
 
-<p>On Android tablets, users can now create restricted profiles based on the primary user. 
+<p>On Android tablets, users can now create restricted profiles based on the primary user.
 When users create a restricted profile, they can enable restrictions such as which apps are
 available to the profile. A new set of APIs in Android 4.3 also allow you to build fine-grain
-restriction settings for the apps you develop. For example, by using the new APIs, you can 
-allow users to control what type of content is available within your app when running in a 
+restriction settings for the apps you develop. For example, by using the new APIs, you can
+allow users to control what type of content is available within your app when running in a
 restricted profile environment.</p>
 
-<p>The UI for users to control the restrictions you've built is managed by the system's 
+<p>The UI for users to control the restrictions you've built is managed by the system's
 Settings application. To make your app's restriction settings appear to the user,
-you must declare the restrictions your app provides by creating a {@link 
-android.content.BroadcastReceiver} that receives the {@link android.content.Intent#ACTION_GET_RESTRICTION_ENTRIES} intent. The system invokes this intent to query 
-all apps for available restrictions, then builds the UI to allow the primary user to 
+you must declare the restrictions your app provides by creating a {@link
+android.content.BroadcastReceiver} that receives the {@link android.content.Intent#ACTION_GET_RESTRICTION_ENTRIES} intent. The system invokes this intent to query
+all apps for available restrictions, then builds the UI to allow the primary user to
 manage restrictions for each restricted profile. </p>
 
-<p>In the {@link android.content.BroadcastReceiver#onReceive onReceive()} method of 
-your {@link android.content.BroadcastReceiver}, you must create a {@link 
-android.content.RestrictionEntry} for each restriction your app provides. Each {@link 
-android.content.RestrictionEntry} defines a restriction title, description, and one of the 
+<p>In the {@link android.content.BroadcastReceiver#onReceive onReceive()} method of
+your {@link android.content.BroadcastReceiver}, you must create a {@link
+android.content.RestrictionEntry} for each restriction your app provides. Each {@link
+android.content.RestrictionEntry} defines a restriction title, description, and one of the
 following data types:</p>
 
 <ul>
-  <li>{@link android.content.RestrictionEntry#TYPE_BOOLEAN} for a restriction that is 
+  <li>{@link android.content.RestrictionEntry#TYPE_BOOLEAN} for a restriction that is
   either true or false.
-  <li>{@link android.content.RestrictionEntry#TYPE_CHOICE} for a restriction that has 
+  <li>{@link android.content.RestrictionEntry#TYPE_CHOICE} for a restriction that has
   multiple choices that are mutually exclusive (radio button choices).
-  <li>{@link android.content.RestrictionEntry#TYPE_MULTI_SELECT} for a restriction that 
+  <li>{@link android.content.RestrictionEntry#TYPE_MULTI_SELECT} for a restriction that
   has multiple choices that are <em>not</em> mutually exclusive (checkbox choices).
 </ul>
 
-<p>You then put all the {@link android.content.RestrictionEntry} objects into an {@link 
-java.util.ArrayList} and put it into the broadcast receiver's result as the value for the 
+<p>You then put all the {@link android.content.RestrictionEntry} objects into an {@link
+java.util.ArrayList} and put it into the broadcast receiver's result as the value for the
 {@link android.content.Intent#EXTRA_RESTRICTIONS_LIST} extra.</p>
 
-<p>The system creates the UI for your app's restrictions in the Settings app and saves each 
-restriction with the unique key you provided for each {@link android.content.RestrictionEntry} 
-object. When the user opens your app, you can query for any current restrictions by 
-calling {@link android.os.UserManager#getApplicationRestrictions getApplicationRestrictions()}. 
+<p>The system creates the UI for your app's restrictions in the Settings app and saves each
+restriction with the unique key you provided for each {@link android.content.RestrictionEntry}
+object. When the user opens your app, you can query for any current restrictions by
+calling {@link android.os.UserManager#getApplicationRestrictions getApplicationRestrictions()}.
 This returns a {@link android.os.Bundle} containing the key-value pairs for each restriction
 you defined with the {@link android.content.RestrictionEntry} objects.</p>
 
-<p>If you want to provide more specific restrictions that can't be handled by boolean, single 
-choice, and multi-choice values, then you can create an activity where the user can specify the 
-restrictions and allow users to open that activity from the restriction settings. In your 
-broadcast receiver, include the {@link android.content.Intent#EXTRA_RESTRICTIONS_INTENT} extra 
+<p>If you want to provide more specific restrictions that can't be handled by boolean, single
+choice, and multi-choice values, then you can create an activity where the user can specify the
+restrictions and allow users to open that activity from the restriction settings. In your
+broadcast receiver, include the {@link android.content.Intent#EXTRA_RESTRICTIONS_INTENT} extra
 in the result {@link android.os.Bundle}. This extra must specify an {@link android.content.Intent}
-indicating the {@link android.app.Activity} class to launch (use the 
-{@link android.os.Bundle#putParcelable putParcelable()} method to pass {@link 
+indicating the {@link android.app.Activity} class to launch (use the
+{@link android.os.Bundle#putParcelable putParcelable()} method to pass {@link
 android.content.Intent#EXTRA_RESTRICTIONS_INTENT} with the intent).
-When the primary user enters your activity to set custom restrictions, your 
-activity must then return a result containing the restriction values in an extra using either 
-the {@link android.content.Intent#EXTRA_RESTRICTIONS_LIST} or {@link 
+When the primary user enters your activity to set custom restrictions, your
+activity must then return a result containing the restriction values in an extra using either
+the {@link android.content.Intent#EXTRA_RESTRICTIONS_LIST} or {@link
 android.content.Intent#EXTRA_RESTRICTIONS_BUNDLE} key, depending on whether you specify
 {@link android.content.RestrictionEntry} objects or key-value pairs, respectively.</p>
 
 
 <h3 id="AccountsInProfile">Supporting accounts in a restricted profile</h3>
 
-<p>Any accounts added to the primary user are available to a restricted profile, but the 
-accounts are not accessible from the {@link android.accounts.AccountManager} APIs by default. 
+<p>Any accounts added to the primary user are available to a restricted profile, but the
+accounts are not accessible from the {@link android.accounts.AccountManager} APIs by default.
 If you attempt to add an account with {@link android.accounts.AccountManager} while in a restricted
-profile, you will get a failure result. Due to these restrictions, you have the following 
+profile, you will get a failure result. Due to these restrictions, you have the following
 three options:</p>
 
 <li><strong>Allow access to the owner’s accounts from a restricted profile.</strong>
@@ -289,21 +288,25 @@
     android:restrictedAccountType="com.example.account.type" >
 </pre>
 
-<p class="caution"><strong>Caution:</strong> Enabling this attribute provides your 
-app access to the primary user's accounts from restricted profiles. So you should allow this 
+<p class="caution"><strong>Caution:</strong> Enabling this attribute provides your
+app access to the primary user's accounts from restricted profiles. So you should allow this
 only if the information displayed by your app does not reveal personally identifiable
-information (PII) that’s considered sensitive.</p>
+information (PII) that’s considered sensitive. The system settings will inform the primary
+user that your app grants restricted profiles to their accounts, so it should be clear to the user
+that account access is important for your app's functionality. If possible, you should also
+provide adequate restriction controls for the primary user that define how much account access
+is allowed in your app.</p>
 </li>
 
 
 <li><strong>Disable certain functionality when unable to modify accounts.</strong>
-<p>If you want to use accounts, but don’t actually require them for your app’s primary 
-functionality, you can check for account availability and disable features when not available. 
-You should first check if there is an existing account available. If not, then query whether 
-it’s possible to create a new account by calling {@link 
-android.os.UserManager#getUserRestrictions()} and check the {@link 
-android.os.UserManager#DISALLOW_MODIFY_ACCOUNTS} extra in the result. If it is {@code true}, 
-then you should disable whatever functionality of your app requires access to accounts. 
+<p>If you want to use accounts, but don’t actually require them for your app’s primary
+functionality, you can check for account availability and disable features when not available.
+You should first check if there is an existing account available. If not, then query whether
+it’s possible to create a new account by calling {@link
+android.os.UserManager#getUserRestrictions()} and check the {@link
+android.os.UserManager#DISALLOW_MODIFY_ACCOUNTS} extra in the result. If it is {@code true},
+then you should disable whatever functionality of your app requires access to accounts.
 For example:</p>
 <pre>
 UserManager um = (UserManager) context.getSystemService(Context.USER_SERVICE);
@@ -312,15 +315,15 @@
    // cannot add accounts, disable some functionality
 }
 </pre>
-<p class="note"><strong>Note:</strong> In this scenario, you should <em>not</em> declare 
+<p class="note"><strong>Note:</strong> In this scenario, you should <em>not</em> declare
 any new attributes in your manifest file.</p>
 </li>
 
 <li><strong>Disable your app when unable to access private accounts.</strong>
-<p>If it’s instead important that your app not be available to restricted profiles because 
-your app depends on sensitive personal information in an account (and because restricted profiles 
+<p>If it’s instead important that your app not be available to restricted profiles because
+your app depends on sensitive personal information in an account (and because restricted profiles
 currently cannot add new accounts), add
-the <a href="{@docRoot}guide/topics/manifest/application-element.html#requiredAccountType">{@code 
+the <a href="{@docRoot}guide/topics/manifest/application-element.html#requiredAccountType">{@code
 android:requiredAccountType}</a> attribute to the <a
 href="{@docRoot}guide/topics/manifest/application-element.html">&lt;application></a> tag:</p>
 <pre>
@@ -338,11 +341,11 @@
 
 <h3 id="BTLE">Bluetooth Low Energy (Smart Ready)</h3>
 
-<p>Android now supports Bluetooth Low Energy (LE) with new APIs in {@link android.bluetooth}. 
-With the new APIs, you can build Android apps that communicate with Bluetooth Low Energy 
+<p>Android now supports Bluetooth Low Energy (LE) with new APIs in {@link android.bluetooth}.
+With the new APIs, you can build Android apps that communicate with Bluetooth Low Energy
 peripherals such as heart rate monitors and pedometers.</p>
 
-<p>Because Bluetooth LE is a hardware feature that is not available on all 
+<p>Because Bluetooth LE is a hardware feature that is not available on all
 Android-powered devices, you must declare in your manifest file a <a
 href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code &lt;uses-feature>}</a>
 element for {@code "android.hardware.bluetooth_le"}:</p>
@@ -350,11 +353,11 @@
 &lt;uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />
 </pre>
 
-<p>If you're already familiar with Android's Classic Bluetooth APIs, notice that using the 
-Bluetooth LE APIs has some differences. Most importantly is that there's now a {@link 
-android.bluetooth.BluetoothManager} class that you should use for some high level operations 
-such as acquiring a {@link android.bluetooth.BluetoothAdapter}, getting a list of connected 
-devices, and checking the state of a device. For example, here's how you should now get the 
+<p>If you're already familiar with Android's Classic Bluetooth APIs, notice that using the
+Bluetooth LE APIs has some differences. Most importantly is that there's now a {@link
+android.bluetooth.BluetoothManager} class that you should use for some high level operations
+such as acquiring a {@link android.bluetooth.BluetoothAdapter}, getting a list of connected
+devices, and checking the state of a device. For example, here's how you should now get the
 {@link android.bluetooth.BluetoothAdapter}:</p>
 <pre>
 final BluetoothManager bluetoothManager =
@@ -362,32 +365,32 @@
 mBluetoothAdapter = bluetoothManager.getAdapter();
 </pre>
 
-<p>To discover Bluetooth LE peripherals, call {@link android.bluetooth.BluetoothAdapter#startLeScan 
-startLeScan()} on the {@link android.bluetooth.BluetoothAdapter}, passing it an implementation 
-of the {@link android.bluetooth.BluetoothAdapter.LeScanCallback} interface. When the Bluetooth 
-adapter detects a Bluetooth LE peripheral, your {@link 
-android.bluetooth.BluetoothAdapter.LeScanCallback} implementation receives a call to the 
-{@link android.bluetooth.BluetoothAdapter.LeScanCallback#onLeScan onLeScan()} method. This 
-method provides you with a {@link android.bluetooth.BluetoothDevice} object representing the 
-detected device, the RSSI value for the device, and a byte array containing the device's 
+<p>To discover Bluetooth LE peripherals, call {@link android.bluetooth.BluetoothAdapter#startLeScan
+startLeScan()} on the {@link android.bluetooth.BluetoothAdapter}, passing it an implementation
+of the {@link android.bluetooth.BluetoothAdapter.LeScanCallback} interface. When the Bluetooth
+adapter detects a Bluetooth LE peripheral, your {@link
+android.bluetooth.BluetoothAdapter.LeScanCallback} implementation receives a call to the
+{@link android.bluetooth.BluetoothAdapter.LeScanCallback#onLeScan onLeScan()} method. This
+method provides you with a {@link android.bluetooth.BluetoothDevice} object representing the
+detected device, the RSSI value for the device, and a byte array containing the device's
 advertisement record.</p>
 
-<p>If you want to scan for only specific types of peripherals, you can instead call {@link 
-android.bluetooth.BluetoothAdapter#startLeScan startLeScan()} and include an array of {@link 
+<p>If you want to scan for only specific types of peripherals, you can instead call {@link
+android.bluetooth.BluetoothAdapter#startLeScan startLeScan()} and include an array of {@link
 java.util.UUID} objects that specify the GATT services your app supports.</p>
 
-<p class="note"><strong>Note:</strong> You can only scan for Bluetooth LE devices <em>or</em> 
-scan for Classic Bluetooth devices using previous APIs. You cannot scan for both LE and Classic 
+<p class="note"><strong>Note:</strong> You can only scan for Bluetooth LE devices <em>or</em>
+scan for Classic Bluetooth devices using previous APIs. You cannot scan for both LE and Classic
 Bluetooth devices at once.</p>
 
-<p>To then connect to a Bluetooth LE peripheral, call {@link 
-android.bluetooth.BluetoothDevice#connectGatt connectGatt()} on the corresponding 
-{@link android.bluetooth.BluetoothDevice} object, passing it an implementation of 
-{@link android.bluetooth.BluetoothGattCallback}. Your implementation of {@link 
-android.bluetooth.BluetoothGattCallback} receives callbacks regarding the connectivity 
-state with the device and other events. It's during the {@link 
-android.bluetooth.BluetoothGattCallback#onConnectionStateChange onConnectionStateChange()} 
-callback that you can begin communicating with the device if the method passes {@link 
+<p>To then connect to a Bluetooth LE peripheral, call {@link
+android.bluetooth.BluetoothDevice#connectGatt connectGatt()} on the corresponding
+{@link android.bluetooth.BluetoothDevice} object, passing it an implementation of
+{@link android.bluetooth.BluetoothGattCallback}. Your implementation of {@link
+android.bluetooth.BluetoothGattCallback} receives callbacks regarding the connectivity
+state with the device and other events. It's during the {@link
+android.bluetooth.BluetoothGattCallback#onConnectionStateChange onConnectionStateChange()}
+callback that you can begin communicating with the device if the method passes {@link
 android.bluetooth.BluetoothProfile#STATE_CONNECTED} as the new state.</p>
 
 <p>Accessing Bluetooth features on a device also requires that your app request certain
@@ -397,39 +400,39 @@
 
 <h3 id="WiFiScan">Wi-Fi scan-only mode</h3>
 
-<p>When attempting to identify the user's location, Android may use Wi-Fi to help determine 
-the location by scanning nearby access points. However, users often keep Wi-Fi turned off to 
-conserve battery, resulting in location data that's less accurate. Android now includes a 
-scan-only mode that allows the device Wi-Fi to scan access points to help obtain the location 
+<p>When attempting to identify the user's location, Android may use Wi-Fi to help determine
+the location by scanning nearby access points. However, users often keep Wi-Fi turned off to
+conserve battery, resulting in location data that's less accurate. Android now includes a
+scan-only mode that allows the device Wi-Fi to scan access points to help obtain the location
 without connecting to an access point, thus greatly reducing battery usage.</p>
 
-<p>If you want to acquire the user's location but Wi-Fi is currently off, you can request the 
-user to enable Wi-Fi scan-only mode by calling {@link android.content.Context#startActivity 
-startActivity()} with the action {@link 
+<p>If you want to acquire the user's location but Wi-Fi is currently off, you can request the
+user to enable Wi-Fi scan-only mode by calling {@link android.content.Context#startActivity
+startActivity()} with the action {@link
 android.net.wifi.WifiManager#ACTION_REQUEST_SCAN_ALWAYS_AVAILABLE}.</p>
 
 
 <h3 id="WiFiConfig">Wi-Fi configuration</h3>
 
-<p>New {@link android.net.wifi.WifiEnterpriseConfig} APIs allow enterprise-oriented services to 
+<p>New {@link android.net.wifi.WifiEnterpriseConfig} APIs allow enterprise-oriented services to
 automate Wi-Fi configuration for managed devices.</p>
 
 
 <h3 id="QuickResponse">Quick response for incoming calls</h3>
 
-<p>Since Android 4.0, a feature called "Quick response" allows users to respond to incoming 
-calls with an immediate text message without needing to pick up the call or unlock the device. 
-Until now, these quick messages were always handled by the default Messaging app. Now any app 
-can declare its capability to handle these messages by creating a {@link android.app.Service} 
+<p>Since Android 4.0, a feature called "Quick response" allows users to respond to incoming
+calls with an immediate text message without needing to pick up the call or unlock the device.
+Until now, these quick messages were always handled by the default Messaging app. Now any app
+can declare its capability to handle these messages by creating a {@link android.app.Service}
 with an intent filter for {@link android.telephony.TelephonyManager#ACTION_RESPOND_VIA_MESSAGE}.</p>
 
-<p>When the user responds to an incoming call with a quick response, the Phone app sends 
-the {@link android.telephony.TelephonyManager#ACTION_RESPOND_VIA_MESSAGE} intent with a URI 
-describing the recipient (the caller) and the {@link android.content.Intent#EXTRA_TEXT} extra 
-with the message the user wants to send. When your service receives the intent, it should deliver 
+<p>When the user responds to an incoming call with a quick response, the Phone app sends
+the {@link android.telephony.TelephonyManager#ACTION_RESPOND_VIA_MESSAGE} intent with a URI
+describing the recipient (the caller) and the {@link android.content.Intent#EXTRA_TEXT} extra
+with the message the user wants to send. When your service receives the intent, it should deliver
 the message and immediately stop itself (your app should not show an activity).</p>
 
-<p>In order to receive this intent, you must declare the {@link 
+<p>In order to receive this intent, you must declare the {@link
 android.Manifest.permission#SEND_RESPOND_VIA_MESSAGE} permission.</p>
 
 
@@ -438,120 +441,120 @@
 
 <h3 id="DASH">MPEG DASH support</h3>
 
-<p>Android now supports Dynamic Adaptive Streaming over HTTP (DASH) in accordance with the 
-ISO/IEC 23009-1 standard, using existing APIs in {@link android.media.MediaCodec} and {@link 
-android.media.MediaExtractor}. The framework underlying these APIs has been updated to support 
-parsing of fragmented MP4 files, but your app is still responsible for parsing the MPD metadata 
+<p>Android now supports Dynamic Adaptive Streaming over HTTP (DASH) in accordance with the
+ISO/IEC 23009-1 standard, using existing APIs in {@link android.media.MediaCodec} and {@link
+android.media.MediaExtractor}. The framework underlying these APIs has been updated to support
+parsing of fragmented MP4 files, but your app is still responsible for parsing the MPD metadata
 and passing the individual streams to {@link android.media.MediaExtractor}.</p>
 
-<p>If you want to use DASH with encrypted content, notice that the {@link android.media.MediaExtractor#getSampleCryptoInfo getSampleCryptoInfo()} method returns the {@link 
-android.media.MediaCodec.CryptoInfo} metadata describing the structure of each encrypted media 
-sample. Also, the {@link android.media.MediaExtractor#getPsshInfo()} method has been added to 
-{@link android.media.MediaExtractor} so you can access the PSSH metadata for your DASH media. 
-This method returns a map of {@link java.util.UUID} objects to bytes, with the 
-{@link java.util.UUID} specifying the crypto scheme, and the bytes being the data specific 
+<p>If you want to use DASH with encrypted content, notice that the {@link android.media.MediaExtractor#getSampleCryptoInfo getSampleCryptoInfo()} method returns the {@link
+android.media.MediaCodec.CryptoInfo} metadata describing the structure of each encrypted media
+sample. Also, the {@link android.media.MediaExtractor#getPsshInfo()} method has been added to
+{@link android.media.MediaExtractor} so you can access the PSSH metadata for your DASH media.
+This method returns a map of {@link java.util.UUID} objects to bytes, with the
+{@link java.util.UUID} specifying the crypto scheme, and the bytes being the data specific
 to that scheme.</p>
 
 
 <h3 id="DRM">Media DRM</h3>
 
 <p>The new {@link android.media.MediaDrm} class provides a modular solution for digital rights
-management (DRM) with your media content by separating DRM concerns from media playback. For 
-instance, this API separation allows you to play back Widevine-encrypted content without having 
-to use the Widevine media format. This DRM solution also supports DASH Common Encryption so you 
+management (DRM) with your media content by separating DRM concerns from media playback. For
+instance, this API separation allows you to play back Widevine-encrypted content without having
+to use the Widevine media format. This DRM solution also supports DASH Common Encryption so you
 can use a variety of DRM schemes with your streaming content.</p>
 
-<p>You can use {@link android.media.MediaDrm} to obtain opaque key-request messages and process 
-key-response messages from the server for license acquisition and provisioning. Your app is 
-responsible for handling the network communication with the servers; the {@link 
+<p>You can use {@link android.media.MediaDrm} to obtain opaque key-request messages and process
+key-response messages from the server for license acquisition and provisioning. Your app is
+responsible for handling the network communication with the servers; the {@link
 android.media.MediaDrm} class provides only the ability to generate and process the messages.</p>
 
-<p>The {@link android.media.MediaDrm} APIs are  intended to be used in conjunction with the 
-{@link android.media.MediaCodec} APIs that were introduced in Android 4.1 (API level 16), 
-including {@link android.media.MediaCodec} for encoding and decoding your content, {@link 
-android.media.MediaCrypto} for handling encrypted content, and {@link android.media.MediaExtractor} 
+<p>The {@link android.media.MediaDrm} APIs are  intended to be used in conjunction with the
+{@link android.media.MediaCodec} APIs that were introduced in Android 4.1 (API level 16),
+including {@link android.media.MediaCodec} for encoding and decoding your content, {@link
+android.media.MediaCrypto} for handling encrypted content, and {@link android.media.MediaExtractor}
 for extracting and demuxing your content.</p>
 
-<p>You must first construct {@link android.media.MediaExtractor} and 
-{@link android.media.MediaCodec} objects. You can then access the DRM-scheme-identifying 
-{@link java.util.UUID}, typically from metadata in the content, and use it to construct an 
+<p>You must first construct {@link android.media.MediaExtractor} and
+{@link android.media.MediaCodec} objects. You can then access the DRM-scheme-identifying
+{@link java.util.UUID}, typically from metadata in the content, and use it to construct an
 instance of a {@link android.media.MediaDrm} object with its constructor.</p>
 
 
 <h3 id="EncodingSurface">Video encoding from a Surface</h3>
 
-<p>Android 4.1 (API level 16) added the {@link android.media.MediaCodec} class for low-level 
-encoding and decoding of media content. When encoding video, Android 4.1 required that you provide 
-the media with a {@link java.nio.ByteBuffer} array, but Android 4.3 now allows you to use a {@link 
-android.view.Surface} as the input to an encoder. For instance, this allows you to encode input 
+<p>Android 4.1 (API level 16) added the {@link android.media.MediaCodec} class for low-level
+encoding and decoding of media content. When encoding video, Android 4.1 required that you provide
+the media with a {@link java.nio.ByteBuffer} array, but Android 4.3 now allows you to use a {@link
+android.view.Surface} as the input to an encoder. For instance, this allows you to encode input
 from an existing video file or using frames generated from OpenGL ES.</p>
 
-<p>To use a {@link android.view.Surface} as the input to your encoder, first call {@link 
-android.media.MediaCodec#configure configure()} for your {@link android.media.MediaCodec}. 
-Then call {@link android.media.MediaCodec#createInputSurface()} to receive the {@link 
+<p>To use a {@link android.view.Surface} as the input to your encoder, first call {@link
+android.media.MediaCodec#configure configure()} for your {@link android.media.MediaCodec}.
+Then call {@link android.media.MediaCodec#createInputSurface()} to receive the {@link
 android.view.Surface} upon which you can stream your media.</p>
 
-<p>For example, you can use the given {@link android.view.Surface} as the window for an OpenGL 
-context by passing it to {@link android.opengl.EGL14#eglCreateWindowSurface 
-eglCreateWindowSurface()}. Then while rendering the surface, call {@link 
-android.opengl.EGL14#eglSwapBuffers eglSwapBuffers()} to pass the frame to the {@link 
+<p>For example, you can use the given {@link android.view.Surface} as the window for an OpenGL
+context by passing it to {@link android.opengl.EGL14#eglCreateWindowSurface
+eglCreateWindowSurface()}. Then while rendering the surface, call {@link
+android.opengl.EGL14#eglSwapBuffers eglSwapBuffers()} to pass the frame to the {@link
 android.media.MediaCodec}.</p>
 
-<p>To begin encoding, call {@link android.media.MediaCodec#start()} on the {@link 
-android.media.MediaCodec}. When done, call {@link android.media.MediaCodec#signalEndOfInputStream} 
-to terminate encoding, and call {@link android.view.Surface#release()} on the 
+<p>To begin encoding, call {@link android.media.MediaCodec#start()} on the {@link
+android.media.MediaCodec}. When done, call {@link android.media.MediaCodec#signalEndOfInputStream}
+to terminate encoding, and call {@link android.view.Surface#release()} on the
 {@link android.view.Surface}.</p>
 
 
 <h3 id="MediaMuxing">Media muxing</h3>
 
-<p>The new {@link android.media.MediaMuxer} class enables multiplexing between one audio stream 
-and one video stream. These APIs serve as a counterpart to the {@link android.media.MediaExtractor} 
+<p>The new {@link android.media.MediaMuxer} class enables multiplexing between one audio stream
+and one video stream. These APIs serve as a counterpart to the {@link android.media.MediaExtractor}
 class added in Android 4.2 for de-multiplexing (demuxing) media.</p>
 
-<p>Supported output formats are defined in {@link android.media.MediaMuxer.OutputFormat}. Currently, 
-MP4 is the only supported output format and {@link android.media.MediaMuxer} currently supports 
+<p>Supported output formats are defined in {@link android.media.MediaMuxer.OutputFormat}. Currently,
+MP4 is the only supported output format and {@link android.media.MediaMuxer} currently supports
 only one audio stream and/or one video stream at a time.</p>
 
-<p>{@link android.media.MediaMuxer} is mostly designed to work with {@link android.media.MediaCodec} 
-so you can perform video processing through {@link android.media.MediaCodec} then save the 
-output to an MP4 file through {@link android.media.MediaMuxer}. You can also use {@link 
-android.media.MediaMuxer} in combination with {@link android.media.MediaExtractor} to perform 
+<p>{@link android.media.MediaMuxer} is mostly designed to work with {@link android.media.MediaCodec}
+so you can perform video processing through {@link android.media.MediaCodec} then save the
+output to an MP4 file through {@link android.media.MediaMuxer}. You can also use {@link
+android.media.MediaMuxer} in combination with {@link android.media.MediaExtractor} to perform
 media editing without the need to encode or decode.</p>
 
 
 <h3 id="ProgressAndScrubbing">Playback progress and scrubbing for RemoteControlClient</h3>
 
-<p>In Android 4.0 (API level 14), the {@link android.media.RemoteControlClient} was added to 
-enable media playback controls from remote control clients such as the controls available on the 
-lock screen. Android 4.3 now provides the ability for such controllers to display the playback 
-position and controls for scrubbing the playback. If you've enabled remote control for your 
-media app with the {@link android.media.RemoteControlClient} APIs, then you can allow playback 
+<p>In Android 4.0 (API level 14), the {@link android.media.RemoteControlClient} was added to
+enable media playback controls from remote control clients such as the controls available on the
+lock screen. Android 4.3 now provides the ability for such controllers to display the playback
+position and controls for scrubbing the playback. If you've enabled remote control for your
+media app with the {@link android.media.RemoteControlClient} APIs, then you can allow playback
 scrubbing by implementing two new interfaces.</p>
 
-<p>First, you must enable the {@link 
-android.media.RemoteControlClient#FLAG_KEY_MEDIA_POSITION_UPDATE} flag by passing it to 
-{@link android.media.RemoteControlClient#setTransportControlFlags setTransportControlsFlags()}.</p> 
+<p>First, you must enable the {@link
+android.media.RemoteControlClient#FLAG_KEY_MEDIA_POSITION_UPDATE} flag by passing it to
+{@link android.media.RemoteControlClient#setTransportControlFlags setTransportControlsFlags()}.</p>
 
 <p>Then implement the following two new interfaces:</p>
 <dl>
   <dt>{@link android.media.RemoteControlClient.OnGetPlaybackPositionListener}</dt>
-  <dd>This includes the callback {@link android.media.RemoteControlClient.OnGetPlaybackPositionListener#onGetPlaybackPosition}, which requests the current position 
+  <dd>This includes the callback {@link android.media.RemoteControlClient.OnGetPlaybackPositionListener#onGetPlaybackPosition}, which requests the current position
   of your media when the remote control needs to update the progress in its UI.</dd>
 
   <dt>{@link android.media.RemoteControlClient.OnPlaybackPositionUpdateListener}</dt>
-  <dd>This includes the callback {@link android.media.RemoteControlClient.OnPlaybackPositionUpdateListener#onPlaybackPositionUpdate onPlaybackPositionUpdate()}, which 
-  tells your app the new time code for your media when the user scrubs the playback with the 
+  <dd>This includes the callback {@link android.media.RemoteControlClient.OnPlaybackPositionUpdateListener#onPlaybackPositionUpdate onPlaybackPositionUpdate()}, which
+  tells your app the new time code for your media when the user scrubs the playback with the
   remote control UI.
-    <p>Once you update your playback with the new position, call {@link 
-    android.media.RemoteControlClient#setPlaybackState setPlaybackState()} to indicate the 
+    <p>Once you update your playback with the new position, call {@link
+    android.media.RemoteControlClient#setPlaybackState setPlaybackState()} to indicate the
     new playback state, position, and speed.</p>
   </dd>
 </dl>
 
-<p>With these interfaces defined, you can set them for your {@link 
-android.media.RemoteControlClient} by calling {@link android.media.RemoteControlClient#setOnGetPlaybackPositionListener setOnGetPlaybackPositionListener()} and 
-{@link android.media.RemoteControlClient#setPlaybackPositionUpdateListener 
+<p>With these interfaces defined, you can set them for your {@link
+android.media.RemoteControlClient} by calling {@link android.media.RemoteControlClient#setOnGetPlaybackPositionListener setOnGetPlaybackPositionListener()} and
+{@link android.media.RemoteControlClient#setPlaybackPositionUpdateListener
 setPlaybackPositionUpdateListener()}, respectively.</p>
 
 
@@ -560,7 +563,7 @@
 
 <h3 id="OpenGL">Support for OpenGL ES 3.0</h3>
 
-<p>Android 4.3 adds Java interfaces and native support for OpenGL ES 3.0. Key new functionality 
+<p>Android 4.3 adds Java interfaces and native support for OpenGL ES 3.0. Key new functionality
 provided in OpenGL ES 3.0 includes:</p>
 <ul>
   <li>Acceleration of advanced visual effects</li>
@@ -570,8 +573,8 @@
   <li>Broader standardization of texture size and render-buffer formats</li>
 </ul>
 
-<p>The Java interface for OpenGL ES 3.0 on Android is provided with {@link android.opengl.GLES30}. 
-When using OpenGL ES 3.0, be sure that you declare it in your manifest file with the 
+<p>The Java interface for OpenGL ES 3.0 on Android is provided with {@link android.opengl.GLES30}.
+When using OpenGL ES 3.0, be sure that you declare it in your manifest file with the
 <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">&lt;uses-feature></a>
 tag and the {@code android:glEsVersion} attribute. For example:</p>
 <pre>
@@ -586,16 +589,16 @@
 
 <h3 id="MipMap">Mipmapping for drawables</h3>
 
-<p>Using a mipmap as the source for your bitmap or drawable is a simple way to provide a 
-quality image and various image scales, which can be particularly useful if you expect your 
+<p>Using a mipmap as the source for your bitmap or drawable is a simple way to provide a
+quality image and various image scales, which can be particularly useful if you expect your
 image to be scaled during an animation.</p>
 
-<p>Android 4.2 (API level 17) added support for mipmaps in the {@link android.graphics.Bitmap} 
-class&mdash;Android swaps the mip images in your {@link android.graphics.Bitmap} when you've 
-supplied a mipmap source and have enabled {@link android.graphics.Bitmap#setHasMipMap 
-setHasMipMap()}. Now in Android 4.3, you can enable mipmaps for a {@link 
-android.graphics.drawable.BitmapDrawable} object as well, by providing a mipmap asset and 
-setting the {@code android:mipMap} attribute in a bitmap resource file or by calling {@link 
+<p>Android 4.2 (API level 17) added support for mipmaps in the {@link android.graphics.Bitmap}
+class&mdash;Android swaps the mip images in your {@link android.graphics.Bitmap} when you've
+supplied a mipmap source and have enabled {@link android.graphics.Bitmap#setHasMipMap
+setHasMipMap()}. Now in Android 4.3, you can enable mipmaps for a {@link
+android.graphics.drawable.BitmapDrawable} object as well, by providing a mipmap asset and
+setting the {@code android:mipMap} attribute in a bitmap resource file or by calling {@link
 android.graphics.drawable.BitmapDrawable#hasMipMap hasMipMap()}.
 </p>
 
@@ -605,36 +608,36 @@
 
 <h3 id="ViewOverlay">View overlays</h3>
 
-<p>The new {@link android.view.ViewOverlay} class provides a transparent layer on top of 
-a {@link android.view.View} on which you can add visual content and which does not affect 
-the layout hierarchy. You can get a {@link android.view.ViewOverlay} for any {@link 
-android.view.View} by calling {@link android.view.View#getOverlay}. The overlay 
-always has the same size and position as its host view (the view from which it was created), 
-allowing you to add content that appears in front of the host view, but which cannot extend 
+<p>The new {@link android.view.ViewOverlay} class provides a transparent layer on top of
+a {@link android.view.View} on which you can add visual content and which does not affect
+the layout hierarchy. You can get a {@link android.view.ViewOverlay} for any {@link
+android.view.View} by calling {@link android.view.View#getOverlay}. The overlay
+always has the same size and position as its host view (the view from which it was created),
+allowing you to add content that appears in front of the host view, but which cannot extend
 the bounds of that host view.
 </p>
 
-<p>Using a {@link android.view.ViewOverlay} is particularly useful when you want to create 
-animations such as sliding a view outside of its container or moving items around the screen 
-without affecting the view hierarchy. However, because the usable area of an overlay is 
-restricted to the same area as its host view, if you want to animate a view moving outside 
-its position in the layout, you must use an overlay from a parent view that has the desired 
+<p>Using a {@link android.view.ViewOverlay} is particularly useful when you want to create
+animations such as sliding a view outside of its container or moving items around the screen
+without affecting the view hierarchy. However, because the usable area of an overlay is
+restricted to the same area as its host view, if you want to animate a view moving outside
+its position in the layout, you must use an overlay from a parent view that has the desired
 layout bounds.</p>
 
-<p>When you create an overlay for a widget view such as a {@link android.widget.Button}, you 
-can add {@link android.graphics.drawable.Drawable} objects to the overlay by calling 
-{@link android.view.ViewOverlay#add(Drawable)}. If you call {@link 
+<p>When you create an overlay for a widget view such as a {@link android.widget.Button}, you
+can add {@link android.graphics.drawable.Drawable} objects to the overlay by calling
+{@link android.view.ViewOverlay#add(Drawable)}. If you call {@link
 android.view.ViewGroup#getOverlay} for a layout view, such as {@link android.widget.RelativeLayout},
 the object returned is a {@link android.view.ViewGroupOverlay}. The
-{@link android.view.ViewGroupOverlay} class is a subclass 
-of {@link android.view.ViewOverlay} that  also allows you to add {@link android.view.View} 
+{@link android.view.ViewGroupOverlay} class is a subclass
+of {@link android.view.ViewOverlay} that  also allows you to add {@link android.view.View}
 objects by calling {@link android.view.ViewGroupOverlay#add(View)}.
 </p>
 
-<p class="note"><strong>Note:</strong> All drawables and views that you add to an overlay 
+<p class="note"><strong>Note:</strong> All drawables and views that you add to an overlay
 are visual only. They cannot receive focus or input events.</p>
 
-<p>For example, the following code animates a view sliding to the right by placing the view 
+<p>For example, the following code animates a view sliding to the right by placing the view
 in the parent view's overlay, then performing a translation animation on that view:</p>
 <pre>
 View view = findViewById(R.id.view_to_remove);
@@ -647,17 +650,17 @@
 
 <h3 id="OpticalBounds">Optical bounds layout</h3>
 
-<p>For views that contain nine-patch background images, you can now specify that they should 
-be aligned with neighboring views based on the "optical" bounds of the background image rather 
+<p>For views that contain nine-patch background images, you can now specify that they should
+be aligned with neighboring views based on the "optical" bounds of the background image rather
 than the "clip" bounds of the view.</p>
 
-<p>For example, figures 1 and 2 each show the same layout, but the version in figure 1 is 
-using clip bounds (the default behavior), while figure 2 is using optical bounds. Because the 
-nine-patch images used for the button and the photo frame include padding around the edges, 
+<p>For example, figures 1 and 2 each show the same layout, but the version in figure 1 is
+using clip bounds (the default behavior), while figure 2 is using optical bounds. Because the
+nine-patch images used for the button and the photo frame include padding around the edges,
 they don’t appear to align with each other or the text when using clip bounds.</p>
 
-<p class="note"><strong>Note:</strong> The screenshot in figures 1 and 2 have the "Show 
-layout bounds" developer setting enabled. For each view, red lines indicate the optical 
+<p class="note"><strong>Note:</strong> The screenshot in figures 1 and 2 have the "Show
+layout bounds" developer setting enabled. For each view, red lines indicate the optical
 bounds, blue lines indicate the clip bounds, and pink indicates margins.</p>
 
 <script type="text/javascript">
@@ -725,30 +728,30 @@
 </p>
 </div>
 
-<p>For this to work, the nine-patch images applied to the background of your views must specify 
-the optical bounds using red lines along the bottom and right-side of the nine-patch file (as 
-shown in figure 3). The red lines indicate the region that should be subtracted from 
+<p>For this to work, the nine-patch images applied to the background of your views must specify
+the optical bounds using red lines along the bottom and right-side of the nine-patch file (as
+shown in figure 3). The red lines indicate the region that should be subtracted from
 the clip bounds, leaving the optical bounds of the image.</p>
 
-<p>When you enable optical bounds for a {@link android.view.ViewGroup} in your layout, all 
-descendant views inherit the optical bounds layout mode unless you override it for a group by 
-setting {@code android:layoutMode} to {@code "clipBounds"}. All layout elements also honor the 
-optical bounds of their child views, adapting their own bounds based on the optical bounds of 
-the views within them. However, layout elements (subclasses of {@link android.view.ViewGroup}) 
+<p>When you enable optical bounds for a {@link android.view.ViewGroup} in your layout, all
+descendant views inherit the optical bounds layout mode unless you override it for a group by
+setting {@code android:layoutMode} to {@code "clipBounds"}. All layout elements also honor the
+optical bounds of their child views, adapting their own bounds based on the optical bounds of
+the views within them. However, layout elements (subclasses of {@link android.view.ViewGroup})
 currently do not support optical bounds for nine-patch images applied to their own background.</p>
 
 <p>If you create a custom view by subclassing {@link android.view.View}, {@link android.view.ViewGroup}, or any subclasses thereof, your view will inherit these optical bound behaviors.</p>
 
 <p class="note"><strong>Note:</strong> All widgets supported by the Holo theme have been updated
-with optical bounds, including {@link android.widget.Button},  {@link android.widget.Spinner}, 
+with optical bounds, including {@link android.widget.Button},  {@link android.widget.Spinner},
 {@link android.widget.EditText}, and others. So you can immediately benefit by setting the
-{@code android:layoutMode} attribute to {@code "opticalBounds"} if your app applies a Holo theme 
-({@link android.R.style#Theme_Holo Theme.Holo}, {@link android.R.style#Theme_Holo_Light 
+{@code android:layoutMode} attribute to {@code "opticalBounds"} if your app applies a Holo theme
+({@link android.R.style#Theme_Holo Theme.Holo}, {@link android.R.style#Theme_Holo_Light
 Theme.Holo.Light}, etc.).
 </p>
 
-<p>To specify optical bounds for your own nine-patch images with the <a 
-href="{@docRoot}tools/help/draw9patch.html">Draw 9-patch</a> tool, hold CTRL when clicking on 
+<p>To specify optical bounds for your own nine-patch images with the <a
+href="{@docRoot}tools/help/draw9patch.html">Draw 9-patch</a> tool, hold CTRL when clicking on
 the border pixels.</p>
 
 
@@ -756,59 +759,59 @@
 
 <h3 id="AnimationRect">Animation for Rect values</h3>
 
-<p>You can now animate between two {@link android.graphics.Rect} values with the new {@link 
-android.animation.RectEvaluator}. This new class is an implementation of {@link 
-android.animation.TypeEvaluator} that you can pass to {@link 
+<p>You can now animate between two {@link android.graphics.Rect} values with the new {@link
+android.animation.RectEvaluator}. This new class is an implementation of {@link
+android.animation.TypeEvaluator} that you can pass to {@link
 android.animation.ValueAnimator#setEvaluator ValueAnimator.setEvaluator()}.
 </p>
 
 <h3 id="AttachFocus">Window attach and focus listener</h3>
 
-<p>Previously, if you wanted to listen for when your view attached/detached to the window or 
-when its focus changed, you needed to override the {@link android.view.View} class to 
-implement {@link android.view.View#onAttachedToWindow onAttachedToWindow()} and {@link 
-android.view.View#onDetachedFromWindow onDetachedFromWindow()}, or  {@link 
+<p>Previously, if you wanted to listen for when your view attached/detached to the window or
+when its focus changed, you needed to override the {@link android.view.View} class to
+implement {@link android.view.View#onAttachedToWindow onAttachedToWindow()} and {@link
+android.view.View#onDetachedFromWindow onDetachedFromWindow()}, or  {@link
 android.view.View#onWindowFocusChanged onWindowFocusChanged()}, respectively.
 </p>
 
-<p>Now, to receive attach and detach events you can instead implement {@link 
-android.view.ViewTreeObserver.OnWindowAttachListener} and set it on a view with 
-{@link android.view.ViewTreeObserver#addOnWindowAttachListener addOnWindowAttachListener()}. 
-And to receive focus events, you can implement {@link 
-android.view.ViewTreeObserver.OnWindowFocusChangeListener} and set it on a view with 
-{@link android.view.ViewTreeObserver#addOnWindowFocusChangeListener 
+<p>Now, to receive attach and detach events you can instead implement {@link
+android.view.ViewTreeObserver.OnWindowAttachListener} and set it on a view with
+{@link android.view.ViewTreeObserver#addOnWindowAttachListener addOnWindowAttachListener()}.
+And to receive focus events, you can implement {@link
+android.view.ViewTreeObserver.OnWindowFocusChangeListener} and set it on a view with
+{@link android.view.ViewTreeObserver#addOnWindowFocusChangeListener
 addOnWindowFocusChangeListener()}.
 </p>
 
 
 <h3 id="Overscan">TV overscan support</h3>
 
-<p>To be sure your app fills the entire screen on every television, you can now enable overscan 
-for you app layout. Overscan mode is determined by the {@link android.view.WindowManager.LayoutParams#FLAG_LAYOUT_IN_OVERSCAN} flag, which you can enable with platform themes such as 
-{@link android.R.style#Theme_DeviceDefault_NoActionBar_Overscan} or by enabling the 
+<p>To be sure your app fills the entire screen on every television, you can now enable overscan
+for you app layout. Overscan mode is determined by the {@link android.view.WindowManager.LayoutParams#FLAG_LAYOUT_IN_OVERSCAN} flag, which you can enable with platform themes such as
+{@link android.R.style#Theme_DeviceDefault_NoActionBar_Overscan} or by enabling the
 {@link android.R.attr#windowOverscan} style in a custom theme.</p>
 
 
 <h3 id="Orientation">Screen orientation</h3>
 
-<p>The <a 
+<p>The <a
 href="{@docRoot}guide/topics/manifest/activity-element.html">{@code &lt;activity>}</a>
-tag's <a 
+tag's <a
 href="{@docRoot}guide/topics/manifest/activity-element.html#screen">{@code screenOrientation}</a>
 attribute now supports additional values to honor the user's preference for auto-rotation:</p>
 <dl>
 <dt>{@code "userLandscape"}</dt>
-<dd>Behaves the same as {@code "sensorLandscape"}, except if the user disables auto-rotate 
+<dd>Behaves the same as {@code "sensorLandscape"}, except if the user disables auto-rotate
 then it locks in the normal landscape orientation and will not flip.
 </dd>
 
 <dt>{@code "userPortrait"}</dt>
-<dd>Behaves the same as {@code "sensorPortrait"}, except if the user disables auto-rotate then 
+<dd>Behaves the same as {@code "sensorPortrait"}, except if the user disables auto-rotate then
 it locks in the normal portrait orientation and will not flip.
 </dd>
 
 <dt>{@code "fullUser"}</dt>
-<dd>Behaves the same as {@code "fullSensor"} and allows rotation in all four directions, except 
+<dd>Behaves the same as {@code "fullSensor"} and allows rotation in all four directions, except
 if the user disables auto-rotate then it locks in the user's preferred orientation.
 </dd></dl>
 
@@ -818,8 +821,8 @@
 
 <h3 id="RotationAnimation">Rotation animations</h3>
 
-<p>The new {@link android.view.WindowManager.LayoutParams#rotationAnimation} field in 
-{@link android.view.WindowManager} allows you to select between one of three animations you 
+<p>The new {@link android.view.WindowManager.LayoutParams#rotationAnimation} field in
+{@link android.view.WindowManager} allows you to select between one of three animations you
 want to use when the system switches screen orientations. The three animations are:</p>
 <ul>
   <li>{@link android.view.WindowManager.LayoutParams#ROTATION_ANIMATION_CROSSFADE}</li>
@@ -844,25 +847,17 @@
 
 <h2 id="UserInput">User Input</h2>
 
-<h3 id="SignificantMotion">Detect significant motion</h3>
-
-<p>The {@link android.hardware.SensorManager} APIs now allow you to request a callback when the 
-device sensors detect "significant motion." For instance, this event may be triggered by new 
-motion such as when the user starts to walk.</p>
-
-<p>To register a listener for significant motion, extend the {@link android.hardware.TriggerEventListener} class and implement the {@link android.hardware.TriggerEventListener#onTrigger onTrigger()} callback method. Then register your event listener with the {@link android.hardware.SensorManager} by passing it to {@link android.hardware.SensorManager#requestTriggerSensor requestTriggerSensor()}, passing it your {@link android.hardware.TriggerEventListener} and {@link android.hardware.Sensor#TYPE_SIGNIFICANT_MOTION}.</p>
-
 <h3 id="Sensors">New sensor types</h3>
 <p>The new {@link android.hardware.Sensor#TYPE_GAME_ROTATION_VECTOR} sensor allows you to detect the device's rotations without worrying about magnetic interferences. Unlike the {@link android.hardware.Sensor#TYPE_ROTATION_VECTOR} sensor, the {@link android.hardware.Sensor#TYPE_GAME_ROTATION_VECTOR} is not based on magnetic north.</p>
 
-<p>The new {@link android.hardware.Sensor#TYPE_GYROSCOPE_UNCALIBRATED} and {@link 
-android.hardware.Sensor#TYPE_MAGNETIC_FIELD_UNCALIBRATED} sensors provide raw sensor data without 
-consideration for bias estimations. That is, the existing {@link 
-android.hardware.Sensor#TYPE_GYROSCOPE} and {@link android.hardware.Sensor#TYPE_MAGNETIC_FIELD} 
-sensors provide sensor data that takes into account estimated bias from gyro-drift and hard iron 
-in the device, respectively. Whereas the new "uncalibrated" versions of these sensors instead provide 
-the raw sensor data and offer the estimated bias values separately. These sensors allow you to 
-provide your own custom calibration for the sensor data by enhancing the estimated bias with 
+<p>The new {@link android.hardware.Sensor#TYPE_GYROSCOPE_UNCALIBRATED} and {@link
+android.hardware.Sensor#TYPE_MAGNETIC_FIELD_UNCALIBRATED} sensors provide raw sensor data without
+consideration for bias estimations. That is, the existing {@link
+android.hardware.Sensor#TYPE_GYROSCOPE} and {@link android.hardware.Sensor#TYPE_MAGNETIC_FIELD}
+sensors provide sensor data that takes into account estimated bias from gyro-drift and hard iron
+in the device, respectively. Whereas the new "uncalibrated" versions of these sensors instead provide
+the raw sensor data and offer the estimated bias values separately. These sensors allow you to
+provide your own custom calibration for the sensor data by enhancing the estimated bias with
 external data.</p>
 
 
@@ -891,13 +886,13 @@
 
 <p>To track which contacts have been deleted, the new table {@link android.provider.ContactsContract.DeletedContacts} provides a log of contacts that have been deleted (but each contact deleted is held in this table for a limited time). Similar to {@link android.provider.ContactsContract.ContactsColumns#CONTACT_LAST_UPDATED_TIMESTAMP}, you can use the new selection parameter, {@link android.provider.ContactsContract.DeletedContacts#CONTACT_DELETED_TIMESTAMP} to check which contacts have been deleted since the last time you queried the provider. The table also contains the constant {@link android.provider.ContactsContract.DeletedContacts#DAYS_KEPT_MILLISECONDS} containing the number of days (in milliseconds) that the log will be kept.</p>
 
-<p>Additionally, the Contacts Provider now broadcasts the {@link 
-android.provider.ContactsContract.Intents#CONTACTS_DATABASE_CREATED} action when the user 
-clears the contacts storage through the system settings menu, effectively recreating the 
-Contacts Provider database. It’s intended to signal apps that they need to drop all the contact 
+<p>Additionally, the Contacts Provider now broadcasts the {@link
+android.provider.ContactsContract.Intents#CONTACTS_DATABASE_CREATED} action when the user
+clears the contacts storage through the system settings menu, effectively recreating the
+Contacts Provider database. It’s intended to signal apps that they need to drop all the contact
 information they’ve stored and reload it with a new query.</p>
 
-<p>For sample code using these APIs to check for changes to the contacts, look in the ApiDemos 
+<p>For sample code using these APIs to check for changes to the contacts, look in the ApiDemos
 sample available in the <a href="{@docRoot}tools/samples/index.html">SDK Samples</a> download.</p>
 
 
@@ -905,13 +900,13 @@
 
 <h3 id="BiDi">Improved support for bi-directional text</h3>
 
-<p>Previous versions of Android support right-to-left (RTL) languages and layout, 
-but sometimes don't properly handle mixed-direction text. So Android 4.3 adds the {@link 
-android.text.BidiFormatter} APIs that help you properly format text with opposite-direction 
+<p>Previous versions of Android support right-to-left (RTL) languages and layout,
+but sometimes don't properly handle mixed-direction text. So Android 4.3 adds the {@link
+android.text.BidiFormatter} APIs that help you properly format text with opposite-direction
 content without garbling any parts of it.</p>
 
-<p>For example, when you want to create a sentence with a string variable, such as "Did you mean 
-15 Bay Street, Laurel, CA?", you normally pass a localized string resource and the variable to 
+<p>For example, when you want to create a sentence with a string variable, such as "Did you mean
+15 Bay Street, Laurel, CA?", you normally pass a localized string resource and the variable to
 {@link java.lang.String#format String.format()}:</p>
 <pre>
 Resources res = getResources();
@@ -922,8 +917,8 @@
 
 <p dir="rtl">האם התכוונת ל 15 Bay Street, Laurel, CA?</p>
 
-<p>That's wrong because the "15" should be left of "Bay Street." The solution is to use {@link 
-android.text.BidiFormatter} and its {@link android.text.BidiFormatter#unicodeWrap(String) 
+<p>That's wrong because the "15" should be left of "Bay Street." The solution is to use {@link
+android.text.BidiFormatter} and its {@link android.text.BidiFormatter#unicodeWrap(String)
 unicodeWrap()} method. For example, the code above becomes:</p>
 <pre>
 Resources res = getResources();
@@ -933,11 +928,11 @@
 </pre>
 
 <p>
-By default, {@link android.text.BidiFormatter#unicodeWrap(String) unicodeWrap()} uses the 
-first-strong directionality estimation heuristic, which can get things wrong if the first 
-signal for text direction does not represent the appropriate direction for the content as a whole. 
-If necessary, you can specify a different heuristic by passing one of the {@link 
-android.text.TextDirectionHeuristic} constants from {@link android.text.TextDirectionHeuristics} 
+By default, {@link android.text.BidiFormatter#unicodeWrap(String) unicodeWrap()} uses the
+first-strong directionality estimation heuristic, which can get things wrong if the first
+signal for text direction does not represent the appropriate direction for the content as a whole.
+If necessary, you can specify a different heuristic by passing one of the {@link
+android.text.TextDirectionHeuristic} constants from {@link android.text.TextDirectionHeuristics}
 to {@link android.text.BidiFormatter#unicodeWrap(String,TextDirectionHeuristic) unicodeWrap()}.</p>
 
 <p class="note"><strong>Note:</strong> These new APIs are also available for previous versions
@@ -950,31 +945,31 @@
 
 <h3 id="A11yKeyEvents">Handle key events</h3>
 
-<p>An {@link android.accessibilityservice.AccessibilityService} can now receive a callback for 
-key input events with the {@link android.accessibilityservice.AccessibilityService#onKeyEvent 
-onKeyEvent()} callback method. This allows your accessibility service to handle input for 
-key-based input devices such as a keyboard and translate those events to special actions that 
+<p>An {@link android.accessibilityservice.AccessibilityService} can now receive a callback for
+key input events with the {@link android.accessibilityservice.AccessibilityService#onKeyEvent
+onKeyEvent()} callback method. This allows your accessibility service to handle input for
+key-based input devices such as a keyboard and translate those events to special actions that
 previously may have been possible only with touch input or the device's directional pad.</p>
 
 
 <h3 id="A11yText">Select text and copy/paste</h3>
 
-<p>The {@link android.view.accessibility.AccessibilityNodeInfo} now provides APIs that allow 
-an {@link android.accessibilityservice.AccessibilityService} to select, cut, copy, and paste 
+<p>The {@link android.view.accessibility.AccessibilityNodeInfo} now provides APIs that allow
+an {@link android.accessibilityservice.AccessibilityService} to select, cut, copy, and paste
 text in a node.</p>
 
-<p>To specify the selection of text to cut or copy, your accessibility service can use the new 
-action, {@link android.view.accessibility.AccessibilityNodeInfo#ACTION_SET_SELECTION}, passing 
-with it the selection start and end position with {@link 
-android.view.accessibility.AccessibilityNodeInfo#ACTION_ARGUMENT_SELECTION_START_INT} and {@link 
-android.view.accessibility.AccessibilityNodeInfo#ACTION_ARGUMENT_SELECTION_END_INT}. 
-Alternatively you can select text by manipulating the cursor position using the existing 
-action, {@link android.view.accessibility.AccessibilityNodeInfo#ACTION_NEXT_AT_MOVEMENT_GRANULARITY} 
-(previously only for moving the cursor position), and adding the argument {@link 
+<p>To specify the selection of text to cut or copy, your accessibility service can use the new
+action, {@link android.view.accessibility.AccessibilityNodeInfo#ACTION_SET_SELECTION}, passing
+with it the selection start and end position with {@link
+android.view.accessibility.AccessibilityNodeInfo#ACTION_ARGUMENT_SELECTION_START_INT} and {@link
+android.view.accessibility.AccessibilityNodeInfo#ACTION_ARGUMENT_SELECTION_END_INT}.
+Alternatively you can select text by manipulating the cursor position using the existing
+action, {@link android.view.accessibility.AccessibilityNodeInfo#ACTION_NEXT_AT_MOVEMENT_GRANULARITY}
+(previously only for moving the cursor position), and adding the argument {@link
 android.view.accessibility.AccessibilityNodeInfo#ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN}.</p>
 
-<p>You can then cut or copy with {@link android.view.accessibility.AccessibilityNodeInfo#ACTION_CUT}, 
-{@link android.view.accessibility.AccessibilityNodeInfo#ACTION_COPY}, then later paste with 
+<p>You can then cut or copy with {@link android.view.accessibility.AccessibilityNodeInfo#ACTION_CUT},
+{@link android.view.accessibility.AccessibilityNodeInfo#ACTION_COPY}, then later paste with
 {@link android.view.accessibility.AccessibilityNodeInfo#ACTION_PASTE}.</p>
 
 
@@ -987,14 +982,14 @@
 
 <h3 id="A11yFeatures">Declare accessibility features</h3>
 
-<p>Beginning with Android 4.3, an accessibility service must declare accessibility capabilities 
-in its metadata file in order to use certain accessibility features. If the capability is not 
-requested in the metadata file, then the feature will be a no-op. To declare your service's 
-accessibility capabilities, you must use XML attributes that correspond to the various 
-"capability" constants in the {@link android.accessibilityservice.AccessibilityServiceInfo} 
+<p>Beginning with Android 4.3, an accessibility service must declare accessibility capabilities
+in its metadata file in order to use certain accessibility features. If the capability is not
+requested in the metadata file, then the feature will be a no-op. To declare your service's
+accessibility capabilities, you must use XML attributes that correspond to the various
+"capability" constants in the {@link android.accessibilityservice.AccessibilityServiceInfo}
 class.</p>
 
-<p>For example, if a service does not request the {@link android.R.styleable#AccessibilityService_canRequestFilterKeyEvents flagRequestFilterKeyEvents} capability, 
+<p>For example, if a service does not request the {@link android.R.styleable#AccessibilityService_canRequestFilterKeyEvents flagRequestFilterKeyEvents} capability,
 then it will not receive key events.</p>
 
 
@@ -1002,36 +997,36 @@
 
 <h3 id="UiAutomation">Automated UI testing</h3>
 
-<p>The new {@link android.app.UiAutomation} class provides APIs that allow you to simulate user 
-actions for test automation. By using the platform's {@link 
-android.accessibilityservice.AccessibilityService} APIs, the {@link android.app.UiAutomation} 
+<p>The new {@link android.app.UiAutomation} class provides APIs that allow you to simulate user
+actions for test automation. By using the platform's {@link
+android.accessibilityservice.AccessibilityService} APIs, the {@link android.app.UiAutomation}
 APIs allow you to inspect the screen content and inject arbitrary keyboard and touch events.</p>
 
-<p>To get an instance of {@link android.app.UiAutomation}, call {@link 
-android.app.Instrumentation#getUiAutomation Instrumentation.getUiAutomation()}. In order 
-for this to work, you must supply the {@code -w} option with the {@code instrument} command 
-when running your {@link android.test.InstrumentationTestCase} from <a 
+<p>To get an instance of {@link android.app.UiAutomation}, call {@link
+android.app.Instrumentation#getUiAutomation Instrumentation.getUiAutomation()}. In order
+for this to work, you must supply the {@code -w} option with the {@code instrument} command
+when running your {@link android.test.InstrumentationTestCase} from <a
 href="{@docRoot}tools/help/adb.html#am">{@code adb shell}</a>.</p>
 
-<p>With the {@link android.app.UiAutomation} instance, you can execute arbitrary events to test 
-your app by calling {@link android.app.UiAutomation#executeAndWaitForEvent 
-executeAndWaitForEvent()}, passing it a {@link java.lang.Runnable} to perform, a timeout 
-period for the operation, and an implementation of the {@link 
-android.app.UiAutomation.AccessibilityEventFilter} interface. It's within your {@link 
-android.app.UiAutomation.AccessibilityEventFilter} implementation that you'll receive a call 
-that allows you to filter the events that you're interested in and determine the success or 
+<p>With the {@link android.app.UiAutomation} instance, you can execute arbitrary events to test
+your app by calling {@link android.app.UiAutomation#executeAndWaitForEvent
+executeAndWaitForEvent()}, passing it a {@link java.lang.Runnable} to perform, a timeout
+period for the operation, and an implementation of the {@link
+android.app.UiAutomation.AccessibilityEventFilter} interface. It's within your {@link
+android.app.UiAutomation.AccessibilityEventFilter} implementation that you'll receive a call
+that allows you to filter the events that you're interested in and determine the success or
 failure of a given test case.</p>
 
-<p>To observe all the events during a test, create an implementation of {@link 
-android.app.UiAutomation.OnAccessibilityEventListener} and pass it to {@link 
-android.app.UiAutomation#setOnAccessibilityEventListener setOnAccessibilityEventListener()}.  
-Your listener interface then receives a call to {@link 
-android.app.UiAutomation.OnAccessibilityEventListener#onAccessibilityEvent onAccessibilityEvent()} 
-each time an event occurs, receiving an {@link android.view.accessibility.AccessibilityEvent} object 
+<p>To observe all the events during a test, create an implementation of {@link
+android.app.UiAutomation.OnAccessibilityEventListener} and pass it to {@link
+android.app.UiAutomation#setOnAccessibilityEventListener setOnAccessibilityEventListener()}.
+Your listener interface then receives a call to {@link
+android.app.UiAutomation.OnAccessibilityEventListener#onAccessibilityEvent onAccessibilityEvent()}
+each time an event occurs, receiving an {@link android.view.accessibility.AccessibilityEvent} object
 that describes the event.</p>
 
-<p>There is a variety of other operations that the {@link android.app.UiAutomation} APIs expose 
-at a very low level to encourage the development of UI test tools such as <a href="{@docRoot}tools/help/uiautomator/index.html">uiautomator</a>. For instance, 
+<p>There is a variety of other operations that the {@link android.app.UiAutomation} APIs expose
+at a very low level to encourage the development of UI test tools such as <a href="{@docRoot}tools/help/uiautomator/index.html">uiautomator</a>. For instance,
 {@link android.app.UiAutomation} can also:</p>
 <ul>
   <li>Inject input events
@@ -1039,16 +1034,16 @@
   <li>Take screenshots
 </ul>
 
-<p>And most importantly for UI test tools, the {@link android.app.UiAutomation} APIs work 
+<p>And most importantly for UI test tools, the {@link android.app.UiAutomation} APIs work
 across application boundaries, unlike those in {@link android.app.Instrumentation}.</p>
 
 
 <h3 id="Systrace">Systrace events for apps</h3>
 
-<p>Android 4.3 adds the {@link android.os.Trace} class with two static methods, 
-{@link android.os.Trace#beginSection beginSection()} and {@link android.os.Trace#endSection()}, 
-which allow you to define blocks of code to include with the systrace report. By creating 
-sections of traceable code in your app, the systrace logs provide you a much more detailed 
+<p>Android 4.3 adds the {@link android.os.Trace} class with two static methods,
+{@link android.os.Trace#beginSection beginSection()} and {@link android.os.Trace#endSection()},
+which allow you to define blocks of code to include with the systrace report. By creating
+sections of traceable code in your app, the systrace logs provide you a much more detailed
 analysis of where slowdown occurs within your app.</p>
 
 <p>For information about using the Systrace tool, read <a href="{@docRoot}tools/debugging/systrace.html">Analyzing Display and Performance with Systrace</a>.</p>
@@ -1058,31 +1053,31 @@
 
 <h3 id="KeyStore">Android key store for app-private keys</h3>
 
-<p>Android now offers a custom Java Security Provider in the {@link java.security.KeyStore} 
-facility, called Android Key Store, which allows you to generate and save private keys that 
-may be seen and used by only your app. To load the Android Key Store, pass 
-{@code "AndroidKeyStore"} to {@link java.security.KeyStore#getInstance(String) 
+<p>Android now offers a custom Java Security Provider in the {@link java.security.KeyStore}
+facility, called Android Key Store, which allows you to generate and save private keys that
+may be seen and used by only your app. To load the Android Key Store, pass
+{@code "AndroidKeyStore"} to {@link java.security.KeyStore#getInstance(String)
 KeyStore.getInstance()}.</p>
 
-<p>To manage your app's private credentials in the Android Key Store, generate a new key with 
-{@link java.security.KeyPairGenerator} with {@link android.security.KeyPairGeneratorSpec}. First 
-get an instance of {@link java.security.KeyPairGenerator} by calling {@link 
-java.security.KeyPairGenerator#getInstance getInstance()}. Then call 
-{@link java.security.KeyPairGenerator#initialize initialize()}, passing it an instance of 
-{@link android.security.KeyPairGeneratorSpec}, which you can get using 
-{@link android.security.KeyPairGeneratorSpec.Builder KeyPairGeneratorSpec.Builder}. 
-Finally, get your {@link java.security.KeyPair} by calling {@link 
+<p>To manage your app's private credentials in the Android Key Store, generate a new key with
+{@link java.security.KeyPairGenerator} with {@link android.security.KeyPairGeneratorSpec}. First
+get an instance of {@link java.security.KeyPairGenerator} by calling {@link
+java.security.KeyPairGenerator#getInstance getInstance()}. Then call
+{@link java.security.KeyPairGenerator#initialize initialize()}, passing it an instance of
+{@link android.security.KeyPairGeneratorSpec}, which you can get using
+{@link android.security.KeyPairGeneratorSpec.Builder KeyPairGeneratorSpec.Builder}.
+Finally, get your {@link java.security.KeyPair} by calling {@link
 java.security.KeyPairGenerator#generateKeyPair generateKeyPair()}.</p>
 
 
 <h3 id="HardwareKeyChain">Hardware credential storage</h3>
 
-<p>Android also now supports hardware-backed storage for your {@link android.security.KeyChain} 
-credentials, providing more security by making the keys unavailable for extraction. That is, once 
-keys are in a hardware-backed key store (Secure Element, TPM, or TrustZone), they can be used for 
-cryptographic operations but the private key material cannot be exported. Even the OS kernel 
-cannot access this key material. While not all Android-powered devices support storage on 
-hardware, you can check at runtime if hardware-backed storage is available by calling 
+<p>Android also now supports hardware-backed storage for your {@link android.security.KeyChain}
+credentials, providing more security by making the keys unavailable for extraction. That is, once
+keys are in a hardware-backed key store (Secure Element, TPM, or TrustZone), they can be used for
+cryptographic operations but the private key material cannot be exported. Even the OS kernel
+cannot access this key material. While not all Android-powered devices support storage on
+hardware, you can check at runtime if hardware-backed storage is available by calling
 {@link android.security.KeyChain#isBoundKeyAlgorithm KeyChain.IsBoundKeyAlgorithm()}.</p>
 
 
@@ -1091,9 +1086,9 @@
 
 <h3 id="ManifestFeatures">Declarable required features</h3>
 
-<p>The following values are now supported in the <a 
+<p>The following values are now supported in the <a
 href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code &lt;uses-feature>}</a>
-element so you can ensure that your app is installed only on devices that provide the features 
+element so you can ensure that your app is installed only on devices that provide the features
 your app needs.</p>
 
 <dl>
@@ -1137,8 +1132,8 @@
 
 
 <h3 id="ManifestPermissions">User permissions</h3>
-<p>The following values are now supported in the <a 
-href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code &lt;uses-permission>}</a> 
+<p>The following values are now supported in the <a
+href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code &lt;uses-permission>}</a>
 to declare the
 permissions your app requires in order to access certain APIs.</p>
 
diff --git a/docs/html/distribute/googleplay/spotlight/index.jd b/docs/html/distribute/googleplay/spotlight/index.jd
index 88cdec4..7004b0a 100644
--- a/docs/html/distribute/googleplay/spotlight/index.jd
+++ b/docs/html/distribute/googleplay/spotlight/index.jd
@@ -22,6 +22,35 @@
             margin-bottom:40px;
             margin-top:30px;">
    <div style="padding:0 0 0 29px;">
+        <h4>Developer Story: Colopl</h4>
+          <img alt="" class="screenshot thumbnail" style="-webkit-border-radius: 5px;
+            -moz-border-radius: 5px;
+            border-radius: 5px height:78px;
+            width: 78px;
+            float: left;
+            margin: 17px 20px 9px 0;" 
+            src="//lh3.ggpht.com/sx2ILNaXQYOsHfR91T5tUWGlfXE1FutHCBN02Fll6mi9gIaG6RZCGbeJMtIvOoegCPTh=w124" >
+          <div style="width:700px;">
+          <p style="margin-top:26px;
+                    margin-bottom:12px;">
+          The creators of Kuma The Bear, Japan-based <a href="https://play.google.com/store/apps/developer?id=COLOPL,+Inc." target="_android">Colopl</a>, talk about how Google Play and Android allowed them to grow their business to become one of the most profitable games publishers in APAC to date. </p>
+           </div>
+           <iframe style="float:left;
+             margin-right:24px;
+             margin-top:14px;" width="700" height="394" src=
+             "http://www.youtube.com/embed/CbpoZeQCNe4?HD=1;rel=0;origin=developer.android.com;" frameborder="0" allowfullscreen>
+           </iframe>
+   </div> 
+</div>
+
+<div style="background: #F0F0F0;
+            border-top: 1px solid #DDD;
+            padding: 0px 0 24px 0;
+            overflow: auto;
+            clear:both;
+            margin-bottom:40px;
+            margin-top:30px;">
+   <div style="padding:0 0 0 29px;">
         <h4>Developer Story: redBus.in</h4>
           <img alt="" class="screenshot thumbnail" style="-webkit-border-radius: 5px;
             -moz-border-radius: 5px;
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png b/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png
index 697fb7d..cc5b1af 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/land_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png
index 735262f..2625edb 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/land_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png
index cfb7952..9d91475 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/land_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png b/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png
index 5bb815a..f54a8af 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/port_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png
index 1be3b21..230bad4 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/port_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png
index 7e8aff2..2401d20 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/port_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png b/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png
index b5db82e..57b4c03 100644
--- a/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7/thumb.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7_2012/land_back.png b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/land_back.png
new file mode 100644
index 0000000..697fb7d
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/land_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7_2012/land_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/land_fore.png
new file mode 100644
index 0000000..735262f
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/land_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7_2012/land_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/land_shadow.png
new file mode 100644
index 0000000..cfb7952
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/land_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7_2012/port_back.png b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/port_back.png
new file mode 100644
index 0000000..5bb815a
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/port_back.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7_2012/port_fore.png b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/port_fore.png
new file mode 100644
index 0000000..1be3b21
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/port_fore.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7_2012/port_shadow.png b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/port_shadow.png
new file mode 100644
index 0000000..7e8aff2
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/port_shadow.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art-resources/nexus_7_2012/thumb.png b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/thumb.png
new file mode 100644
index 0000000..b5db82e
--- /dev/null
+++ b/docs/html/distribute/promote/device-art-resources/nexus_7_2012/thumb.png
Binary files differ
diff --git a/docs/html/distribute/promote/device-art.jd b/docs/html/distribute/promote/device-art.jd
index 58e183c..09a3941 100644
--- a/docs/html/distribute/promote/device-art.jd
+++ b/docs/html/distribute/promote/device-art.jd
@@ -173,12 +173,13 @@
       title: 'Nexus 7',
       url: 'http://www.google.com/nexus/7/',
       physicalSize: 7,
-      physicalHeight: 7.81,
-      density: '213dpi',
+      physicalHeight: 8,
+      actualResolution: [1200,1920],
+      density: 'XHDPI',
       landRes: ['shadow', 'back', 'fore'],
-      landOffset: [315,270],
+      landOffset: [326,245],
       portRes: ['shadow', 'back', 'fore'],
-      portOffset: [264,311],
+      portOffset: [244,326],
       portSize: [800,1280]
     },
     {
@@ -210,6 +211,20 @@
       archived: true
     },
     {
+      id: 'nexus_7_2012',
+      title: 'Nexus 7 (2012)',
+      url: 'http://www.google.com/nexus/7/',
+      physicalSize: 7,
+      physicalHeight: 7.81,
+      density: '213dpi',
+      landRes: ['shadow', 'back', 'fore'],
+      landOffset: [315,270],
+      portRes: ['shadow', 'back', 'fore'],
+      portOffset: [264,311],
+      portSize: [800,1280],
+      archived: true
+    },
+    {
       id: 'galaxy_nexus',
       title: 'Galaxy Nexus',
       url: 'http://www.android.com/devices/detail/galaxy-nexus',
diff --git a/docs/html/guide/topics/manifest/uses-sdk-element.jd b/docs/html/guide/topics/manifest/uses-sdk-element.jd
index d5b5bdf..15092a0 100644
--- a/docs/html/guide/topics/manifest/uses-sdk-element.jd
+++ b/docs/html/guide/topics/manifest/uses-sdk-element.jd
@@ -227,6 +227,12 @@
 <table>
   <tr><th>Platform Version</th><th>API Level</th><th>VERSION_CODE</th><th>Notes</th></tr>
 
+    <tr><td><a href="{@docRoot}about/versions/android-4.3.html">Android 4.3</a></td>
+    <td><a href="{@docRoot}sdk/api_diff/18/changes.html" title="Diff Report">18</a></td>
+    <td>{@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR2}</td>
+    <td><a href="{@docRoot}about/versions/jelly-bean.html">Platform
+Highlights</a></td></tr>
+
     <tr><td><a href="{@docRoot}about/versions/android-4.2.html">Android 4.2, 4.2.2</a></td>
     <td><a href="{@docRoot}sdk/api_diff/17/changes.html" title="Diff Report">17</a></td>
     <td>{@link android.os.Build.VERSION_CODES#JELLY_BEAN_MR1}</td>
diff --git a/docs/html/images/video-Colopl.png b/docs/html/images/video-Colopl.png
new file mode 100644
index 0000000..0ee88c6
--- /dev/null
+++ b/docs/html/images/video-Colopl.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index a972309..d610899 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -20,6 +20,7 @@
         <a href="" class="slideshow-next">Next</a>
         <div class="frame">
             <ul>
+
                 <li class="item carousel-home">
                     <div class="content-left col-9">
                         <a href="{@docRoot}about/versions/jelly-bean.html"><img src="{@docRoot}images/home/android-jellybean.png" ></a>
@@ -34,41 +35,23 @@
                     <p><a href="{@docRoot}about/versions/jelly-bean.html" class="button">Learn More</a></p>
                     </div>
                 </li>
-                <li class="item carousel-home">
-                    <div class="content-left col-11" style="padding-top:10px;">
-                        <a href="{@docRoot}channels/io2013.html">
-                          <img src="{@docRoot}images/home/io-videos-2013.png" style="margin:60px 0 0;
-                          box-shadow: 3px 10px 18px 1px #999;">
-                        </a>
-                    </div>
-                    <div class="content-right col-4">
-                    <h1>Watch the Android talks from Google I/O</h1>
-                    <p>If you weren't able to attend Google I/O in person or couldn't make it
-                    to all the talks, you can catch up on the action
-                    with all the recordings, brought to you by
-                    <a href="http://developers.google.com/live">Google Developers Live</a>.</p>
-                    <p><a href="{@docRoot}channels/io2013.html" class="button"
-                    >See the Android talks</a></p>
-                    </div>
-                </li>
-
 
 
                 <li class="item carousel-home">
                     <div class="content-left col-11" style="padding-top:65px;">
                       <script src="//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
-                      <div style="box-shadow: 3px 10px 18px 1px #999;width:600px;height:338px">
+                      <div style="box-shadow: 3px 10px 18px 1px #999;width:600px;height:336px">
                         <div id="ytapiplayer">
-                          You need Flash player 8+ and JavaScript enabled to view this video.
+                          <a href="http://www.youtube.com/watch?v=CbpoZeQCNe4"><img width=600 src="{@docRoot}images/video-Colopl.png"></a><!--You need Flash player 8+ and JavaScript enabled to view this video. -->
                         </div>
                         <script type="text/javascript">
                             var params = { allowScriptAccess: "always" };
                             var atts = { id: "ytapiplayer" };
-                            swfobject.embedSWF("//www.youtube.com/v/O8i4HUw7JYA?enablejsapi=1&playerapiid=ytplayer&version=3&HD=1;rel=0;showinfo=0;modestbranding;origin=developer.android.com;autohide=1",
-                              "ytapiplayer", "600", "338", "8", null, null, params, atts);
+                            swfobject.embedSWF("//www.youtube.com/v/CbpoZeQCNe4?enablejsapi=1&playerapiid=ytplayer&version=3&HD=1;rel=0;showinfo=0;modestbranding;origin=developer.android.com;autohide=1",
+                              "ytapiplayer", "600", "336", "8", null, null, params, atts);
 
                             // Callback used to pause/resume carousel based on video state
-                            function onytplayerStateChange(newState) {              
+                            function onytplayerStateChange(newState) {
                                var isPaused = $("#pauseButton").hasClass("paused");
                                if ((newState == 1) || (newState == 3)) {
                                // if playing or buffering, pause the carousel
@@ -93,10 +76,31 @@
                       </div>
                     </div>
                     <div class="content-right col-4">
-                    <h1 style="white-space:nowrap;line-height:1.2em;">Developer Story: <br />redBus.in</h1>
-                    <p>Bangalore-based developers redBus.in talk about how Android is helping them deliver a superior booking and travel experience to millions of daily bus riders in India.</p>
+                    <h1 style="white-space:nowrap;line-height:1.2em;">Developer Story: <br />Colopl</h1>
+                    <p>The creators of Kuma The Bear, Japan-based Colopl, talk about how Google Play and Android allowed them to grow their business to become one of the most profitable games publishers in APAC to date. </p>
                     </div>
                 </li>
+
+
+                <li class="item carousel-home">
+                    <div class="content-left col-11" style="padding-top:10px;">
+                        <a href="{@docRoot}channels/io2013.html">
+                          <img src="{@docRoot}images/home/io-videos-2013.png" style="margin:60px 0 0;
+                          box-shadow: 3px 10px 18px 1px #999;">
+                        </a>
+                    </div>
+                    <div class="content-right col-4">
+                    <h1>Watch the Android talks from Google I/O</h1>
+                    <p>If you weren't able to attend Google I/O in person or couldn't make it
+                    to all the talks, you can catch up on the action
+                    with all the recordings, brought to you by
+                    <a href="http://developers.google.com/live">Google Developers Live</a>.</p>
+                    <p><a href="{@docRoot}channels/io2013.html" class="button"
+                    >See the Android talks</a></p>
+                    </div>
+                </li>
+
+
                 <li class="item carousel-home">
                     <div class="content-left col-10">
                         <img src="{@docRoot}images/home/design.png" style="margin-top:30px">
@@ -108,6 +112,8 @@
                     <p><a href="{@docRoot}design/index.html" class="button">Learn More</a></p>
                     </div>
                 </li>
+
+
                 <li class="item carousel-home">
                         <div class="content-left col-10">
                             <img src="{@docRoot}images/home/google-play.png"
@@ -118,16 +124,16 @@
                         <p>The most visited store in the world for Android apps. Cloud-connected and always synced, it's never been easier for users to find and download your apps.</p>
 
                         <p><a href="{@docRoot}distribute/index.html" class="button">Learn More</a></p>
-                        </div> 
+                        </div>
                 </li>
             </ul>
         </div>
     </div>
     <!-- /End slideshow -->
-    
+
     <a href="" id="pauseButton" style="display:none">pause</a>
-    
-    
+
+
 </div>
 <div class="wrap" style="padding-bottom:20px">
     <!-- Section links -->
@@ -141,4 +147,4 @@
         </ul>
     </div>
     <!-- /Section links -->
-</div>     
+</div>
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index 0d0f348..aa3b2ec 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -5,43 +5,43 @@
 page.metaDescription=Download the official Android SDK to develop apps for Android-powered devices.
 
 
-sdk.linux32_bundle_download=adt-bundle-linux-x86-20130522.zip
-sdk.linux32_bundle_bytes=439988972
-sdk.linux32_bundle_checksum=1fdd8d7537ab9217d61d32ab912f0243
+sdk.linux32_bundle_download=adt-bundle-linux-x86-20130717.zip
+sdk.linux32_bundle_bytes=440035305
+sdk.linux32_bundle_checksum=ecfacb91df1ee63cce1edd4f1a5cda5a
 
-sdk.linux64_bundle_download=adt-bundle-linux-x86_64-20130522.zip
-sdk.linux64_bundle_bytes=440275051
-sdk.linux64_bundle_checksum=e38751ff372a8d6208fcef5659133e98
+sdk.linux64_bundle_download=adt-bundle-linux-x86_64-20130717.zip
+sdk.linux64_bundle_bytes=440322117
+sdk.linux64_bundle_checksum=ab177a06784340b8f1d136651e3dc62a
 
-sdk.mac64_bundle_download=adt-bundle-mac-x86_64-20130522.zip
-sdk.mac64_bundle_bytes=409047751
-sdk.mac64_bundle_checksum=3f4d05206d66e402e87b27a6b3dcf0f9
+sdk.mac64_bundle_download=adt-bundle-mac-x86_64-20130717.zip
+sdk.mac64_bundle_bytes=411609229
+sdk.mac64_bundle_checksum=07c891212a49b5f8495ea9d8d47ba3fe
 
-sdk.win32_bundle_download=adt-bundle-windows-x86-20130522.zip
-sdk.win32_bundle_bytes=446736316
-sdk.win32_bundle_checksum=53345fa4121fa58cc048f66c3af3bae9
+sdk.win32_bundle_download=adt-bundle-windows-x86-20130717.zip
+sdk.win32_bundle_bytes=446783216
+sdk.win32_bundle_checksum=0dd91095999d3539ca1ec4033d83d935
 
-sdk.win64_bundle_download=adt-bundle-windows-x86_64-20130522.zip
-sdk.win64_bundle_bytes=446864400
-sdk.win64_bundle_checksum=b28817f62e7f54e3c683841b61b65564
+sdk.win64_bundle_download=adt-bundle-windows-x86_64-20130717.zip
+sdk.win64_bundle_bytes=446911629
+sdk.win64_bundle_checksum=61ec74995b39166db7f079017a028cec
 
 
 
-sdk.linux_download=android-sdk_r22.0.1-linux.tgz
-sdk.linux_bytes=105617062
-sdk.linux_checksum=56ed27d456b4f0e0d3090b24f9b06757
+sdk.linux_download=android-sdk_r22.0.4-linux.tgz
+sdk.linux_bytes=105640988
+sdk.linux_checksum=4a5db98a58c68c24e66f04f07ac77da5
 
-sdk.mac_download=android-sdk_r22.0.1-macosx.zip
-sdk.mac_bytes=77206237
-sdk.mac_checksum=5c20497d7f7b9d28ee30e57cbf769c8c
+sdk.mac_download=android-sdk_r22.0.4-macosx.zip
+sdk.mac_bytes=77225662
+sdk.mac_checksum=384752505f4f2ba3627bd6aad0697f11
 
-sdk.win_download=android-sdk_r22.0.1-windows.zip
-sdk.win_bytes=113483496
-sdk.win_checksum=cb7f7703450afa5914fb4b8b8332a9f3
+sdk.win_download=android-sdk_r22.0.4-windows.zip
+sdk.win_bytes=113507679
+sdk.win_checksum=320b11d1ed85fd3f5e937697c333d895
 
-sdk.win_installer=installer_r22.0.1-windows.exe
-sdk.win_installer_bytes=93479015
-sdk.win_installer_checksum=81621d3b164f81f91e066011b325f88f
+sdk.win_installer=installer_r22.0.4-windows.exe
+sdk.win_installer_bytes=93502726
+sdk.win_installer_checksum=96a8ae367d84ed219e1eb2cf473667d0
 
 
 
diff --git a/docs/html/sdk/installing/installing-adt.jd b/docs/html/sdk/installing/installing-adt.jd
index b8ab24b..2a09636 100644
--- a/docs/html/sdk/installing/installing-adt.jd
+++ b/docs/html/sdk/installing/installing-adt.jd
@@ -1,8 +1,8 @@
 page.title=Installing the Eclipse Plugin
-adt.zip.version=22.0.1
-adt.zip.download=ADT-22.0.1.zip
-adt.zip.bytes=16815544
-adt.zip.checksum=64473af058fa8f02e36241ee378b3ac0
+adt.zip.version=22.0.4
+adt.zip.download=ADT-22.0.4.zip
+adt.zip.bytes=16838756
+adt.zip.checksum=f0291f4bb9d78ec34a7751cd2402cc2a
 
 @jd:body
 
diff --git a/docs/html/tools/revisions/platforms.jd b/docs/html/tools/revisions/platforms.jd
index 31cec0e..820edbd 100644
--- a/docs/html/tools/revisions/platforms.jd
+++ b/docs/html/tools/revisions/platforms.jd
@@ -29,25 +29,46 @@
 version.</p>
 
 <p>To determine what revision of an Android platform you have installed, refer to the
-<strong>Installed Packages</strong> listing in the Android SDK Manager.</p>
+<strong>Installed Packages</strong> listing in the Android
+<a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.</p>
+
+<p class="caution"><strong>Important:</strong> To download the most recent Android
+system components from the Android SDK Manager, you must first update the SDK Tools to
+revision 22 or later and restart the SDK Manager. If you do not,
+the latest Android system components will not be available for download.</p>
 
 
 
+<h2 id="4.3">Android 4.3</h2>
 
 
-
-<h2 id="4.2">Android 4.2</h2>
-
-
-<p class="caution"><strong>Important:</strong> To download the new Android
-4.2.x system components from the Android SDK Manager, you must first update the
-SDK tools to revision 20 or later and restart the Android SDK Manager. If you do not,
-the Android 4.2 system components will not be available for download.</p>
-
 <div class="toggle-content opened">
 
   <p><a href="#" onclick="return toggleContent(this)">
     <img src="{@docRoot}assets/images/triangle-opened.png"
+class="toggle-content-img" alt="" />Revision 1</a> <em>(July 2013)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+
+    <p>Initial release. The system version is 4.3.</p>
+    <dl>
+      <dt>Dependencies:</dt>
+      <dd>Android SDK Platform-tools r18 or higher is required.</dd>
+      <dd>Android SDK Tools 22.0.4 or higher is recommended.</dd>
+    </dl>
+
+  </div>
+</div>
+
+
+<h2 id="4.2">Android 4.2</h2>
+
+
+<div class="toggle-content closed">
+
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png"
 class="toggle-content-img" alt="" />Revision 2</a> <em>(February 2013)</em>
   </p>
 
@@ -150,12 +171,6 @@
 <h2 id="4.1">Android 4.1</h2>
 
 
-<p class="caution"><strong>Important:</strong> To download the new Android
-4.1.x system components from the Android SDK Manager, you must first update the
-SDK tools to revision 20 or later and restart the Android SDK Manager. If you do not,
-the Android 4.1 system components will not be available for download.</p>
-
-
 <div class="toggle-content closed">
 
   <p><a href="#" onclick="return toggleContent(this)">
@@ -269,11 +284,6 @@
 <h2 id="4.0.3">Android 4.0.3</h2>
 
 
-<p class="caution"><strong>Important:</strong> To download the new Android
-4.0.x system components from the Android SDK Manager, you must first update the
-SDK tools to revision 14 or later and restart the Android SDK Manager. If you do not,
-the Android 4.0.x system components will not be available for download.</p>
-
 <div class="toggle-content closed">
 
   <p><a href="#" onclick="return toggleContent(this)">
@@ -711,13 +721,6 @@
 <h2 id="2.3.4">Android 2.3.4</h2>
 
 
-
-<p>The sections below provide notes about successive releases of
-the Android 2.3.4 platform component for the Android SDK, as denoted by
-revision number. To determine what revision(s) of the Android
-2.3.4 platforms are installed in your SDK environment, refer to
-the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
-
 <div class="toggle-content closed" >
 
 <p><a href="#" onclick="return toggleContent(this)">
@@ -865,14 +868,6 @@
 <h2 id="2.3">Android 2.3</h2>
 
 
-
-<p>The sections below provide notes about successive releases of
-the Android 2.3 platform component for the Android SDK, as denoted by
-revision number. To determine what revision(s) of the Android
-2.3 platforms are installed in your SDK environment, refer to
-the "Installed Packages" listing in the Android SDK and AVD Manager.</p>
-
-
 <div class="toggle-content closed" >
 
 <p><a href="#" onclick="return toggleContent(this)">
@@ -1033,4 +1028,4 @@
   <li>
     WVGA854 (480x854 high density, normal screen)
   </li>
-</ul>
\ No newline at end of file
+</ul>
diff --git a/docs/html/tools/sdk/eclipse-adt.jd b/docs/html/tools/sdk/eclipse-adt.jd
index 52647ff..7b0b5a8 100644
--- a/docs/html/tools/sdk/eclipse-adt.jd
+++ b/docs/html/tools/sdk/eclipse-adt.jd
@@ -53,9 +53,46 @@
 <p>For a summary of all known issues in ADT, see <a
 href="http://tools.android.com/knownissues">http://tools.android.com/knownissues</a>.</p>
 
+
 <div class="toggle-content opened">
   <p><a href="#" onclick="return toggleContent(this)">
     <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+      alt=""/>ADT 22.0.4</a> <em>(July 2013)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+<dl>
+  <dt>Dependencies:</dt>
+
+  <dd>
+    <ul>
+      <li>Java 1.6 or higher is required for ADT 22.0.4.</li>
+      <li>Eclipse Helios (Version 3.6.2) or higher is required for ADT 22.0.4.</li>
+      <li>ADT 22.0.4 is designed for use with <a href="{@docRoot}tools/sdk/tools-notes.html">SDK
+      Tools r22.0.4</a>. If you haven't already installed SDK Tools r22.0.4 into your SDK, use the
+      Android SDK Manager to do so.</li>
+    </ul>
+  </dd>
+
+  <dt>General Notes:</dt>
+  <dd>
+    <ul>
+      <li>Fixed problem with compiling Renderscript code.</li>
+      <li>Improved Gradle export with better workflow and error reporting.</li>
+      <li>Improved Gradle multi-module export feature.</li>
+      <li>Updated build logic to force exporting of the classpath containers unless you are using
+        the Maven plugin.</li>
+    </ul>
+  </dd>
+
+</dl>
+</div>
+</div>
+
+
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
       alt=""/>ADT 22.0.1</a> <em>(May 2013)</em>
   </p>
 
diff --git a/docs/html/tools/sdk/ndk/index.jd b/docs/html/tools/sdk/ndk/index.jd
index 74caaf4..1f34987 100644
--- a/docs/html/tools/sdk/ndk/index.jd
+++ b/docs/html/tools/sdk/ndk/index.jd
@@ -1,29 +1,29 @@
 ndk=true
 page.template=sdk
 
-ndk.mac64_download=android-ndk-r8e-darwin-x86_64.tar.bz2
-ndk.mac64_bytes=508419298
-ndk.mac64_checksum=efac96fab20e6ddb1311d6ba5648ce72
+ndk.mac64_download=android-ndk-r9-darwin-x86_64.tar.bz2
+ndk.mac64_bytes=726430529
+ndk.mac64_checksum=b975271d8f064611e7e12bf87b736826
 
-ndk.mac32_download=android-ndk-r8e-darwin-x86.tar.bz2
-ndk.mac32_bytes=496238878
-ndk.mac32_checksum=e17e707464c45c0d5615e4d0ae6a5cf7
+ndk.mac32_download=android-ndk-r9-darwin-x86.tar.bz2
+ndk.mac32_bytes=710781553
+ndk.mac32_checksum=6f7c4dd38df9079bb4b13846add5c0da
 
-ndk.linux64_download=android-ndk-r8e-linux-x86_64.tar.bz2
-ndk.linux64_bytes=466853553
-ndk.linux64_checksum=fa812352956067e7a9eefc0274675e9a
+ndk.linux64_download=android-ndk-r9-linux-x86_64.tar.bz2
+ndk.linux64_bytes=669064468
+ndk.linux64_checksum=3eedc86b20ec09fcd1fd03f4481a706d
 
-ndk.linux32_download=android-ndk-r8e-linux-x86.tar.bz2
-ndk.linux32_bytes=461526099
-ndk.linux32_checksum=26d774b0884bcd98de08eb4de41ab532
+ndk.linux32_download=android-ndk-r9-linux-x86.tar.bz2
+ndk.linux32_bytes=660787157
+ndk.linux32_checksum=999d155ba772c49baacee6d41d664922
 
-ndk.win64_download=android-ndk-r8e-windows-x86_64.zip
-ndk.win64_bytes=461298980
-ndk.win64_checksum=11eb99b3b56fc86d9d231ebff5c41db3
+ndk.win64_download=android-ndk-r9-windows-x86_64.zip
+ndk.win64_bytes=826661995
+ndk.win64_checksum=cd56cc1036235f16369f2112fa27be91
 
-ndk.win32_download=android-ndk-r8e-windows-x86.zip
-ndk.win32_bytes=434701805
-ndk.win32_checksum=fb41ed2bff5610b14a7b6f085ab86213
+ndk.win32_download=android-ndk-r9-windows-x86.zip
+ndk.win32_bytes=777938252
+ndk.win32_checksum=9c1f66ff963cc61e338964c5f97a4d34
 
 page.title=Android NDK
 @jd:body
@@ -255,13 +255,286 @@
 
 <h2 id="Revisions">Revisions</h2>
 
-<p>The sections below provide information and notes about successive releases of
-the NDK, as denoted by revision number. </p>
-
+<p>The following sections provide information about releases of the NDK.</p>
 
 <div class="toggle-content opened">
+  <p>
+    <a href="#" onclick="return toggleContent(this)"> <img
+      src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img" alt=""
+    >Android NDK, Revision 9</a> <em>(July 2013)</em>
+  </p>
+  <div class="toggle-content-toggleme">
+    <dl>
+      <dt>Important changes:</dt>
+      <dd>
+        <ul>
+          <li>Added support for Android 4.3 (API level 18). For more information, see
+            {@code STABLE-APIS.html} and new code examples in {@code samples/gles3jni/README}.
+          <li>Added headers and libraries for OpenGL ES 3.0, which is supported by Android 4.3
+            (API level 18) and higher.</li>
+          <li>Added GNU Compiler Collection (GCC) 4.8 compiler to the NDK. Since GCC 4.6 is still
+            the default, you must explicitly enable this option:
+            <ul>
+              <li>For {@code ndk-build} builds, export {@code NDK_TOOLCHAIN_VERSION=4.8} or
+                add it in {@code Application.mk}.</li>
+              <li>For standalone builds, use the {@code --toolchain=} option in
+                {@code make-standalone-toolchain.sh}, for example:<br>
+                {@code --toolchain=arm-linux-androideabi-4.8}</li>
+            </ul>
+            <p class="note"><strong>Note:</strong>
+            The {@code -Wunused-local-typedefs} option is enabled by {@code -Wall}. Be
+            sure to add {@code __attribute__((unused))} if you use compile-time asserts like
+            {@code sources/cxx-stl/stlport/stlport/stl/config/features.h}, line #311. For more
+            information, see
+            <a href="https://android-review.googlesource.com/#/c/55460">Change 55460</a></p>
+            <p class="note"><strong>Note:</strong>
+            In the GCC 4.7 release and later, ARM compilers generate unaligned access code by
+            default for ARMv6 and higher build targets. You may need to add the
+            {@code -mno-unaligned-access} build option when building for kernels that do not support
+            this feature.</p>
+          </li>
+          <li>Added Clang 3.3 support. The {@code NDK_TOOLCHAIN_VERSION=clang} build option
+            now picks Clang 3.3 by default.
+            <p class="note"><strong>Note:</strong>
+             Both GCC 4.4.3 and Clang 3.1 are deprecated, and will be removed from the next NDK
+             release.</p></li>
+          <li>Updated GNU Project Debugger (GDB) to support python 2.7.5.</li>
+          <li>Added MCLinker to support Windows hosts. Since {@code ld.gold}
+            is the default where available, you must add {@code -fuse-ld=mcld} in
+            {@code LOCAL_LDFLAGS} or {@code APP_LDFLAGS} to enable MCLinker.</li>
+          <li>Added {@code ndk-depends} tool which prints ELF library dependencies.
+            For more information, see {@code NDK-DEPENDS.html}.
+            (<a href="http://b.android.com/53486">Issue 53486</a>)</li>
+        </ul>
+      </dd>
+
+      <dt>Important bug fixes:</dt>
+      <dd>
+        <ul>
+          <li>Fixed potential event handling issue in {@code android_native_app_glue}.
+            (<a href="http://b.android.com/41755">Issue 41755</a>)</li>
+          <li>Fixed ARM/GCC-4.7 build to generate sufficient alignment for NEON load and store
+            instructions VST and VLD.
+            (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57271">GCC Issue 57271</a>)</li>
+          <li>Fixed a GCC 4.4.3/4.6/4.7 internal compiler error (ICE) for a constant negative index
+            value on a string literal.
+            (<a href="http://b.android.com/54623">Issue 54623</a>)</li>
+          <li>Fixed GCC 4.7 segmentation fault for constant initialization with an object address.
+            (<a href="http://b.android.com/56508">Issue 56508</a>)</li>
+          <li>Fixed GCC 4.6 ARM segmentation fault for <code>-O</code> values when using Boost
+            1.52.0. (<a href="http://b.android.com/42891">Issue 42891</a>)
+          <li>Fixed {@code libc.so} and {@code libc.a} to support the {@code wait4()} function.
+            (<a href="http://b.android.com/19854">Issue 19854</a>)</li>
+          <li>Updated the x86 libc.so and libc.a files to include the {@code clone()}
+            function.</li>
+          <li>Fixed {@code LOCAL_SHORT_COMMANDS} bug where the {@code linker.list} file is
+            empty or not used.</li>
+          <li>Fixed GCC MIPS build on Mac OS to use CFI directives, without which
+            {@code ld.mcld --eh-frame-hdr} fails frequently.</li>
+          <li>Fixed Clang 3.2 X86/MIPS internal compiler error in {@code llvm/lib/VMCore/Value.cpp}.
+            (<a href="https://android-review.googlesource.com/#/c/59021">Change 59021</a>)</li>
+          <li>Fixed GCC 4.7 64-bit Windows assembler crash. (Error: {@code out of memory allocating
+            4294967280 bytes}).</li>
+          <li>Updated {@code ndk-gdb} script so that the {@code --start} or {@code --launch} actions
+            now wait for the GNU Debug Server, so that it can more reliably hit breakpoints set
+            early in the execution path (such as breakpoints in JNI code).
+            (<a href="http://b.android.com/41278">Issue 41278</a>)
+            <p class="note"><strong>Note:</strong>
+              This feature requires jdb and produces warning about pending breakpoints.
+              Specify the {@code --nowait} option to restore previous behavior.
+            </p>
+          </li>
+          <li>Fixed GDB crash when library list is empty.</li>
+          <li>Fixed GDB crash when using a {@code stepi} command past a {@code bx pc} or
+            {@code blx pc} Thumb instruction.
+            (<a href="http://b.android.com/56962">Issue 56962</a>,
+             <a href="http://b.android.com/36149">Issue 36149</a>)</li>
+          <li>Fixed MIPS {@code gdbserver} to look for {@code DT_MIPS_RLD_MAP} instead of
+            {@code DT_DEBUG}. (<a href="http://b.android.com/56586">Issue 56586</a>)</li>
+          <li>Fixed a circular dependency in the ndk-build script, for example: If A-&gt;B and
+            B-&gt;B, then B was dropped from build.
+            (<a href="http://b.android.com/56690">Issue 56690</a>)</li>
+        </ul>
+      </dd>
+
+      <dt>Other bug fixes:</dt>
+      <dd>
+        <ul>
+          <li>Fixed the {@code ndk-build} script to enable you to specify a version of Clang as a
+            command line option (e.g., {@code NDK_TOOLCHAIN_VERSION=clang3.2}). Previously, only
+            specifying the version as an environment variable worked.</li>
+          <li>Fixed gabi++ size of {@code _Unwind_Exception} to be 24 for MIPS build targets when
+            using the Clang compiler.
+            (<a href="https://android-review.googlesource.com/#/c/54141">Change 54141</a>)</li>
+          <li>Fixed the {@code ndk-build} script to ensure that built libraries are actually
+            removed from projects that include prebuilt static libraries when using the
+            {@code ndk-build clean} command.
+            (<a href="https://android-review.googlesource.com/#/c/54461">Change 54461</a>,
+             <a href="https://android-review.googlesource.com/#/c/54480">Change 54480</a>)</li>
+          <li>Modified the {@code NDK_ANALYZE=1} option to be less verbose.</li>
+          <li>Fixed {@code gnu-libstdc++/Android.mk} to include a {@code backward/} path for builds
+            that use backward compability.
+            (<a href="http://b.android.com/53404">Issue 53404</a>)</li>
+          <li>Fixed a problem where {@code stlport new} sometimes returned random values.</li>
+          <li>Fixed {@code ndk-gdb} to match the order of {@code CPU_ABIS}, not {@code APP_ABIS}.
+            (<a href="http://b.android.com/54033">Issue 54033</a>)</li>
+          <li>Fixed a problem where the NDK 64-bit build on MacOSX choses the wrong path for
+            compiler.
+            (<a href="http://b.android.com/53769">Issue 53769</a>)</li>
+          <li>Fixed build scripts to detect 64-bit Windows Vista.
+            (<a href="http://b.android.com/54485">Issue 54485</a>)</li>
+          <li>Fixed x86 {@code ntonl/swap32} error: {@code invalid 'asm': operand number
+            out of range}.
+            (<a href="http://b.android.com/54465">Issue 54465</a>,
+             <a href="https://android-review.googlesource.com/#/c/57242">Change 57242</a>)</li>
+          <li>Fixed {@code ld.gold} to merge string literals.</li>
+          <li>Fixed {@code ld.gold} to handle large symbol alignment.</li>
+          <li>Updated {@code ld.gold} to enable the {@code --sort-section=name} option.</li>
+          <li>Fixed GCC 4.4.3/4.6/4.7 to suppress the {@code -export-dynamic} option for
+            statically linked programs. GCC no longer adds an {@code .interp} section for statically
+            linked programs.</li>
+          <li>Fixed GCC 4.4.3 {@code stlport} compilation error about inconsistent {@code typedef}
+            of {@code _Unwind_Control_Block}.
+            (<a href="http://b.android.com/54426">Issue 54426</a>)</li>
+          <li>Fixed {@code awk} scripts to handle {@code AndroidManifest.xml} files created on
+            Windows which may contain trailing {@code \r} characters and cause build errors.
+            (<a href="http://b.android.com/42548">Issue 42548</a>)</li>
+          <li>Fixed {@code make-standalone-toolchain.sh} to probe the {@code prebuilts/}
+            directory to detect if the host is 32 bit or 64 bit.</li>
+          <li>Fixed the Clang 3.2 {@code -integrated-as} option.</li>
+          <li>Fixed the Clang 3.2 ARM EHABI compact model {@code pr1} and {@code pr2} handler data.
+            </li>
+          <li>Added clang {@code -mllvm -arm-enable-ehabi} option to fix the following clang error:
+            <pre>clang: for the -arm-enable-ehabi option: may only occur zero or one times!</pre>
+            </li>
+          <li>Fixed build failure when there is no {@code uses-sdk} element in application
+            manifest. (<a href="http://b.android.com/57015">Issue 57015</a>)</li>
+        </ul>
+
+      </dd>
+      <dt>Other changes:</dt>
+      <dd>
+        <ul>
+          <li>Header Fixes
+            <ul>
+              <li>Modified headers to make {@code __set_errno} an inlined function, since
+                {@code __set_errno} in {@code errno.h} is deprecated, and {@code libc.so} no longer
+                exports it.</li>
+              <li>Modified {@code elf.h} to include {@code stdint.h}.
+                (<a href="http://b.android.com/55443">Issue 55443</a>)</li>
+              <li>Fixed {@code sys/un.h} to be included independently of other headers.
+                (<a href="http://b.android.com/53646">Issue 53646</a>)</li>
+              <li>Fixed all of the {@code MotionEvent_getHistorical} API family to take the
+                {@code const AInputEvent* motion_event}.
+                (<a href="http://b.android.com/55873">Issue 55873</a>)</li>
+              <li>Fixed {@code malloc_usable_size} to take {@code const void*}.
+                (<a href="http://b.android.com/55725">Issue 55725</a>)</li>
+              <li>Fixed stdint.h to be more compatible with C99.
+                (<a href="https://android-review.googlesource.com/#/c/46821">Change 46821</a>)</li>
+              <li>Modified {@code wchar.h} to not redefine {@code WCHAR_MAX} and
+                {@code WCHAR_MIN}</li>
+              <li>Fixed {@code &lt;inttypes.h&gt;} declaration for pointer-related {@code PRI} and
+                {@code SCN} macros. (<a href="http://b.android.com/57218">Issue 57218</a>)</li>
+              <li>Changed the {@code sys/cdefs.h} header so that {@code __WCHAR_TYPE__} is 32-bit
+                for API levels less than 9, which means that {@code wchat_t} is 32-bit for all
+                API levels. To restore the previous behavior, define the {@code _WCHAR_IS_8BIT}
+                boolean variable. (<a href="http://b.android.com/57267">Issue 57267</a>)</li>
+            </ul>
+          </li>
+          <li>Added more formatting in NDK {@code docs/} and miscellaneous documentation fixes.
+            </li>
+          <li>Added support for a thin archive technique when building static libraries.
+            (<a href="http://b.android.com/40303">Issue 40303</a>)</li>
+          <li>Updated script {@code make-standalone-toolchain.sh} to support the {@code stlport}
+            library in addition to {@code gnustl}, when you specify the option
+            {@code --stl=stlport}. For more information, see {@code STANDALONE-TOOLCHAIN.html}.</li>
+          <li>Updated the {@code make-standalone-toolchain.sh} script so that the
+            {@code --llvm-version=} option creates the {@code $TOOLCHAIN_PREFIX-clang} and
+            {@code $TOOLCHAIN_PREFIX-clang++} scripts in addition to {@code clang} and
+            {@code clang++}, to avoid using the host's clang and clang++ definitions by accident.
+            </li>
+          <li>Added two flags to re-enable two optimizations in upstream Clang but disabled in
+              NDK for better compatibility with code compiled by GCC:
+            <ul>
+              <li>Added a {@code -fcxx-missing-return-semantics} flag to re-enable <em>missing return
+                semantics</em> in Clang 3.2+. Normally, all paths should terminate with a return
+                statement for a value-returning function. If this is not the case, clang inserts
+                an undefined instruction (or trap in debug mode) at the path without a return
+                statement. If you are sure your code is correct, use this flag to allow the
+                optimizer to take advantage of the undefined behavior. If you are not sure, do not
+                use this flag. The caller may still receive a random incorrect value, but the
+                optimizer will not exploit it and make your code harder to debug.</li>
+              <li>Added a {@code -fglobal-ctor-const-promotion} flag to re-enable
+                promoting global variables with static constructor to be constants. With this flag,
+                the global variable optimization pass of LLVM tries to evaluate the global
+                variables with static constructors and promote them to global constants. Although
+                this optimization is correct, it may cause some incompatability with code compiled
+                by GCC. For example, code may do {@code const_cast} to cast the constant to mutable
+                and modify it. In GCC, the variable is in read-write and the code is run by
+                accident. In Clang, the const variable is in read-only memory and may cause your
+                application to crash.</li>
+            </ul>
+          </li>
+          <li>Added {@code -mldc1-sdc1} to the MIPS GCC and Clang compilers. By default, compilers
+            align 8-byte objects properly and emit the {@code ldc1} and {@code sdc1} instructions
+            to move them around. If your app uses a custom allocator that does not always align
+            with a new object's 8-byte boundary in the same way as the default allocator, your app
+            may crash due to {@code ldc1} and {@code sdc1} operations on unaligned memory. In this
+            case, use the {@code -mno-ldc1-sdc1} flag to workaround the problem.</li>
+          <li>Downgraded the event severity from warning to info if {@code APP_PLATFORM_LEVEL} is
+            larger than {@code APP_MIN_PLATFORM_LEVEL}. The {@code APP_PLATFORM_LEVEL} may be lower
+            than {@code APP_PLATFORM} in {@code jni/Application.mk} because the NDK does not have
+            headers for all levels. In this case, the actual level is shifted downwards. The
+            {@code APP_MIN_PLATFORM_LEVEL} is specified by the {@code android:minSdkVersion} in
+            your application's manifest.
+            (<a href="http://b.android.com/39752">Issue 39752</a>)</li>
+          <li>Added the {@code android_getCpuIdArm()} and {@code android_setCpuArm()} methods to
+            {@code cpu-features.c}. This addition enables easier retrieval of the ARM CPUID
+            information. (<a href="http://b.android.com/53689">Issue 53689</a>)</li>
+          <li>Modified {@code ndk-build} to use GCC 4.7's {@code as/ld} for Clang compiling.
+            <p class="note"><strong>Note:</strong>
+              In GCC 4.7, {@code monotonic_clock} and {@code is_monotonic} have been renamed to
+              {@code steady_clock} and {@code is_steady}, respectively.</p></li>
+          <li>Added the following new warnings to the {@code ndk-build} script:
+            <ul>
+              <li>Added warnings if {@code LOCAL_LDLIBS/LDFLAGS} are used in static library
+                modules.</li>
+              <li>Added a warning if a configuration has no module to build.</li>
+              <li>Added a warning for non-system libraries being used in
+                {@code LOCAL_LDLIBS/LDFLAGS} of a shared library or executable modules.</li>
+            </ul>
+          </li>
+          <li>Updated build scripts, so that if {@code APP_MODULES} is not defined and only static
+            libraries are listed in {@code Android.mk}, the script force-builds all of them.
+            (<a href="http://b.android.com/53502">Issue 53502</a>)</li>
+          <li>Updated {@code ndk-build} to support absolute paths in {@code LOCAL_SRC_FILES}.</li>
+          <li>Removed the {@code *-gdbtui} executables, which are duplicates of the {@code *-gdb}
+            executables with the {@code -tui} option enabled.</li>
+          <li>Updated the build scripts to warn you when the Edison Design Group (EDG) compiler
+            front-end turns {@code _STLP_HAS_INCLUDE_NEXT} back on.
+            (<a href="http://b.android.com/53646">Issue 53646</a>)</li>
+          <li>Added the environment variable {@code NDK_LIBS_OUT} to allow overriding of the
+            path for {@code libraries/gdbserver} from the default {@code $PROJECT/libs}.
+            For more information, see {@code OVERVIEW.html}.</li>
+          <li>Changed ndk-build script defaults to compile code with format string protection
+            {@code -Wformat -Werror=format-security}. You may set
+            {@code LOCAL_DISABLE_FORMAT_STRING_CHECKS=true} to disable it.
+            For more information, see {@code ANDROID-MK.html}</li>
+          <li>Added STL pretty-print support in {@code ndk-gdb-py}. For more information, see
+            {@code NDK-GDB.html}.</li>
+          <li>Added tests based on the googletest frameworks.</li>
+          <li>Added a notification to the toolchain build script that warns you if the current shell
+            is not {@code bash}.</li>
+        </ul>
+      </dd>
+    </dl>
+  </div>
+</div>
+
+
+<div class="toggle-content closed">
   <p><a href="#" onclick="return toggleContent(this)">
-    <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
       alt="">Android NDK, Revision 8e</a> <em>(March 2013)</em>
   </p>
 
@@ -283,7 +556,7 @@
             build automatically sorts out the order of libraries specified in
             {@code LOCAL_STATIC_LIBRARIES}, {@code LOCAL_WHOLE_STATIC_LIBRARIES} and
             {@code LOCAL_SHARED_LIBRARIES}. For more information, see {@code CHANGES.HTML}.
-            (<a href="http://code.google.com/p/android/issues/detail?id=39378">Issue 39378</a>)</li>
+            (<a href="http://b.android.com/39378">Issue 39378</a>)</li>
         </ul>
       </dd>
 
@@ -295,23 +568,23 @@
           <li>Fixed build script which unconditionally builds Clang/llvm for MacOSX in 64-bit.</li>
           <li>Fixed GCC 4.6/4.7 internal compiler error:
             {@code gen_thumb_movhi_clobber at config/arm/arm.md:5832}.
-            (<a href="http://code.google.com/p/android/issues/detail?id=52732">Issue 52732</a>)</li>
+            (<a href="http://b.android.com/52732">Issue 52732</a>)</li>
           <li>Fixed build problem where GCC/ARM 4.6/4.7 fails to link code using 64-bit atomic
             built-in functions.
-            (<a href="http://code.google.com/p/android/issues/detail?id=41297">Issue 41297</a>)</li>
+            (<a href="http://b.android.com/41297">Issue 41297</a>)</li>
           <li>Fixed GCC 4.7 linker DIV usage mismatch errors.
           (<a href="http://sourceware.org/ml/binutils/2012-12/msg00202.html">Sourceware Issue</a>)
           <li>Fixed GCC 4.7 internal compiler error {@code build_data_member_initialization, at
             cp/semantics.c:5790}.</li>
           <li>Fixed GCC 4.7 internal compiler error {@code redirect_eh_edge_1, at tree-eh.c:2214}.
-            (<a href="http://code.google.com/p/android/issues/detail?id=52909">Issue 52909</a>)</li>
+            (<a href="http://b.android.com/52909">Issue 52909</a>)</li>
           <li>Fixed a GCC 4.7 segfault.
             (<a href="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55245">GCC Issue</a>)</li>
           <li>Fixed {@code &lt;chrono&gt;} clock resolution and enabled {@code steady_clock}.
-            (<a href="http://code.google.com/p/android/issues/detail?id=39680">Issue 39680</a>)</li>
+            (<a href="http://b.android.com/39680">Issue 39680</a>)</li>
           <li>Fixed toolchain to enable {@code _GLIBCXX_HAS_GTHREADS} for GCC 4.7 libstdc++.
-            (<a href="http://code.google.com/p/android/issues/detail?id=41770">Issue 41770</a>,
-             <a href="http://code.google.com/p/android/issues/detail?id=41859">Issue 41859</a>)</li>
+            (<a href="http://b.android.com/41770">Issue 41770</a>,
+             <a href="http://b.android.com/41859">Issue 41859</a>)</li>
           <li>Fixed problem with the X86 MXX/SSE code failing to link due to missing
             {@code posix_memalign}.
             (<a href="https://android-review.googlesource.com/#/c/51872">Change 51872</a>)</li>
@@ -321,24 +594,24 @@
           <li>Fixed GCC4.7/X86 to restore earlier {@code cmov} behavior.
             (<a href="http://gcc.gnu.org/viewcvs?view=revision&revision=193554">GCC Issue</a>)</li>
           <li>Fixed handling NULL return value of {@code setlocale()} in libstdc++/GCC4.7.
-            (<a href="http://code.google.com/p/android/issues/detail?id=46718">Issue 46718</a>)
+            (<a href="http://b.android.com/46718">Issue 46718</a>)
           <li>Fixed {@code ld.gold} runtime undefined reference to {@code __exidx_start} and
             {@code __exidx_start_end}.
             (<a href="https://android-review.googlesource.com/#/c/52134">Change 52134</a>)</li>
           <li>Fixed Clang 3.1 internal compiler error when using Eigen library.
-            (<a href="http://code.google.com/p/android/issues/detail?id=41246">Issue 41246</a>)</li>
+            (<a href="http://b.android.com/41246">Issue 41246</a>)</li>
           <li>Fixed Clang 3.1 internal compiler error including {@code &lt;chrono&gt;} in C++11 mode.
-            (<a href="http://code.google.com/p/android/issues/detail?id=39600">Issue 39600</a>)</li>
+            (<a href="http://b.android.com/39600">Issue 39600</a>)</li>
           <li>Fixed Clang 3.1 internal compiler error when generating object code for a method
             call to a uniform initialized {@code rvalue}.
-            (<a href="http://code.google.com/p/android/issues/detail?id=41387">Issue 41387</a>)</li>
+            (<a href="http://b.android.com/41387">Issue 41387</a>)</li>
           <li>Fixed Clang 3.1/X86 stack realignment.
             (<a href="https://android-review.googlesource.com/#/c/52154">Change 52154</a>)</li>
           <li>Fixed problem with GNU Debugger (GDB) SIGILL when debugging on Android 4.1.2.
-            (<a href="http://code.google.com/p/android/issues/detail?id=40941">Issue 40941</a>)</li>
+            (<a href="http://b.android.com/40941">Issue 40941</a>)</li>
           <li>Fixed problem where GDB cannot set {@code source:line} breakpoints when symbols contain
             long, indirect file paths.
-            (<a href="http://code.google.com/p/android/issues/detail?id=42448">Issue 42448</a>)</li>
+            (<a href="http://b.android.com/42448">Issue 42448</a>)</li>
           <li>Fixed GDB {@code read_program_header} for MIPS PIE executables.
             (<a href="https://android-review.googlesource.com/#/c/49592">Change 49592</a>)</li>
           <li>Fixed {@code STLport} segmentation fault in {@code uncaught_exception()}.
@@ -346,7 +619,7 @@
           <li>Fixed {@code STLport} bus error in exception handling due to unaligned access of
             {@code DW_EH_PE_udata2}, {@code DW_EH_PE_udata4}, and {@code DW_EH_PE_udata8}.</li>
           <li>Fixed Gabi++ infinite recursion problem with {@code nothrow new[]} operator.
-            (<a href="http://code.google.com/p/android/issues/detail?id=52833">Issue 52833</a>)</li>
+            (<a href="http://b.android.com/52833">Issue 52833</a>)</li>
           <li>Fixed Gabi++ wrong offset to exception handler pointer.
             (<a href="https://android-review.googlesource.com/#/c/53446">Change 53446</a>)</li>
           <li>Removed Gabi++ redundant free on exception object
@@ -365,11 +638,11 @@
               <li>Fixed {@code stddef.h} to not redefine {@code offsetof} since it already exists
                 in the toolchain.</li>
               <li>Fixed {@code elf.h} to contain {@code Elf32_auxv_t} and {@code Elf64_auxv_t}.
-                (<a href="http://code.google.com/p/android/issues/detail?id=38441">Issue 38441</a>)
+                (<a href="http://b.android.com/38441">Issue 38441</a>)
                 </li>
               <li>Fixed the {@code #ifdef} C++ definitions in the
                 {@code OpenSLES_AndroidConfiguration.h} header file.
-                (<a href="http://code.google.com/p/android/issues/detail?id=53163">Issue 53163</a>)
+                (<a href="http://b.android.com/53163">Issue 53163</a>)
                 </li>
             </ul>
           </li>
@@ -377,7 +650,7 @@
             </li>
           <li>Fixed system and Gabi++ headers to be able to compile with API level 8 and lower.</li>
           <li>Fixed {@code cpufeatures} to not parse {@code /proc/self/auxv}.
-            (<a href="http://code.google.com/p/android/issues/detail?id=43055">Issue 43055</a>)</li>
+            (<a href="http://b.android.com/43055">Issue 43055</a>)</li>
           <li>Fixed {@code ld.gold} to not depend on host libstdc++ and on Windows platforms,
             to not depend on the {@code libgcc_sjlj_1.dll} library.</li>
           <li>Fixed Clang 3.1 which emits inconsistent register list in {@code .vsave} and fails
@@ -394,16 +667,16 @@
             </li>
           <li>Fixed X86 {@code libc.so} and {@code lib.a} which were missing the {@code sigsetjmp}
             and {@code siglongjmp} functions already declared in {@code setjmp.h}.
-            (<a href="http://code.google.com/p/android/issues/detail?id=19851">Issue 19851</a>)</li>
+            (<a href="http://b.android.com/19851">Issue 19851</a>)</li>
           <li>Patched GCC 4.4.3/4.6/4.7 libstdc++ to work with Clang in C++ 11.
             (<a href="http://clang.llvm.org/cxx_status.html">Clang Issue</a>)</li>
           <li>Fixed cygwin path in argument passed to {@code HOST_AWK}.</li>
           <li>Fixed {@code ndk-build} script warning in windows when running from project's JNI
             directory.
-            (<a href="http://code.google.com/p/android/issues/detail?id=40192">Issue 40192</a>)</li>
+            (<a href="http://b.android.com/40192">Issue 40192</a>)</li>
           <li>Fixed problem where the {@code ndk-build} script does not build if makefile has
             trailing whitespace in the {@code LOCAL_PATH} definition.
-            (<a href="http://code.google.com/p/android/issues/detail?id=42841">Issue 42841</a>)</li>
+            (<a href="http://b.android.com/42841">Issue 42841</a>)</li>
         </ul>
       </dd>
 
@@ -419,13 +692,13 @@
             hidden visibility except for exception handling helpers.</li>
           <li>Updated build so that {@code STLport} is built for ARM in Thumb mode.</li>
           <li>Added support for {@code std::set_new_handler} in Gabi++.
-            (<a href="http://code.google.com/p/android/issues/detail?id=52805">Issue 52805</a>)</li>
+            (<a href="http://b.android.com/52805">Issue 52805</a>)</li>
           <li>Enabled {@code FUTEX} system call in GNU libstdc++.</li>
           <li>Updated {@code ndk-build} so that it  no longer copies prebuilt static library to
             a project's {@code obj/local/&lt;abi&gt;/} directory.
-            (<a href="http://code.google.com/p/android/issues/detail?id=40302">Issue 40302</a>)</li>
+            (<a href="http://b.android.com/40302">Issue 40302</a>)</li>
           <li>Removed {@code __ARM_ARCH_5*__} from ARM {@code toolchains/*/setup.mk} script.
-            (<a href="http://code.google.com/p/android/issues/detail?id=21132">Issue 21132</a>)</li>
+            (<a href="http://b.android.com/21132">Issue 21132</a>)</li>
           <li>Built additional GNU libstdc++ libraries in thumb for ARM.</li>
           <li>Enabled MIPS floating-point {@code madd/msub/nmadd/nmsub/recip/rsqrt}
             instructions with 32-bit FPU.</li>
@@ -458,7 +731,7 @@
                 which was preventing a significant amount of parallel build processing.</li>
               <li>Updated {@code build-gabi++.sh} and {@code build-stlport.sh} so they can now run
                 from the NDK package.
-                (<a href="http://code.google.com/p/android/issues/detail?id=52835">Issue 52835</a>)
+                (<a href="http://b.android.com/52835">Issue 52835</a>)
                 </li>
               <li>Fixed {@code run-tests.sh} in the {@code MSys} utilities collection.</li>
               <li>Improved 64-bit host toolchain and Canadian Cross build support.</li>
@@ -540,7 +813,7 @@
       <dd>
         <ul>
           <li>Fixed unnecessary rebuild of object files when using the {@code ndk-build} script.
-            (<a href="http://code.google.com/p/android/issues/detail?id=39810">Issue 39810</a>)</li>
+            (<a href="http://b.android.com/39810">Issue 39810</a>)</li>
           <li>Fixed a linker failure with the NDK 8c release for Mac OS X 10.6.x that produced the
             following error:
             <pre>
@@ -551,29 +824,29 @@
             not compatible with Mac OS 10.6.x and the NDK.
           </li>
           <li>Removed the {@code -x c++} options from the Clang++ standalone build script.
-          (<a href="http://code.google.com/p/android/issues/detail?id=39089">Issue 39089</a>)</li>
+          (<a href="http://b.android.com/39089">Issue 39089</a>)</li>
           <li>Fixed issues using the {@code NDK_TOOLCHAIN_VERSION=clang3.1} option in Cygwin.
-           (<a href="http://code.google.com/p/android/issues/detail?id=39585">Issue 39585</a>)</li>
+           (<a href="http://b.android.com/39585">Issue 39585</a>)</li>
           <li>Fixed the {@code make-standalone-toolchain.sh} script to allow generation of a
             standalone toolchain using the Cygwin or MinGW environments. The resulting toolchain
             can be used in Cygwin, MingGW or CMD.exe environments.
-            (<a href="http://code.google.com/p/android/issues/detail?id=39915">Issue 39915</a>,
-            <a href="http://code.google.com/p/android/issues/detail?id=39585">Issue 39585</a>)</li>
+            (<a href="http://b.android.com/39915">Issue 39915</a>,
+            <a href="http://b.android.com/39585">Issue 39585</a>)</li>
           <li>Added missing {@code SL_IID_ANDROIDBUFFERQUEUESOURCE} option in android-14 builds for
             ARM and X86.
-            (<a href="http://code.google.com/p/android/issues/detail?id=40625">Issue 40625</a>)</li>
+            (<a href="http://b.android.com/40625">Issue 40625</a>)</li>
           <li>Fixed x86 CPU detection for the {@code ANDROID_CPU_X86_FEATURE_MOVBE} feature.
-            (<a href="http://code.google.com/p/android/issues/detail?id=39317">Issue 39317</a>)</li>
+            (<a href="http://b.android.com/39317">Issue 39317</a>)</li>
           <li>Fixed an issue preventing the Standard Template Library (STL) from using C++
             sources that do not have a {@code .cpp} file extension.</li>
           <li>Fixed GCC 4.6 ARM internal compiler error <em>at reload1.c:1061</em>.
-            (<a href="http://code.google.com/p/android/issues/detail?id=20862">Issue 20862</a>)</li>
+            (<a href="http://b.android.com/20862">Issue 20862</a>)</li>
           <li>Fixed GCC 4.4.3 ARM internal compiler error <em>at emit-rtl.c:1954</em>.
-            (<a href="http://code.google.com/p/android/issues/detail?id=22336">Issue 22336</a>)</li>
+            (<a href="http://b.android.com/22336">Issue 22336</a>)</li>
           <li>Fixed GCC 4.4.3 ARM internal compiler error <em>at postreload.c:396</em>.
-            (<a href="http://code.google.com/p/android/issues/detail?id=22345">Issue 22345</a>)</li>
+            (<a href="http://b.android.com/22345">Issue 22345</a>)</li>
           <li>Fixed problem with GCC 4.6/4.7 skipping lambda functions.
-            (<a href="http://code.google.com/p/android/issues/detail?id=35933">Issue 35933</a>)</li>
+            (<a href="http://b.android.com/35933">Issue 35933</a>)</li>
         </ul>
       </dd>
 
@@ -584,21 +857,21 @@
             <ul>
               <li>Fixed {@code __WINT_TYPE__} and {@code wint_t} to be the same type.</li>
               <li>Corrected typo in {@code android/bitmap.h}.
-                (<a href="http://code.google.com/p/android/issues/detail?id=15134">Issue 15134</a>)
+                (<a href="http://b.android.com/15134">Issue 15134</a>)
               </li>
               <li>Corrected typo in {@code errno.h}.</li>
               <li>Added check for the presence of {@code __STDC_VERSION__} in {@code sys/cdefs.h}.
-                (<a href="http://code.google.com/p/android/issues/detail?id=14627">Issue 14627</a>)
+                (<a href="http://b.android.com/14627">Issue 14627</a>)
               </li>
               <li>Reorganized headers in {@code byteswap.h} and {@code dirent.h}.</li>
               <li>Fixed {@code limits.h} to include {@code page.h} which provides {@code PAGE_SIZE}
                 settings.
-                (<a href="http://code.google.com/p/android/issues/detail?id=39983">Issue 39983</a>)
+                (<a href="http://b.android.com/39983">Issue 39983</a>)
               </li>
               <li>Fixed return type of {@code glGetAttribLocation()} and
                 {@code glGetUniformLocation()} from {@code int} to {@code GLint}.</li>
               <li>Fixed {@code __BYTE_ORDER} constant for x86 builds.
-                (<a href="http://code.google.com/p/android/issues/detail?id=39824">Issue 39824</a>)
+                (<a href="http://b.android.com/39824">Issue 39824</a>)
               </li>
             </ul>
           </li>
@@ -611,7 +884,7 @@
           <li>Fixed ARM EHABI support in Clang to conform to specifications.</li>
           <li>Fixed GNU Debugger (GDB) to shorten the time spent on walking the target's link map
             during {@code solib} events.
-            (<a href="http://code.google.com/p/android/issues/detail?id=38402">Issue 38402</a>)</li>
+            (<a href="http://b.android.com/38402">Issue 38402</a>)</li>
           <li>Fixed missing {@code libgcc.a} file when linking shared libraries.</li>
         </ul>
       </dd>
@@ -712,7 +985,7 @@
         <ul>
           <li>Fixed an issue where running {@code make-standalone-toolchain.sh} with root privileges
             resulted in the stand alone tool chain being inaccessible to some users.
-            (<a href="http://code.google.com/p/android/issues/detail?id=35279">Issue 35279</a>)
+            (<a href="http://b.android.com/35279">Issue 35279</a>)
             <ul>
               <li>All files and executables in the NDK release package are set to have read and
                 execute permissions for all.</li>
@@ -722,23 +995,23 @@
           <li>Removed redundant {@code \r} from Windows prebuilt {@code echo.exe}. The redundant
           {@code \r} caused {@code gdb.setup} to fail in the GNU Debugger (GDB) because it
           incorrectly became part of the path.
-          (<a href="http://code.google.com/p/android/issues/detail?id=36054">Issue 36054</a>)</li>
+          (<a href="http://b.android.com/36054">Issue 36054</a>)</li>
           <li>Fixed Windows parallel builds that sometimes failed due to timing issues in the
           {@code host-mkdir} implementation.
-          (<a href="http://code.google.com/p/android/issues/detail?id=25875">Issue 25875</a>)</li>
+          (<a href="http://b.android.com/25875">Issue 25875</a>)</li>
           <li>Fixed GCC 4.4.3 GNU {@code libstdc++} to <em>not</em> merge {@code typeinfo} names by
           default. For more details, see
           {@code toolchain repo gcc/gcc-4.4.3/libstdc++-v3/libsupc++/typeinfo}.
-          (<a href="http://code.google.com/p/android/issues/detail?id=22165">Issue 22165</a>)</li>
+          (<a href="http://b.android.com/22165">Issue 22165</a>)</li>
           <li>Fixed problem on {@code null} context in GCC 4.6
           {@code cp/mangle.c::write_unscoped_name}, where GCC may crash when the context is
           {@code null} and dereferenced in {@code TREE_CODE}.</li>
           <li>Fixed GCC 4.4.3 crashes on ARM NEON-specific type definitions for floats.
-          (<a href="http://code.google.com/p/android/issues/detail?id=34613">Issue 34613</a>)</li>
+          (<a href="http://b.android.com/34613">Issue 34613</a>)</li>
           <li>Fixed the {@code STLport} internal {@code _IteWrapper::operator*()} implementation
           where a stale stack location holding the dereferenced value was returned and caused
           runtime crashes.
-          (<a href="http://code.google.com/p/android/issues/detail?id=38630">Issue 38630</a>)</li>
+          (<a href="http://b.android.com/38630">Issue 38630</a>)</li>
 
           <li>ARM-specific fixes:
             <ul>
@@ -755,17 +1028,17 @@
               <li>Fixed {@code binutils-2.21/ld.bfd} to be capable of linking object from older
               binutils without {@code tag_FP_arch}, which was producing <em>assertion fail</em>
               error messages in GNU Binutils.
-              (<a href="http://code.google.com/p/android/issues/detail?id=35209">Issue 35209</a>)
+              (<a href="http://b.android.com/35209">Issue 35209</a>)
               </li>
               <li>Removed <em>Unknown EABI object attribute 44</em> warning when
               {@code binutils-2.19/ld} links prebuilt object by newer {@code binutils-2.21}</li>
               <li>Fixed an issue in GNU {@code stdc++} compilation with both {@code -mthumb} and
               {@code -march=armv7-a}, by modifying {@code make-standalone-toolchain.sh} to populate
               {@code headers/libs} in sub-directory {@code armv7-a/thumb}.
-              (<a href="http://code.google.com/p/android/issues/detail?id=35616">Issue 35616</a>)
+              (<a href="http://b.android.com/35616">Issue 35616</a>)
               </li>
               <li>Fixed <em>unresolvable R_ARM_THM_CALL relocation</em> error.
-              (<a href="http://code.google.com/p/android/issues/detail?id=35342">Issue 35342</a>)
+              (<a href="http://b.android.com/35342">Issue 35342</a>)
               </li>
               <li>Fixed internal compiler error at {@code reload1.c:3633}, caused by the ARM
               back-end expecting the wrong operand type when sign-extend from {@code char}.
@@ -794,11 +1067,11 @@
               <li>Disabled Python support in gdb-7.x at build, otherwise the gdb-7.x configure
               function may pick up whatever Python version is available on the host and build
               {@code gdb} with a hard-wired dependency on a specific version of Python.
-              (<a href="http://code.google.com/p/android/issues/detail?id=36120">Issue 36120</a>)
+              (<a href="http://b.android.com/36120">Issue 36120</a>)
               </li>
               <li>Fixed {@code ndk-gdb} when {@code APP_ABI} contains {@code all} and matchs none
               of the known architectures.
-              (<a href="http://code.google.com/p/android/issues/detail?id=35392">Issue 35392</a>)
+              (<a href="http://b.android.com/35392">Issue 35392</a>)
               </li>
               <li>Fixed Windows pathname support, by keeping the {@code :} character if it looks
               like it could be part of a Windows path starting with a drive letter.
@@ -809,7 +1082,7 @@
               </li>
               <li>Added fix to only read the current {@code solibs} when the linker is consistent.
               This change speeds up {@code solib} event handling.
-              (<a href="http://code.google.com/p/android/issues/detail?id=37677">Issue 37677</a>)
+              (<a href="http://b.android.com/37677">Issue 37677</a>)
               </li>
               <li>Added fix to make repeated attempts to find {@code solib} breakpoints. GDB now
               retries {@code enable_break()} during every call to {@code svr4_current_sos()} until
@@ -817,13 +1090,13 @@
               (<a href="https://android-review.googlesource.com/#/c/43563">Change 43563</a>)</li>
               <li>Fixed an issue where {@code gdb} would not stop on breakpoints placed in
               {@code dlopen-ed} libraries.
-              (<a href="http://code.google.com/p/android/issues/detail?id=34856">Issue 34856</a>)
+              (<a href="http://b.android.com/34856">Issue 34856</a>)
               </li>
               <li>Fixed {@code SIGILL} in dynamic linker when calling {@code dlopen()}, on system
               where {@code /system/bin/linker} is stripped of symbols and
               {@code rtld_db_dlactivity()} is implemented as {@code Thumb}, due to not preserving
               {@code LSB} of {@code sym_addr}.
-              (<a href="http://code.google.com/p/android/issues/detail?id=37147">Issue 37147</a>)
+              (<a href="http://b.android.com/37147">Issue 37147</a>)
               </li>
             </ul>
           </li>
@@ -848,7 +1121,7 @@
               {@code __END_DECLS}.</li>
               <li>Removed unimplemented functions in {@code malloc.h}.</li>
               <li>Fixed {@code stdint.h} defintion of {@code uint64_t} for ANSI compilers.
-              (<a href="http://code.google.com/p/android/issues/detail?id=1952">Issue 1952</a>)</li>
+              (<a href="http://b.android.com/1952">Issue 1952</a>)</li>
               <li>Fixed preprocessor macros in {@code &lt;arch&gt;/include/machine/*}.</li>
               <li>Replaced {@code link.h} for MIPS with new version supporting all platforms.</li>
               <li>Removed {@code linux-unistd.h}</li>
@@ -904,7 +1177,7 @@
           {@code platforms/android-[3,4,5,8]}. Those headers were incomplete, since both X86 and
           MIPS ABIs are only supported at API 9 or higher.</li>
           <li>Simplified c++ include path in standalone packages, as shown below.
-          (<a href="http://code.google.com/p/android/issues/detail?id=35279">Issue 35279</a>)
+          (<a href="http://b.android.com/35279">Issue 35279</a>)
 <pre>
 &lt;path&gt;/arm-linux-androideabi/include/c++/4.6.x-google
   to:
@@ -916,7 +1189,7 @@
           <li>Fixed an issue in {@code samples/san-angeles} that caused a black screen or freeze
           frame on re-launch.</li>
           <li>Replaced deprecated APIs in NDK samples.
-          (<a href="http://code.google.com/p/android/issues/detail?id=20017">Issue 20017</a>)
+          (<a href="http://b.android.com/20017">Issue 20017</a>)
             <ul>
               <li>{@code hello-gl2} from android-5 to android-7</li>
               <li>{@code native-activity} from android-9 to android-10</li>
@@ -1196,7 +1469,7 @@
           <li>Fixed a typo in GAbi++ implementation where the result of {@code
           dynamic_cast&lt;D&gt;(b)} of base class object {@code b} to derived class {@code D} is
           incorrectly adjusted in the opposite direction from the base class.
-          (<a href="http://code.google.com/p/android/issues/detail?id=28721">Issue 28721</a>)
+          (<a href="http://b.android.com/28721">Issue 28721</a>)
           </li>
           <li>Fixed an issue in which {@code make-standalone-toolchain.sh} fails to copy
           {@code libsupc++.*}.</li>
@@ -1710,7 +1983,7 @@
             <li>Fixed the standalone toolchain linker warnings about missing the definition and
             size for the <code>__dso_handle</code> symbol (ARM only).</li>
             <li>Fixed the inclusion order of <code>$(SYSROOT)/usr/include</code> for x86 builds.
-            See the <a href="http://code.google.com/p/android/issues/detail?id=18540">bug</a> for
+            See the <a href="http://b.android.com/18540">bug</a> for
             more information.</li>
             <li>Fixed the definitions of <code>ptrdiff_t</code> and <code>size_t</code> in
             x86-specific systems when they are used with the x86 standalone toolchain.</li>
diff --git a/docs/html/tools/sdk/tools-notes.jd b/docs/html/tools/sdk/tools-notes.jd
index b58fdd1..cd2d986 100644
--- a/docs/html/tools/sdk/tools-notes.jd
+++ b/docs/html/tools/sdk/tools-notes.jd
@@ -29,6 +29,42 @@
 <div class="toggle-content opened">
   <p><a href="#" onclick="return toggleContent(this)">
     <img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+      alt=""/>SDK Tools, Revision 22.0.4</a> <em>(July 2013)</em>
+  </p>
+
+  <div class="toggle-content-toggleme">
+
+    <dl>
+    <dt>Dependencies:</dt>
+    <dd>
+      <ul>
+        <li>Android SDK Platform-tools revision 16 or later.</li>
+        <li>If you are developing in Eclipse with the
+          <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a>, note that this version of
+          SDK Tools is designed for use with ADT 22.0.4 and later. If you haven't already, update
+          ADT to 22.0.4.</li>
+        <li>If you are using <a href="{@docRoot}sdk/installing/studio.html">Android Studio</a>,
+          note that this version of the SDK Tools is designed to work with Android Studio
+          0.2.x and later.</li>
+        <li>If you are developing without an integrated development environment (IDE), you must have
+          <a href="http://ant.apache.org/">Apache Ant</a> 1.8 or later.</li>
+      </ul>
+    </dd>
+
+    <dt>General Notes:</dt>
+    <dd>
+      <ul>
+        <li>Fixed problem with compiling Renderscript code.</li>
+      </ul>
+    </dd>
+    </dl>
+  </div>
+</div>
+
+
+<div class="toggle-content closed">
+  <p><a href="#" onclick="return toggleContent(this)">
+    <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
       alt=""/>SDK Tools, Revision 22.0.1</a> <em>(May 2013)</em>
   </p>
 
diff --git a/docs/html/training/implementing-navigation/nav-drawer.jd b/docs/html/training/implementing-navigation/nav-drawer.jd
index 527d570..38b73454 100644
--- a/docs/html/training/implementing-navigation/nav-drawer.jd
+++ b/docs/html/training/implementing-navigation/nav-drawer.jd
@@ -124,6 +124,7 @@
 <pre>
 public class MainActivity extends Activity {
     private String[] mPlanetTitles;
+    private DrawerLayout mDrawerLayout;
     private ListView mDrawerList;
     ...
 
@@ -133,6 +134,7 @@
         setContentView(R.layout.activity_main);
 
         mPlanetTitles = getResources().getStringArray(R.array.planets_array);
+        mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
         mDrawerList = (ListView) findViewById(R.id.left_drawer);
 
         // Set the adapter for the list view
@@ -191,9 +193,9 @@
                    .commit();
 
     // Highlight the selected item, update the title, and close the drawer
-    mDrawer.setItemChecked(position, true);
+    mDrawerList.setItemChecked(position, true);
     setTitle(mPlanetTitles[position]);
-    mDrawerLayout.closeDrawer(mDrawer);
+    mDrawerLayout.closeDrawer(mDrawerList);
 }
 
 &#64;Override
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 29c546e..cb4e89c 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -42,6 +42,7 @@
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.content.pm.PackageManager;
+import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.database.ContentObserver;
 import android.net.CaptivePortalTracker;
@@ -97,6 +98,7 @@
 import android.text.TextUtils;
 import android.util.Slog;
 import android.util.SparseIntArray;
+import android.util.Xml;
 
 import com.android.internal.R;
 import com.android.internal.net.LegacyVpnInfo;
@@ -106,6 +108,7 @@
 import com.android.internal.telephony.Phone;
 import com.android.internal.telephony.PhoneConstants;
 import com.android.internal.util.IndentingPrintWriter;
+import com.android.internal.util.XmlUtils;
 import com.android.server.am.BatteryStatsService;
 import com.android.server.connectivity.Nat464Xlat;
 import com.android.server.connectivity.Tethering;
@@ -117,7 +120,13 @@
 
 import dalvik.system.DexClassLoader;
 
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.File;
 import java.io.FileDescriptor;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.lang.reflect.Constructor;
@@ -166,7 +175,6 @@
     private static final int MAX_HOSTROUTE_CYCLE_COUNT = 10;
 
     private Tethering mTethering;
-    private boolean mTetheringConfigValid = false;
 
     private KeyStore mKeyStore;
 
@@ -375,6 +383,9 @@
 
     TelephonyManager mTelephonyManager;
 
+    // We only want one checkMobileProvisioning after booting.
+    volatile boolean mFirstProvisioningCheckStarted = false;
+
     public ConnectivityService(Context context, INetworkManagementService netd,
             INetworkStatsService statsService, INetworkPolicyManager policyManager) {
         // Currently, omitting a NetworkFactory will create one internally
@@ -577,10 +588,6 @@
         }
 
         mTethering = new Tethering(mContext, mNetd, statsService, this, mHandler.getLooper());
-        mTetheringConfigValid = ((mTethering.getTetherableUsbRegexs().length != 0 ||
-                                  mTethering.getTetherableWifiRegexs().length != 0 ||
-                                  mTethering.getTetherableBluetoothRegexs().length != 0) &&
-                                 mTethering.getUpstreamIfaceTypes().length != 0);
 
         mVpn = new Vpn(mContext, mVpnCallback, mNetd, this);
         mVpn.startMonitoring(mContext, mTrackerHandler);
@@ -2730,6 +2737,17 @@
                             state + "/" + info.getDetailedState());
                     }
 
+                    // After booting we'll check once for mobile provisioning
+                    // if we've provisioned by and connected.
+                    if (!mFirstProvisioningCheckStarted
+                            && (0 != Settings.Global.getInt(mContext.getContentResolver(),
+                                        Settings.Global.DEVICE_PROVISIONED, 0))
+                            && (state == NetworkInfo.State.CONNECTED)) {
+                        log("check provisioning after booting");
+                        mFirstProvisioningCheckStarted = true;
+                        checkMobileProvisioning(true, CheckMp.MAX_TIMEOUT_MS, null);
+                    }
+
                     EventLogTags.writeConnectivityStateChanged(
                             info.getType(), info.getSubtype(), info.getDetailedState().ordinal());
 
@@ -2979,7 +2997,10 @@
         int defaultVal = (SystemProperties.get("ro.tether.denied").equals("true") ? 0 : 1);
         boolean tetherEnabledInSettings = (Settings.Global.getInt(mContext.getContentResolver(),
                 Settings.Global.TETHER_SUPPORTED, defaultVal) != 0);
-        return tetherEnabledInSettings && mTetheringConfigValid;
+        return tetherEnabledInSettings && ((mTethering.getTetherableUsbRegexs().length != 0 ||
+                mTethering.getTetherableWifiRegexs().length != 0 ||
+                mTethering.getTetherableBluetoothRegexs().length != 0) &&
+                mTethering.getUpstreamIfaceTypes().length != 0);
     }
 
     // An API NetworkStateTrackers can call when they lose their network.
@@ -3548,6 +3569,8 @@
                 + " resultReceiver=" + resultReceiver);
         enforceChangePermission();
 
+        mFirstProvisioningCheckStarted = true;
+
         int timeOutMs = suggestedTimeOutMs;
         if (suggestedTimeOutMs > CheckMp.MAX_TIMEOUT_MS) {
             timeOutMs = CheckMp.MAX_TIMEOUT_MS;
@@ -3584,10 +3607,9 @@
                         }
                         case ConnectivityManager.CMP_RESULT_CODE_REDIRECTED: {
                             log("CheckMp.onComplete: warm sim");
-                            String url = getProvisioningUrl();
+                            String url = getMobileProvisioningUrl();
                             if (TextUtils.isEmpty(url)) {
-                                url = mContext.getResources()
-                                        .getString(R.string.mobile_redirected_provisioning_url);
+                                url = getMobileRedirectedProvisioningUrl();
                             }
                             if (TextUtils.isEmpty(url) == false) {
                                 log("CheckMp.onComplete: warm sim (redirected), url=" + url);
@@ -3599,7 +3621,7 @@
                         }
                         case ConnectivityManager.CMP_RESULT_CODE_NO_DNS:
                         case ConnectivityManager.CMP_RESULT_CODE_NO_TCP_CONNECTION: {
-                            String url = getProvisioningUrl();
+                            String url = getMobileProvisioningUrl();
                             if (TextUtils.isEmpty(url) == false) {
                                 log("CheckMp.onComplete: warm sim (no dns/tcp), url=" + url);
                                 setNotificationVisible(true, ni, url);
@@ -3973,10 +3995,114 @@
         log("setNotificationVisible: X visible=" + visible + " ni=" + networkInfo + " url=" + url);
     }
 
-    private String getProvisioningUrl() {
-        String url = mContext.getResources().getString(R.string.mobile_provisioning_url);
-        log("getProvisioningUrl: mobile_provisioning_url=" + url);
+    /** Location to an updatable file listing carrier provisioning urls.
+     *  An example:
+     *
+     * <?xml version="1.0" encoding="utf-8"?>
+     *  <provisioningUrls>
+     *   <provisioningUrl mcc="310" mnc="4">http://myserver.com/foo?mdn=%3$s&amp;iccid=%1$s&amp;imei=%2$s</provisioningUrl>
+     *   <redirectedUrl mcc="310" mnc="4">http://www.google.com</redirectedUrl>
+     *  </provisioningUrls>
+     */
+    private static final String PROVISIONING_URL_PATH =
+            "/data/misc/radio/provisioning_urls.xml";
+    private final File mProvisioningUrlFile = new File(PROVISIONING_URL_PATH);
 
+    /** XML tag for root element. */
+    private static final String TAG_PROVISIONING_URLS = "provisioningUrls";
+    /** XML tag for individual url */
+    private static final String TAG_PROVISIONING_URL = "provisioningUrl";
+    /** XML tag for redirected url */
+    private static final String TAG_REDIRECTED_URL = "redirectedUrl";
+    /** XML attribute for mcc */
+    private static final String ATTR_MCC = "mcc";
+    /** XML attribute for mnc */
+    private static final String ATTR_MNC = "mnc";
+
+    private static final int REDIRECTED_PROVISIONING = 1;
+    private static final int PROVISIONING = 2;
+
+    private String getProvisioningUrlBaseFromFile(int type) {
+        FileReader fileReader = null;
+        XmlPullParser parser = null;
+        Configuration config = mContext.getResources().getConfiguration();
+        String tagType;
+
+        switch (type) {
+            case PROVISIONING:
+                tagType = TAG_PROVISIONING_URL;
+                break;
+            case REDIRECTED_PROVISIONING:
+                tagType = TAG_REDIRECTED_URL;
+                break;
+            default:
+                throw new RuntimeException("getProvisioningUrlBaseFromFile: Unexpected parameter " +
+                        type);
+        }
+
+        try {
+            fileReader = new FileReader(mProvisioningUrlFile);
+            parser = Xml.newPullParser();
+            parser.setInput(fileReader);
+            XmlUtils.beginDocument(parser, TAG_PROVISIONING_URLS);
+
+            while (true) {
+                XmlUtils.nextElement(parser);
+
+                String element = parser.getName();
+                if (element == null) break;
+
+                if (element.equals(tagType)) {
+                    String mcc = parser.getAttributeValue(null, ATTR_MCC);
+                    try {
+                        if (mcc != null && Integer.parseInt(mcc) == config.mcc) {
+                            String mnc = parser.getAttributeValue(null, ATTR_MNC);
+                            if (mnc != null && Integer.parseInt(mnc) == config.mnc) {
+                                parser.next();
+                                if (parser.getEventType() == XmlPullParser.TEXT) {
+                                    return parser.getText();
+                                }
+                            }
+                        }
+                    } catch (NumberFormatException e) {
+                        loge("NumberFormatException in getProvisioningUrlBaseFromFile: " + e);
+                    }
+                }
+            }
+            return null;
+        } catch (FileNotFoundException e) {
+            loge("Carrier Provisioning Urls file not found");
+        } catch (XmlPullParserException e) {
+            loge("Xml parser exception reading Carrier Provisioning Urls file: " + e);
+        } catch (IOException e) {
+            loge("I/O exception reading Carrier Provisioning Urls file: " + e);
+        } finally {
+            if (fileReader != null) {
+                try {
+                    fileReader.close();
+                } catch (IOException e) {}
+            }
+        }
+        return null;
+    }
+
+    private String getMobileRedirectedProvisioningUrl() {
+        String url = getProvisioningUrlBaseFromFile(REDIRECTED_PROVISIONING);
+        if (TextUtils.isEmpty(url)) {
+            url = mContext.getResources().getString(R.string.mobile_redirected_provisioning_url);
+        }
+        return url;
+    }
+
+    public String getMobileProvisioningUrl() {
+        enforceConnectivityInternalPermission();
+        String url = getProvisioningUrlBaseFromFile(PROVISIONING);
+        if (TextUtils.isEmpty(url)) {
+            url = mContext.getResources().getString(R.string.mobile_provisioning_url);
+            log("getProvisioningUrl: mobile_provisioining_url from resource =" + url);
+        } else {
+            log("getProvisioningUrl: mobile_provisioning_url from File =" + url);
+        }
         // populate the iccid, imei and phone number in the provisioning url.
         if (!TextUtils.isEmpty(url)) {
             String phoneNumber = mTelephonyManager.getLine1Number();
diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java
index 32f39b7..b83d885 100644
--- a/services/java/com/android/server/connectivity/Tethering.java
+++ b/services/java/com/android/server/connectivity/Tethering.java
@@ -157,6 +157,7 @@
         IntentFilter filter = new IntentFilter();
         filter.addAction(UsbManager.ACTION_USB_STATE);
         filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
+        filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
         mContext.registerReceiver(mStateReceiver, filter);
 
         filter = new IntentFilter();
@@ -516,6 +517,8 @@
                     if (VDBG) Log.d(TAG, "Tethering got CONNECTIVITY_ACTION");
                     mTetherMasterSM.sendMessage(TetherMasterSM.CMD_UPSTREAM_CHANGED);
                 }
+            } else if (action.equals(Intent.ACTION_CONFIGURATION_CHANGED)) {
+                updateConfiguration();
             }
         }
     }
@@ -618,7 +621,7 @@
     public int[] getUpstreamIfaceTypes() {
         int values[];
         synchronized (mPublicSync) {
-            updateConfiguration();
+            updateConfiguration();  // TODO - remove?
             values = new int[mUpstreamIfaceTypes.size()];
             Iterator<Integer> iterator = mUpstreamIfaceTypes.iterator();
             for (int i=0; i < mUpstreamIfaceTypes.size(); i++) {
@@ -1289,7 +1292,7 @@
                 int upType = ConnectivityManager.TYPE_NONE;
                 String iface = null;
 
-                updateConfiguration();
+                updateConfiguration(); // TODO - remove?
 
                 synchronized (mPublicSync) {
                     if (VDBG) {
diff --git a/services/java/com/android/server/power/PowerManagerService.java b/services/java/com/android/server/power/PowerManagerService.java
index 1203e02..6f70712 100644
--- a/services/java/com/android/server/power/PowerManagerService.java
+++ b/services/java/com/android/server/power/PowerManagerService.java
@@ -1702,24 +1702,30 @@
             new DisplayPowerController.Callbacks() {
         @Override
         public void onStateChanged() {
-            mDirty |= DIRTY_ACTUAL_DISPLAY_POWER_STATE_UPDATED;
-            updatePowerStateLocked();
+            synchronized (mLock) {
+                mDirty |= DIRTY_ACTUAL_DISPLAY_POWER_STATE_UPDATED;
+                updatePowerStateLocked();
+            }
         }
 
         @Override
         public void onProximityPositive() {
-            mProximityPositive = true;
-            mDirty |= DIRTY_PROXIMITY_POSITIVE;
-            updatePowerStateLocked();
+            synchronized (mLock) {
+                mProximityPositive = true;
+                mDirty |= DIRTY_PROXIMITY_POSITIVE;
+                updatePowerStateLocked();
+            }
         }
 
         @Override
         public void onProximityNegative() {
-            mProximityPositive = false;
-            mDirty |= DIRTY_PROXIMITY_POSITIVE;
-            userActivityNoUpdateLocked(SystemClock.uptimeMillis(),
-                    PowerManager.USER_ACTIVITY_EVENT_OTHER, 0, Process.SYSTEM_UID);
-            updatePowerStateLocked();
+            synchronized (mLock) {
+                mProximityPositive = false;
+                mDirty |= DIRTY_PROXIMITY_POSITIVE;
+                userActivityNoUpdateLocked(SystemClock.uptimeMillis(),
+                        PowerManager.USER_ACTIVITY_EVENT_OTHER, 0, Process.SYSTEM_UID);
+                updatePowerStateLocked();
+            }
         }
     };
 
diff --git a/services/java/com/android/server/updates/CarrierProvisioningUrlsInstallReceiver.java b/services/java/com/android/server/updates/CarrierProvisioningUrlsInstallReceiver.java
new file mode 100644
index 0000000..b53fb65
--- /dev/null
+++ b/services/java/com/android/server/updates/CarrierProvisioningUrlsInstallReceiver.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.updates;
+
+public class CarrierProvisioningUrlsInstallReceiver extends ConfigUpdateInstallReceiver {
+
+    public CarrierProvisioningUrlsInstallReceiver() {
+        super("/data/misc/radio/", "provisioning_urls.xml", "metadata/", "version");
+    }
+}
diff --git a/services/java/com/android/server/wm/InputMonitor.java b/services/java/com/android/server/wm/InputMonitor.java
index d966001..0e36032 100644
--- a/services/java/com/android/server/wm/InputMonitor.java
+++ b/services/java/com/android/server/wm/InputMonitor.java
@@ -19,7 +19,6 @@
 import com.android.server.input.InputManagerService;
 import com.android.server.input.InputApplicationHandle;
 import com.android.server.input.InputWindowHandle;
-import com.android.server.wm.WindowManagerService.AllWindowsIterator;
 
 import android.app.ActivityManagerNative;
 import android.graphics.Rect;
@@ -31,7 +30,6 @@
 import android.view.KeyEvent;
 import android.view.WindowManager;
 
-import java.util.ArrayList;
 import java.util.Arrays;
 
 final class InputMonitor implements InputManagerService.WindowManagerCallbacks {
@@ -249,45 +247,48 @@
         }
 
         // Add all windows on the default display.
-        final AllWindowsIterator iterator = mService.new AllWindowsIterator(
-                WindowManagerService.REVERSE_ITERATOR);
-        while (iterator.hasNext()) {
-            final WindowState child = iterator.next();
-            final InputChannel inputChannel = child.mInputChannel;
-            final InputWindowHandle inputWindowHandle = child.mInputWindowHandle;
-            if (inputChannel == null || inputWindowHandle == null || child.mRemoved) {
-                // Skip this window because it cannot possibly receive input.
-                continue;
-            }
-            
-            final int flags = child.mAttrs.flags;
-            final int type = child.mAttrs.type;
-            
-            final boolean hasFocus = (child == mInputFocus);
-            final boolean isVisible = child.isVisibleLw();
-            final boolean hasWallpaper = (child == mService.mWallpaperTarget)
-                    && (type != WindowManager.LayoutParams.TYPE_KEYGUARD);
-            final boolean onDefaultDisplay = (child.getDisplayId() == Display.DEFAULT_DISPLAY);
-
-            // If there's a drag in progress and 'child' is a potential drop target,
-            // make sure it's been told about the drag
-            if (inDrag && isVisible && onDefaultDisplay) {
-                mService.mDragState.sendDragStartedIfNeededLw(child);
-            }
-
-            if (universeBackground != null && !addedUniverse
-                    && child.mBaseLayer < aboveUniverseLayer && onDefaultDisplay) {
-                final WindowState u = universeBackground.mWin;
-                if (u.mInputChannel != null && u.mInputWindowHandle != null) {
-                    addInputWindowHandleLw(u.mInputWindowHandle, u, u.mAttrs.flags,
-                            u.mAttrs.type, true, u == mInputFocus, false);
+        final int numDisplays = mService.mDisplayContents.size();
+        for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+            final WindowList windows =
+                    mService.mDisplayContents.valueAt(displayNdx).getWindowList();
+            for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
+                final WindowState child = windows.get(winNdx);
+                final InputChannel inputChannel = child.mInputChannel;
+                final InputWindowHandle inputWindowHandle = child.mInputWindowHandle;
+                if (inputChannel == null || inputWindowHandle == null || child.mRemoved) {
+                    // Skip this window because it cannot possibly receive input.
+                    continue;
                 }
-                addedUniverse = true;
-            }
 
-            if (child.mWinAnimator != universeBackground) {
-                addInputWindowHandleLw(inputWindowHandle, child, flags, type,
-                        isVisible, hasFocus, hasWallpaper);
+                final int flags = child.mAttrs.flags;
+                final int type = child.mAttrs.type;
+
+                final boolean hasFocus = (child == mInputFocus);
+                final boolean isVisible = child.isVisibleLw();
+                final boolean hasWallpaper = (child == mService.mWallpaperTarget)
+                        && (type != WindowManager.LayoutParams.TYPE_KEYGUARD);
+                final boolean onDefaultDisplay = (child.getDisplayId() == Display.DEFAULT_DISPLAY);
+
+                // If there's a drag in progress and 'child' is a potential drop target,
+                // make sure it's been told about the drag
+                if (inDrag && isVisible && onDefaultDisplay) {
+                    mService.mDragState.sendDragStartedIfNeededLw(child);
+                }
+
+                if (universeBackground != null && !addedUniverse
+                        && child.mBaseLayer < aboveUniverseLayer && onDefaultDisplay) {
+                    final WindowState u = universeBackground.mWin;
+                    if (u.mInputChannel != null && u.mInputWindowHandle != null) {
+                        addInputWindowHandleLw(u.mInputWindowHandle, u, u.mAttrs.flags,
+                                u.mAttrs.type, true, u == mInputFocus, false);
+                    }
+                    addedUniverse = true;
+                }
+
+                if (child.mWinAnimator != universeBackground) {
+                    addInputWindowHandleLw(inputWindowHandle, child, flags, type,
+                            isVisible, hasFocus, hasWallpaper);
+                }
             }
         }
 
diff --git a/services/java/com/android/server/wm/WindowAnimator.java b/services/java/com/android/server/wm/WindowAnimator.java
index 054a075..4252857 100644
--- a/services/java/com/android/server/wm/WindowAnimator.java
+++ b/services/java/com/android/server/wm/WindowAnimator.java
@@ -26,7 +26,6 @@
 import android.view.WindowManagerPolicy;
 import android.view.animation.Animation;
 
-import com.android.server.wm.WindowManagerService.DisplayContentsIterator;
 import com.android.server.wm.WindowManagerService.LayoutFields;
 
 import java.io.PrintWriter;
@@ -627,9 +626,9 @@
         }
 
         boolean hasPendingLayoutChanges = false;
-        DisplayContentsIterator iterator = mService.new DisplayContentsIterator();
-        while (iterator.hasNext()) {
-            final DisplayContent displayContent = iterator.next();
+        final int numDisplays = mService.mDisplayContents.size();
+        for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+            final DisplayContent displayContent = mService.mDisplayContents.valueAt(displayNdx);
             final int pendingChanges = getPendingLayoutChanges(displayContent.getDisplayId());
             if ((pendingChanges & WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER) != 0) {
                 mBulkUpdateParams |= SET_WALLPAPER_ACTION_PENDING;
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index f2c1bbd..1399c16 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -450,7 +450,7 @@
     String mLastANRState;
 
     /** All DisplayDontents in the world, kept here */
-    private SparseArray<DisplayContent> mDisplayContents = new SparseArray<DisplayContent>();
+    SparseArray<DisplayContent> mDisplayContents = new SparseArray<DisplayContent>();
 
     int mRotation = 0;
     int mForcedAppOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
@@ -4426,10 +4426,13 @@
 
     void dumpWindowsLocked() {
         int i = 0;
-        final AllWindowsIterator iterator = new AllWindowsIterator(REVERSE_ITERATOR);
-        while (iterator.hasNext()) {
-            final WindowState w = iterator.next();
-            Slog.v(TAG, "  #" + i++ + ": " + w);
+        final int numDisplays = mDisplayContents.size();
+        for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+            final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList();
+            for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
+                final WindowState w = windows.get(winNdx);
+                Slog.v(TAG, "  #" + i++ + ": " + w);
+            }
         }
     }
 
@@ -4574,9 +4577,9 @@
                 if (tmpRemoveAppWindowsLocked(wtoken)) {
                     if (DEBUG_REORDER) Slog.v(TAG, "Adding windows back in:");
                     if (DEBUG_REORDER) dumpWindowsLocked();
-                    DisplayContentsIterator iterator = new DisplayContentsIterator();
-                    while(iterator.hasNext()) {
-                        final DisplayContent displayContent = iterator.next();
+                    final int numDisplays = mDisplayContents.size();
+                    for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                        final DisplayContent displayContent = mDisplayContents.valueAt(displayNdx);
                         final WindowList windows = displayContent.getWindowList();
                         final int pos = findWindowOffsetLocked(windows, index);
                         final int newPos = reAddAppWindowsLocked(displayContent, pos, wtoken);
@@ -4628,9 +4631,9 @@
         }
 
         // And now add them back at the correct place.
-        DisplayContentsIterator iterator = new DisplayContentsIterator();
-        while (iterator.hasNext()) {
-            final DisplayContent displayContent = iterator.next();
+        final int numDisplays = mDisplayContents.size();
+        for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+            final DisplayContent displayContent = mDisplayContents.valueAt(displayNdx);
             final WindowList windows = displayContent.getWindowList();
             // Where to start adding?
             int pos = findWindowOffsetLocked(windows, tokenPos);
@@ -4846,13 +4849,17 @@
     @Override
     public void closeSystemDialogs(String reason) {
         synchronized(mWindowMap) {
-            final AllWindowsIterator iterator = new AllWindowsIterator();
-            while (iterator.hasNext()) {
-                final WindowState w = iterator.next();
-                if (w.mHasSurface) {
-                    try {
-                        w.mClient.closeSystemDialogs(reason);
-                    } catch (RemoteException e) {
+            final int numDisplays = mDisplayContents.size();
+            for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList();
+                final int numWindows = windows.size();
+                for (int winNdx = 0; winNdx < numWindows; ++winNdx) {
+                    final WindowState w = windows.get(winNdx);
+                    if (w.mHasSurface) {
+                        try {
+                            w.mClient.closeSystemDialogs(reason);
+                        } catch (RemoteException e) {
+                        }
                     }
                 }
             }
@@ -4985,9 +4992,10 @@
             mPolicy.setCurrentUserLw(newUserId);
 
             // Hide windows that should not be seen by the new user.
-            DisplayContentsIterator iterator = new DisplayContentsIterator();
-            while (iterator.hasNext()) {
-                final WindowList windows = iterator.next().getWindowList();
+            final int numDisplays = mDisplayContents.size();
+            for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                final DisplayContent displayContent = mDisplayContents.valueAt(displayNdx);
+                final WindowList windows = displayContent.getWindowList();
                 for (int i = 0; i < windows.size(); i++) {
                     final WindowState win = windows.get(i);
                     if (win.isHiddenFromUserLocked()) {
@@ -5243,12 +5251,16 @@
             // the background..)
             if (on) {
                 boolean isVisible = false;
-                final AllWindowsIterator iterator = new AllWindowsIterator();
-                while (iterator.hasNext()) {
-                    final WindowState ws = iterator.next();
-                    if (ws.mSession.mPid == pid && ws.isVisibleLw()) {
-                        isVisible = true;
-                        break;
+                final int numDisplays = mDisplayContents.size();
+                for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                    final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList();
+                    final int numWindows = windows.size();
+                    for (int winNdx = 0; winNdx < numWindows; ++winNdx) {
+                        final WindowState ws = windows.get(winNdx);
+                        if (ws.mSession.mPid == pid && ws.isVisibleLw()) {
+                            isVisible = true;
+                            break;
+                        }
                     }
                 }
                 if (!isVisible) {
@@ -5998,9 +6010,10 @@
         WindowList windows = new WindowList();
         synchronized (mWindowMap) {
             //noinspection unchecked
-            DisplayContentsIterator iterator = new DisplayContentsIterator();
-            while(iterator.hasNext()) {
-                windows.addAll(iterator.next().getWindowList());
+            final int numDisplays = mDisplayContents.size();
+            for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                final DisplayContent displayContent = mDisplayContents.valueAt(displayNdx);
+                windows.addAll(displayContent.getWindowList());
             }
         }
 
@@ -6228,11 +6241,15 @@
         }
 
         synchronized (mWindowMap) {
-            final AllWindowsIterator iterator = new AllWindowsIterator();
-            while (iterator.hasNext()) {
-                final WindowState w = iterator.next();
-                if (System.identityHashCode(w) == hashCode) {
-                    return w;
+            final int numDisplays = mDisplayContents.size();
+            for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList();
+                final int numWindows = windows.size();
+                for (int winNdx = 0; winNdx < numWindows; ++winNdx) {
+                    final WindowState w = windows.get(winNdx);
+                    if (System.identityHashCode(w) == hashCode) {
+                        return w;
+                    }
                 }
             }
         }
@@ -6780,12 +6797,16 @@
     // TODO(multidisplay): Call isScreenOn for each display.
     private void sendScreenStatusToClientsLocked() {
         final boolean on = mPowerManager.isScreenOn();
-        final AllWindowsIterator iterator = new AllWindowsIterator();
-        while (iterator.hasNext()) {
-            try {
-                iterator.next().mClient.dispatchScreenState(on);
-            } catch (RemoteException e) {
-                // Ignored
+        final int numDisplays = mDisplayContents.size();
+        for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+            final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList();
+            final int numWindows = windows.size();
+            for (int winNdx = 0; winNdx < numWindows; ++winNdx) {
+                try {
+                    windows.get(winNdx).mClient.dispatchScreenState(on);
+                } catch (RemoteException e) {
+                    // Ignored
+                }
             }
         }
     }
@@ -7629,9 +7650,9 @@
     }
 
     final void rebuildAppWindowListLocked() {
-        DisplayContentsIterator iterator = new DisplayContentsIterator();
-        while (iterator.hasNext()) {
-            rebuildAppWindowListLocked(iterator.next());
+        final int numDisplays = mDisplayContents.size();
+        for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+            rebuildAppWindowListLocked(mDisplayContents.valueAt(displayNdx));
         }
     }
 
@@ -8594,9 +8615,9 @@
             boolean focusDisplayed = false;
             boolean updateAllDrawn = false;
 
-            DisplayContentsIterator iterator = new DisplayContentsIterator();
-            while (iterator.hasNext()) {
-                final DisplayContent displayContent = iterator.next();
+        final int numDisplays = mDisplayContents.size();
+        for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                final DisplayContent displayContent = mDisplayContents.valueAt(displayNdx);
                 WindowList windows = displayContent.getWindowList();
                 DisplayInfo displayInfo = displayContent.getDisplayInfo();
                 final int displayId = displayContent.getDisplayId();
@@ -9035,9 +9056,9 @@
             defaultDisplay.layoutNeeded = true;
         }
 
-        DisplayContentsIterator iterator = new DisplayContentsIterator();
-        while (iterator.hasNext()) {
-            DisplayContent displayContent = iterator.next();
+        final int numDisplays = mDisplayContents.size();
+        for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+            final DisplayContent displayContent = mDisplayContents.valueAt(displayNdx);
             if (displayContent.pendingLayoutChanges != 0) {
                 displayContent.layoutNeeded = true;
             }
@@ -9224,9 +9245,10 @@
     }
 
     private boolean needsLayout() {
-        DisplayContentsIterator iterator = new DisplayContentsIterator();
-        while (iterator.hasNext()) {
-            if (iterator.next().layoutNeeded) {
+        final int numDisplays = mDisplayContents.size();
+        for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+            final DisplayContent displayContent = mDisplayContents.valueAt(displayNdx);
+            if (displayContent.layoutNeeded) {
                 return true;
             }
         }
@@ -9287,35 +9309,38 @@
             // window list to make sure we haven't left any dangling surfaces
             // around.
 
-            AllWindowsIterator iterator = new AllWindowsIterator();
-            Slog.i(TAG, "Out of memory for surface!  Looking for leaks...");
-            while (iterator.hasNext()) {
-                WindowState ws = iterator.next();
-                WindowStateAnimator wsa = ws.mWinAnimator;
-                if (wsa.mSurfaceControl != null) {
-                    if (!mSessions.contains(wsa.mSession)) {
-                        Slog.w(TAG, "LEAKED SURFACE (session doesn't exist): "
-                                + ws + " surface=" + wsa.mSurfaceControl
-                                + " token=" + ws.mToken
-                                + " pid=" + ws.mSession.mPid
-                                + " uid=" + ws.mSession.mUid);
-                        if (SHOW_TRANSACTIONS) logSurface(ws, "LEAK DESTROY", null);
-                        wsa.mSurfaceControl.destroy();
-                        wsa.mSurfaceShown = false;
-                        wsa.mSurfaceControl = null;
-                        ws.mHasSurface = false;
-                        mForceRemoves.add(ws);
-                        leakedSurface = true;
-                    } else if (ws.mAppToken != null && ws.mAppToken.clientHidden) {
-                        Slog.w(TAG, "LEAKED SURFACE (app token hidden): "
-                                + ws + " surface=" + wsa.mSurfaceControl
-                                + " token=" + ws.mAppToken);
-                        if (SHOW_TRANSACTIONS) logSurface(ws, "LEAK DESTROY", null);
-                        wsa.mSurfaceControl.destroy();
-                        wsa.mSurfaceShown = false;
-                        wsa.mSurfaceControl = null;
-                        ws.mHasSurface = false;
-                        leakedSurface = true;
+            final int numDisplays = mDisplayContents.size();
+            for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList();
+                final int numWindows = windows.size();
+                for (int winNdx = 0; winNdx < numWindows; ++winNdx) {
+                    final WindowState ws = windows.get(winNdx);
+                    WindowStateAnimator wsa = ws.mWinAnimator;
+                    if (wsa.mSurfaceControl != null) {
+                        if (!mSessions.contains(wsa.mSession)) {
+                            Slog.w(TAG, "LEAKED SURFACE (session doesn't exist): "
+                                    + ws + " surface=" + wsa.mSurfaceControl
+                                    + " token=" + ws.mToken
+                                    + " pid=" + ws.mSession.mPid
+                                    + " uid=" + ws.mSession.mUid);
+                            if (SHOW_TRANSACTIONS) logSurface(ws, "LEAK DESTROY", null);
+                            wsa.mSurfaceControl.destroy();
+                            wsa.mSurfaceShown = false;
+                            wsa.mSurfaceControl = null;
+                            ws.mHasSurface = false;
+                            mForceRemoves.add(ws);
+                            leakedSurface = true;
+                        } else if (ws.mAppToken != null && ws.mAppToken.clientHidden) {
+                            Slog.w(TAG, "LEAKED SURFACE (app token hidden): "
+                                    + ws + " surface=" + wsa.mSurfaceControl
+                                    + " token=" + ws.mAppToken);
+                            if (SHOW_TRANSACTIONS) logSurface(ws, "LEAK DESTROY", null);
+                            wsa.mSurfaceControl.destroy();
+                            wsa.mSurfaceShown = false;
+                            wsa.mSurfaceControl = null;
+                            ws.mHasSurface = false;
+                            leakedSurface = true;
+                        }
                     }
                 }
             }
@@ -9323,27 +9348,30 @@
             if (!leakedSurface) {
                 Slog.w(TAG, "No leaked surfaces; killing applicatons!");
                 SparseIntArray pidCandidates = new SparseIntArray();
-                iterator = new AllWindowsIterator();
-                while (iterator.hasNext()) {
-                    WindowState ws = iterator.next();
-                    if (mForceRemoves.contains(ws)) {
-                        continue;
-                    }
-                    WindowStateAnimator wsa = ws.mWinAnimator;
-                    if (wsa.mSurfaceControl != null) {
-                        pidCandidates.append(wsa.mSession.mPid, wsa.mSession.mPid);
-                    }
-                }
-                if (pidCandidates.size() > 0) {
-                    int[] pids = new int[pidCandidates.size()];
-                    for (int i=0; i<pids.length; i++) {
-                        pids[i] = pidCandidates.keyAt(i);
-                    }
-                    try {
-                        if (mActivityManager.killPids(pids, "Free memory", secure)) {
-                            killedApps = true;
+                for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                    final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList();
+                    final int numWindows = windows.size();
+                    for (int winNdx = 0; winNdx < numWindows; ++winNdx) {
+                        final WindowState ws = windows.get(winNdx);
+                        if (mForceRemoves.contains(ws)) {
+                            continue;
                         }
-                    } catch (RemoteException e) {
+                        WindowStateAnimator wsa = ws.mWinAnimator;
+                        if (wsa.mSurfaceControl != null) {
+                            pidCandidates.append(wsa.mSession.mPid, wsa.mSession.mPid);
+                        }
+                    }
+                    if (pidCandidates.size() > 0) {
+                        int[] pids = new int[pidCandidates.size()];
+                        for (int i=0; i<pids.length; i++) {
+                            pids[i] = pidCandidates.keyAt(i);
+                        }
+                        try {
+                            if (mActivityManager.killPids(pids, "Free memory", secure)) {
+                                killedApps = true;
+                            }
+                        } catch (RemoteException e) {
+                        }
                     }
                 }
             }
@@ -9974,9 +10002,9 @@
     void dumpDisplayContentsLocked(PrintWriter pw, boolean dumpAll) {
         pw.println("WINDOW MANAGER DISPLAY CONTENTS (dumpsys window displays)");
         if (mDisplayReady) {
-            DisplayContentsIterator dCIterator = new DisplayContentsIterator();
-            while (dCIterator.hasNext()) {
-                dCIterator.next().dump("  ", pw);
+            final int numDisplays = mDisplayContents.size();
+            for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                mDisplayContents.valueAt(displayNdx).dump("  ", pw);
             }
         } else {
             pw.println("  NO DISPLAY");
@@ -9992,13 +10020,16 @@
     void dumpWindowsNoHeaderLocked(PrintWriter pw, boolean dumpAll,
             ArrayList<WindowState> windows) {
         int j = 0;
-        final AllWindowsIterator iterator = new AllWindowsIterator(REVERSE_ITERATOR);
-        while (iterator.hasNext()) {
-            final WindowState w = iterator.next();
-            if (windows == null || windows.contains(w)) {
-                pw.print("  Window #"); pw.print(j++); pw.print(' ');
-                        pw.print(w); pw.println(":");
-                w.dump(pw, "    ", dumpAll || windows != null);
+        final int numDisplays = mDisplayContents.size();
+        for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+            final WindowList windowList = mDisplayContents.valueAt(displayNdx).getWindowList();
+            for (int winNdx = windowList.size() - 1; winNdx >= 0; --winNdx) {
+                final WindowState w = windowList.get(winNdx);
+                if (windows == null || windows.contains(w)) {
+                    pw.print("  Window #"); pw.print(j++); pw.print(' ');
+                            pw.print(w); pw.println(":");
+                    w.dump(pw, "    ", dumpAll || windows != null);
+                }
             }
         }
         if (mInputMethodDialogs.size() > 0) {
@@ -10151,9 +10182,8 @@
                     pw.print(" mDisplayEnabled="); pw.println(mDisplayEnabled);
             if (needsLayout()) {
                 pw.print("  layoutNeeded on displays=");
-                DisplayContentsIterator dcIterator = new DisplayContentsIterator();
-                while (dcIterator.hasNext()) {
-                    final DisplayContent displayContent = dcIterator.next();
+                for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                    final DisplayContent displayContent = mDisplayContents.valueAt(displayNdx);
                     if (displayContent.layoutNeeded) {
                         pw.print(displayContent.getDisplayId());
                     }
@@ -10187,11 +10217,15 @@
         WindowList windows = new WindowList();
         if ("visible".equals(name)) {
             synchronized(mWindowMap) {
-                final AllWindowsIterator iterator = new AllWindowsIterator(REVERSE_ITERATOR);
-                while (iterator.hasNext()) {
-                    final WindowState w = iterator.next();
-                    if (w.mWinAnimator.mSurfaceShown) {
-                        windows.add(w);
+                final int numDisplays = mDisplayContents.size();
+                for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                    final WindowList windowList =
+                            mDisplayContents.valueAt(displayNdx).getWindowList();
+                    for (int winNdx = windowList.size() - 1; winNdx >= 0; --winNdx) {
+                        final WindowState w = windowList.get(winNdx);
+                        if (w.mWinAnimator.mSurfaceShown) {
+                            windows.add(w);
+                        }
                     }
                 }
             }
@@ -10204,15 +10238,18 @@
             } catch (RuntimeException e) {
             }
             synchronized(mWindowMap) {
-                final AllWindowsIterator iterator = new AllWindowsIterator(REVERSE_ITERATOR);
-                while (iterator.hasNext()) {
-                    final WindowState w = iterator.next();
-                    if (name != null) {
-                        if (w.mAttrs.getTitle().toString().contains(name)) {
+                final int numDisplays = mDisplayContents.size();
+                for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
+                    final WindowList windowList = mDisplayContents.valueAt(displayNdx).getWindowList();
+                    for (int winNdx = windowList.size() - 1; winNdx >= 0; --winNdx) {
+                        final WindowState w = windowList.get(winNdx);
+                        if (name != null) {
+                            if (w.mAttrs.getTitle().toString().contains(name)) {
+                                windows.add(w);
+                            }
+                        } else if (System.identityHashCode(w) == objectId) {
                             windows.add(w);
                         }
-                    } else if (System.identityHashCode(w) == objectId) {
-                        windows.add(w);
                     }
                 }
             }
@@ -10456,87 +10493,6 @@
         return displayContent;
     }
 
-    class DisplayContentsIterator implements Iterator<DisplayContent> {
-        private int cur;
-
-        @Override
-        public boolean hasNext() {
-            return cur < mDisplayContents.size();
-        }
-
-        @Override
-        public DisplayContent next() {
-            if (hasNext()) {
-                return mDisplayContents.valueAt(cur++);
-            }
-            throw new NoSuchElementException();
-        }
-
-        @Override
-        public void remove() {
-            throw new IllegalArgumentException("AllDisplayContentIterator.remove not implemented");
-        }
-    }
-
-    final static boolean REVERSE_ITERATOR = true;
-    class AllWindowsIterator implements Iterator<WindowState> {
-        private DisplayContent mDisplayContent;
-        private DisplayContentsIterator mDisplayContentsIterator;
-        private WindowList mWindowList;
-        private int mWindowListIndex;
-        private boolean mReverse;
-
-        AllWindowsIterator() {
-            mDisplayContentsIterator = new DisplayContentsIterator();
-            mDisplayContent = mDisplayContentsIterator.next();
-            mWindowList = mDisplayContent.getWindowList();
-        }
-
-        AllWindowsIterator(boolean reverse) {
-            this();
-            mReverse = reverse;
-            mWindowListIndex = reverse ? mWindowList.size() - 1 : 0;
-        }
-
-        @Override
-        public boolean hasNext() {
-            if (mReverse) {
-                return mWindowListIndex >= 0;
-            }
-            return mWindowListIndex < mWindowList.size();
-        }
-
-        @Override
-        public WindowState next() {
-            if (hasNext()) {
-                WindowState win = mWindowList.get(mWindowListIndex);
-                if (mReverse) {
-                    mWindowListIndex--;
-                    if (mWindowListIndex < 0 && mDisplayContentsIterator.hasNext()) {
-                        mDisplayContent = mDisplayContentsIterator.next();
-                        mWindowList = mDisplayContent.getWindowList();
-                        mWindowListIndex = mWindowList.size() - 1;
-                    }
-                } else {
-                    mWindowListIndex++;
-                    if (mWindowListIndex >= mWindowList.size()
-                            && mDisplayContentsIterator.hasNext()) {
-                        mDisplayContent = mDisplayContentsIterator.next();
-                        mWindowList = mDisplayContent.getWindowList();
-                        mWindowListIndex = 0;
-                    }
-                }
-                return win;
-            }
-            throw new NoSuchElementException();
-        }
-
-        @Override
-        public void remove() {
-            throw new IllegalArgumentException("AllWindowsIterator.remove not implemented");
-        }
-    }
-
     // There is an inherent assumption that this will never return null.
     public DisplayContent getDefaultDisplayContentLocked() {
         return getDisplayContentLocked(Display.DEFAULT_DISPLAY);
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 cbefd3d..b909bec 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
@@ -30,6 +30,7 @@
 import com.android.layoutlib.bridge.android.BridgeContext;
 import com.android.resources.Density;
 import com.android.resources.ResourceType;
+import com.android.resources.ScreenOrientation;
 import com.android.resources.ScreenSize;
 
 import android.content.res.Configuration;
@@ -347,6 +348,23 @@
         config.compatScreenWidthDp = config.screenWidthDp;
         config.compatScreenHeightDp = config.screenHeightDp;
 
+        ScreenOrientation orientation = hardwareConfig.getOrientation();
+        if (orientation != null) {
+            switch (orientation) {
+            case PORTRAIT:
+                config.orientation = Configuration.ORIENTATION_PORTRAIT;
+                break;
+            case LANDSCAPE:
+                config.orientation = Configuration.ORIENTATION_LANDSCAPE;
+                break;
+            case SQUARE:
+                config.orientation = Configuration.ORIENTATION_SQUARE;
+                break;
+            }
+        } else {
+            config.orientation = Configuration.ORIENTATION_UNDEFINED;
+        }
+
         // TODO: fill in more config info.
 
         return config;