Fix automatic brightness

Broken in Iddcbee98f6588bba428c4059e786d946d7ce2298

- Brightness is now handled in handleLightSensorValue instead of
  onSensorChanged, but the previous patch copied the old handling
  code into onSensorChanged in addition to calling handleLightSensorValue.
  This patch integrates the brightness filter change from
  onSensorChanged into handleLightSensorValue.
- onSensorChanged called mHandler.removeCallbacks(mAutoBrightnessTask)
  every time a value is received from the sensor ensuring that the
  task never get ran! (We schedule it 2 seconds into the future
  but receives a value from the sensor every second.)
  This patch removes the call.

(Note: similar to http://review.cyanogenmod.com/11341)

Change-Id: Id3e4f0f02f91f27c7c12cb2e274e0c13213d4774
Implement resolving of icon attributes to resIds in AlertController

Platform code using AlertController directly currently has
no way to set the correct theme-specific dialog icon in a
generic way. This adds code to handle such usage.

Change-Id: I48beafa1183e4edf6d5378b3985a7f9be5fcda8b
Framework: Use holo alert drawables

Replaces the current usage of the GB alert
drawable with theme-consistent holo ones.

Change-Id: Id5780cb7be08d0394bc8a0061fb18a1a9017360d
frameworks/base: avoiding tile rendering when rendertarget changes for same fbo

avoids tile rendering when switching to same fbo

Change-Id: I16f52b1ab474863125f42303471f3315fd9960a4
ril: avoid sending null aid string in getIMSI

A change to how getIMSI works in JB causes null aid strings
to be sent.  The result for RILs older than v7 is a corrupt
ril response in SIMRecords::fetchSimRecords.  This corruption
ends up setting mImsi to null (in SIMRecords) and that causes
havoc w/ 3g/4g data connections.

This patch avoids sending null aid strings and has fixed
data connection issues on several Motorola devices.

Change-Id: Ic1fc363e35d79793c48d19080a2e028e428b888f
fix build: add missing instance variable mRilVer

Fixes commit 4b785569b338d150dccdb5bb6d3a290b068e603c

Change-Id: Id239285aff6997eaa42521b695b6812029f580c1
Framework Base: Allow Mock SMS (1/2)

This change brings the possibility of simulate the reception of SMS on real devices. Fow now,
the only way of simulate the reception of SMS is using the android emulator, but this hasn't have
a CM10 image.

This change adds a MockSmsReceiver inside SMSDispatcher that have a BroadcastReceiver listening
for Intents.MOCK_SMS_RECEIVED_ACTION action. This class accept the SMS simulation if and only if
Settings.Secure.ALLOW_MOCK_SMS is enabled. The application that sends the mock SMS
requires the "android.permission.SEND_MOCK_SMS" permission.

This receiver should be used in the next way:

Intent in = new Intent(Intents.MOCK_SMS_RECEIVED_ACTION);
in.putExtra("scAddr", "+01123456789");
in.putExtra("senderAddr", "+01123456789");
in.putExtra("msg", "This is a mock SMS message.");
sendBroadcast(in);

or

String pdu = "07914151551512f2040B916105551511f100006060605130308A04D4F29C0E";
byte[][] pdus = new byte[1][];
pdus[0] = HexDump.hexStringToByteArray(pdu);
Intent in = new Intent(Intents.MOCK_SMS_RECEIVED_ACTION);
intent.putExtra("pdus", pdus);
sendBroadcast(in);

Patch 2: * Protect the mock SMS BroadcastReceiver with the permission "android.permission.SEND_MOCK_SMS".
           This permission is required for send mock SMSs, in addition to ALLOW_MOCK_SMS system setting.
         * Add result to ordered broadcast requests.
             Activity.RESULT_OK -> Ok. At least one message was sent
             Activity.RESULT_CANCELED -> Error. No messages were sent
Patch 3: English typos
Patch 4: Add Marco Brohet's suggestion

Change-Id: I5322cf748449a863ea8e8deda977108b9b58a413
ril: dedup mRilVer

Change-Id: I665b5c1c502d3cc49d2b3343a2e9eafc8b8e5a77
Revert "ril: avoid sending null aid string in getIMSI"

This reverts commit 4b785569b338d150dccdb5bb6d3a290b068e603c.

This change has been verified as breaking network for toro/toroplus.

Change-Id: I74e43acd10d4b38e149acf55e08537430f871139
Add @hide to MOCK_SMS stuff

Change-Id: I3f65cb43052c24f8e4c42a80773fb785c90c038a
power: Add CPU boosting interface

 * Boosts CPU using Power HAL for the given duration.
 * Duration is given in microseconds.
 * Power HAL must implement POWER_HINT_CPU_BOOST.

Change-Id: Ic79baf7e3d0f75483c2fe8a242b4c3d93368b68b
Add CPU boosting hooks

 * Boost CPU to max during scrolling
 * Boost CPU to max on activity start/resume
 * Inspired by a patch from CodeAuora.

Change-Id: I72f2c2851b01fbceabddead03a4c3a7a0526ca61
am: Allow more hidden apps on devices with lots of RAM

 * If more than 1.5GB is present, allow up to 40 hidden apps.
 * Number is somewhat arbitrary, but was found to work well on D2.
 * Also look at the sys.mem.max_hidden_apps value if given.

Change-Id: I2d3cf6e0dad1bc0b482cc37bf9c61ed2f2b4be51
Frameworks/base: Updated italian translation

	Added strings for mock SMS messages

Change-Id: I5842dd5c3f24604ca02e713d1c6541f0edf5ec2c
frameworks/base: updated romanian translation

Change-Id: I442ece3dcb5dcefb5fccd53feffb790240f91908