fix typo in training article: "SMP Primer for Android"

See: http://code.google.com/p/android/issues/detail?id=60136

On page http://developer.android.com/training/articles/smp.html, do a page search for "C+++", that should probably be "C++"

Change-Id: I1aa5ff2ab116fa3131fbd64f6ee203aac39fe8bd
fix "Adding a list" demo code error

See: http://code.google.com/p/android/issues/detail?id=60125

The bug is on this page:
http://developer.android.com/guide/topics/ui/dialogs.html#AlertDialog

The code for the AlertDialog "adding a list" is currently:
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
    builder.setTitle(R.string.pick_color);
           .setItems(R.array.colors_array, new DialogInterface.OnClickListener() {
               public void onClick(DialogInterface dialog, int which) {
               // The 'which' argument contains the index position
               // of the selected item
           }
    });
    return builder.create();
}

It's a small error:
    builder.setTitle(R.string.pick_color);
           .setItems(R.array.colors_array, new

should be

    builder.setTitle(R.string.pick_color)
           .setItems(R.array.colors_array, new

The ";" should not be there.

Change-Id: Ib80a51287ab1d17f6f4cd9dfff0d62b9e1874623
Fix typo in DevicePolicyManager documentation

Typo in DevicePolicyManager documentation
See: http://code.google.com/p/android/issues/detail?id=60235

Change-Id: Ic120297cfdc46ec49f870e0750ec831ba6362399
frameworks: Make Spinner widget request the itemtype of the adapter

Prior to that change the itemtype is ignored, this prevent Spinner to
work with adapter containing multiple itemtype.

Change-Id: I1554f5bfd04c972f4eddb6da9d611b7f7ef4e0e7
Fix dock intent lookup.

PackageManagerService doesn't support UserHandle.USER_CURRENT passed in,
so always pass in the real user ID.

Change-Id: I86ed3cc41ee52628da874500d280f722501233cf
ShutdownThread: Turn screen on during shutdown

Screen should wake up from low power mode during shutdown,
to notify the user that the phone is shutting down.
This will result in better user experience.

Orig-Change-Id: I06b2c5c7a56795a65c6f49470d9b68b03b65c669

Change-Id: I265cfbb939e1109fbba609b133bcc3f418ef0bcd
Signed-off-by: Pavan Kumar S <pavan.kumar.s@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 103672
Fix NullException in QwertyKeyListener.KeyDown

Extending null protection for view to "c == i" case in addition to
"c == Character.toUpperCase(i)" case that helped to fix some force closures.
Seems as typo in original implementation.

Change-Id: Ibaa5aea95c5c8cdc8ac981fe0d1dad313e3e692f
Signed-off-by: Dmitry Tsyganyuk <fdt017@motorola.com>
Wrong notification tone played for secondary user sometimes

Media should have support for multiple user when get the
default ring tone uri from settings provider database.

Change-Id: I2d120c155dba1094cab49b0bab58525f17321797
Remove duplicate code in Editor.java

Eliminate duplicates by calling resumeBlink()/suspendBlink().

Change-Id: Ia19ae1bf1a5c981700aa20be67ed9d557e2bfc56
Signed-off-by: Sangkyu Lee <sk82.lee@lge.com>
Fix "Email" App data lost when screen rotated.

Bug Description:
1.Open "Email" App contained in AOSP.
2.Setup your email account if not.
3.Click "Compose" button on the left bottom.
4.In "To", enter more than 3 email addresses, like "test1@gmail.com,test2@gmail.com,test3@gmail.com,test4@gmail.com,test5@gmail".
5.Click "Subject" or "Compose email", and the "To" data will be shrank.It will be like "test1@gmail.com test2@gmail.com +3". The "+3" means there are 3 more addresses shrank.
6.Rotate screen, either from vertical to horizontal or from horizontal to vertical.
7.The "To" data is lost, it will be "test1@gmail.com test2@gmail +1".When you click to expand, there are only 3 addresses left.
Why and how to solve:
Data lost when screen rotated because RecipientEditTextView doesn't save data on orientation changed.
So, create a static class save the data when needed and restore later on.

Change-Id: I0c709cbb59515338aa903c611139aee727785670
Signed-off-by: Paul Quei <paulquei@gmail.com>
handle negative temperature

When the battery temperature drops to below zero, BatteryLevelInit()
fails to show negative temperature. Because the type is unsigned
and the size of bit field is 10 bits.
So to handle negative temperature, change the type of battery temperature
from "char" to "short". And extend the size of temperature bit field
from 10 to 11 bits, which first bit is used for the sign bit.

Before:
31             24                    14                 0
+---------------+---------------------+-----------------+
| Battery Level | Battery temperature | Battery Voltage |
+---------------+---------------------+-----------------+

After:
31           25                      14                 0
+-------------+-----------------------+-----------------+
|Battery Level|  Battery temperature  | Battery Voltage |
+-------------+-----------------------+-----------------+

Bits 31..25: battery level percentage (7 bits unsigned)
Bits 24..14: battery temperature (11 bits signed)
    First bit is used for the sign and others for the temperature
Bits 13..0: battery voltage in 0.001 volt units (14 bits unsigned)

Becuase of changing the format, let the BatteryStatsImpl.VERSION field
increment.

Bug: 8009514
Change-Id: Iaa12f4d3f14e6cf4d73bc1a23d81c60f9677a499
Fixing NULL pointer access causing segmentation fault in aapt

In cases where resource packages are generated which does
not have public resources for all resource types - NULL
pointers sneaks into the mOrderedConfigs vector causing
the aapt tool to crash. The solution in this fix simply
ignores the NULL elements when later processing the sorted
vector.

The NULL elements are inserted during applyPublicEntryOrder
function call

Change-Id: I8b7135932e2d235018da2e2f7e09f0d22f1b2f59
This value should be hidden.

Change-Id: I2b31c769649650cbbbd5fcadc315c6e0e6e76c1a