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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -24189,7 +29776,7 @@
value=""account""
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -24216,6 +29803,28 @@
>
+
+
+
+
@@ -25349,7 +30958,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -25360,7 +30969,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -25371,7 +30980,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -25523,7 +31132,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -25670,6 +31279,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -25705,7 +31337,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -25743,6 +31375,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -66853,7 +75041,7 @@
value="0"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -66864,7 +75052,7 @@
value="2"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -66875,6 +75063,380 @@
value="3"
static="true"
final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -66992,6 +75554,19 @@
visibility="public"
>
+
+
+
+
+
+
@@ -67201,6 +75787,19 @@
+
+
+
+
+
+
+
+
@@ -67700,7 +76312,7 @@
value="16"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -67711,7 +76323,7 @@
value="4"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -67722,7 +76334,7 @@
value="1"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -67733,7 +76345,7 @@
value="8"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -67744,7 +76356,7 @@
value="2"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -67759,6 +76371,17 @@
visibility="public"
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -100587,7 +110010,7 @@
volatile="false"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100598,7 +110021,7 @@
value="1"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100609,7 +110032,7 @@
value="3"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100620,7 +110043,7 @@
value="4"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100631,7 +110054,7 @@
value="5"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100642,7 +110065,7 @@
value="2"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100652,7 +110075,7 @@
abstract="false"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100668,7 +110091,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100687,7 +110110,7 @@
synchronized="false"
static="true"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100700,7 +110123,7 @@
synchronized="false"
static="true"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100713,7 +110136,7 @@
synchronized="false"
static="true"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100726,7 +110149,7 @@
synchronized="false"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100745,7 +110168,7 @@
value=""vnd.android.cursor.item/email""
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100756,7 +110179,7 @@
value=""vnd.android.cursor.dir/email""
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100766,7 +110189,7 @@
volatile="false"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100777,7 +110200,7 @@
value=""vnd.android.cursor.item/jabber-im""
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100788,7 +110211,7 @@
value=""vnd.android.cursor.item/postal-address""
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100799,7 +110222,7 @@
value=""vnd.android.cursor.dir/postal-address""
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -100810,6 +110233,2498 @@
value=""vnd.android.cursor.dir/contact-methods""
static="true"
final="true"
+ deprecated="deprecated"
+ visibility="public"
+>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -109559,7 +122723,7 @@
type="android.telephony.NeighboringCellInfo"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -109599,6 +122763,39 @@
visibility="public"
>
+
+
+
+
+
+
@@ -109630,7 +122827,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -109819,6 +123016,23 @@
+
+
+
+
+
+
+
+
@@ -111729,6 +124943,17 @@
visibility="public"
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -116958,6 +130455,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -127706,6 +141370,17 @@
visibility="public"
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -135939,6 +149716,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -138839,6 +152919,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -139020,6 +153228,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -139946,7 +154290,7 @@
value="40"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -139957,7 +154301,7 @@
value="16"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -140307,7 +154651,7 @@
value="2"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -140318,7 +154662,7 @@
value="1"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -140493,6 +154837,32 @@
visibility="public"
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -149722,7 +164269,7 @@
value="1"
static="true"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -150166,6 +164713,17 @@
visibility="public"
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -157449,7 +172096,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157462,7 +172109,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157473,7 +172120,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157484,7 +172131,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157495,7 +172142,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157506,7 +172153,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157519,7 +172166,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157532,7 +172179,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157545,7 +172192,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157558,7 +172205,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157591,14 +172238,14 @@
abstract="false"
static="false"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157617,7 +172264,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157628,7 +172275,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157639,7 +172286,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157650,7 +172297,7 @@
synchronized="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157660,14 +172307,14 @@
abstract="false"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157678,7 +172325,7 @@
synchronized="true"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157691,7 +172338,7 @@
synchronized="true"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157702,7 +172349,7 @@
synchronized="true"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157713,7 +172360,7 @@
synchronized="true"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -157728,13 +172375,51 @@
synchronized="true"
static="false"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -158044,7 +172729,7 @@
abstract="false"
static="false"
final="true"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -158092,7 +172777,7 @@
synchronized="true"
static="true"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -158105,7 +172790,7 @@
synchronized="true"
static="true"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -158118,7 +172803,7 @@
synchronized="true"
static="true"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -158131,7 +172816,7 @@
synchronized="true"
static="true"
final="false"
- deprecated="not deprecated"
+ deprecated="deprecated"
visibility="public"
>
@@ -158243,6 +172928,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -158968,6 +173724,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -159522,6 +174330,44 @@
>
+
+
+
+
+
+
+
+
+
+
@@ -160289,7 +175135,7 @@
visibility="public"
>
-
+
+
+
+
+
+
@@ -161058,6 +175919,171 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
@@ -269613,6 +284976,24 @@
+
+
+
+
+
+
-
+
-
+
@@ -271041,7 +286422,7 @@
deprecated="not deprecated"
visibility="public"
>
-
+
@@ -271101,7 +286482,20 @@
deprecated="not deprecated"
visibility="public"
>
-
+
+
+
+
+
-
+
-
+
@@ -271191,7 +286585,7 @@
deprecated="not deprecated"
visibility="public"
>
-
+
@@ -271207,6 +286601,19 @@
visibility="public"
>
+
+
+
+
-
+
-
+
-
+
-
+
-
-
-
+
-
+
+
+
-
-
-
+
-
+
+
+
-
+
-
+
-
+
@@ -272454,12 +287861,6 @@
deprecated="not deprecated"
visibility="public"
>
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
@@ -273572,7 +288979,7 @@
deprecated="not deprecated"
visibility="public"
>
-
+
-
+
@@ -273777,7 +289184,7 @@
deprecated="not deprecated"
visibility="public"
>
-
+
-
+
@@ -273846,7 +289253,7 @@
deprecated="not deprecated"
visibility="public"
>
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
-
-
-
-
-
+
@@ -303751,7 +319201,7 @@
return="javax.net.ServerSocketFactory"
abstract="false"
native="false"
- synchronized="false"
+ synchronized="true"
static="true"
final="false"
deprecated="not deprecated"
@@ -304541,7 +319991,7 @@
return="javax.net.SocketFactory"
abstract="false"
native="false"
- synchronized="false"
+ synchronized="true"
static="true"
final="false"
deprecated="not deprecated"
diff --git a/api/current.xml b/api/current.xml
index b72fea0e91c20..ca2cceb52a7f1 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -99380,7 +99380,7 @@
type="int"
transient="false"
volatile="false"
- value="10000"
+ value="5"
static="true"
final="true"
deprecated="not deprecated"
diff --git a/core/java/android/content/SyncManager.java b/core/java/android/content/SyncManager.java
index 3877f161f34cb..9757ef68bdaaa 100644
--- a/core/java/android/content/SyncManager.java
+++ b/core/java/android/content/SyncManager.java
@@ -811,7 +811,7 @@ class SyncManager implements OnAccountsUpdateListener {
private long rescheduleWithDelay(SyncOperation syncOperation) {
long newDelayInMs;
- if (syncOperation.delay == 0) {
+ if (syncOperation.delay <= 0) {
// The initial delay is the jitterized INITIAL_SYNC_RETRY_TIME_IN_MS
newDelayInMs = jitterize(INITIAL_SYNC_RETRY_TIME_IN_MS,
(long)(INITIAL_SYNC_RETRY_TIME_IN_MS * 1.1));
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index b9f78a10c6230..0f8bc083980e3 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -151,7 +151,7 @@ public class Build {
* the background tabs have a dark gray background.
*
*/
- public static final int ECLAIR = CUR_DEVELOPMENT;
+ public static final int ECLAIR = 5;
}
/** The type of build, like "user" or "eng". */
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 0bd046974e173..88f16a9867c92 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -482,8 +482,7 @@
"Trabajo"
"Otro"
"Personalizado"
-
-
+ "a través de %1$s"
"%1$s a través de %2$s"
"Ingresar el código de PIN"
"¡Código de PIN incorrecto!"
diff --git a/libs/rs/java/ImageProcessing/Android.mk b/libs/rs/java/ImageProcessing/Android.mk
new file mode 100644
index 0000000000000..5a844d5effb5f
--- /dev/null
+++ b/libs/rs/java/ImageProcessing/Android.mk
@@ -0,0 +1,25 @@
+#
+# Copyright (C) 2009 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+#LOCAL_STATIC_JAVA_LIBRARIES := android.renderscript
+
+LOCAL_PACKAGE_NAME := ImageProcessing
+
+include $(BUILD_PACKAGE)
diff --git a/libs/rs/java/ImageProcessing/AndroidManifest.xml b/libs/rs/java/ImageProcessing/AndroidManifest.xml
new file mode 100644
index 0000000000000..b48d2082ae38d
--- /dev/null
+++ b/libs/rs/java/ImageProcessing/AndroidManifest.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/libs/rs/java/ImageProcessing/res/drawable-hdpi/data.jpg b/libs/rs/java/ImageProcessing/res/drawable-hdpi/data.jpg
new file mode 100644
index 0000000000000..81a87b1726c2c
Binary files /dev/null and b/libs/rs/java/ImageProcessing/res/drawable-hdpi/data.jpg differ
diff --git a/libs/rs/java/ImageProcessing/res/layout/main.xml b/libs/rs/java/ImageProcessing/res/layout/main.xml
new file mode 100644
index 0000000000000..0872cf2a2924a
--- /dev/null
+++ b/libs/rs/java/ImageProcessing/res/layout/main.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/libs/rs/java/ImageProcessing/res/raw/threshold.rs b/libs/rs/java/ImageProcessing/res/raw/threshold.rs
new file mode 100644
index 0000000000000..dec55875cc184
--- /dev/null
+++ b/libs/rs/java/ImageProcessing/res/raw/threshold.rs
@@ -0,0 +1,44 @@
+struct color_s {
+ char b;
+ char g;
+ char r;
+ char a;
+};
+
+void filter(struct color_s *in, struct color_s *out, struct vec3_s *luminanceVector) {
+ struct vec3_s pixel;
+ pixel.x = (in->r & 0xFF) / 255.0f;
+ pixel.y = (in->g & 0xFF) / 255.0f;
+ pixel.z = (in->b & 0xFF) / 255.0f;
+
+ float luminance = vec3Dot(luminanceVector, &pixel);
+ luminance = maxf(0.0f, luminance - Params->threshold);
+ vec3Scale(&pixel, signf(luminance));
+
+ out->a = in->a;
+ out->r = pixel.x * 255.0f;
+ out->g = pixel.y * 255.0f;
+ out->b = pixel.z * 255.0f;
+}
+
+void main() {
+ struct color_s *in = (struct color_s *) InPixel;
+ struct color_s *out = (struct color_s *) OutPixel;
+
+ struct vec3_s luminanceVector;
+ luminanceVector.x = 0.2125f;
+ luminanceVector.y = 0.7154f;
+ luminanceVector.z = 0.0721f;
+
+ int count = Params->inWidth * Params->inHeight;
+ int i;
+
+ for (i = 0; i < count; i++) {
+ filter(in, out, &luminanceVector);
+
+ in++;
+ out++;
+ }
+
+ sendToClient(&count, 1, 4, 0);
+}
diff --git a/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java b/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
new file mode 100644
index 0000000000000..b1facfc5a3b8b
--- /dev/null
+++ b/libs/rs/java/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2009 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.rs.image;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.graphics.BitmapFactory;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.renderscript.ScriptC;
+import android.renderscript.RenderScript;
+import android.renderscript.Type;
+import android.renderscript.Allocation;
+import android.renderscript.Element;
+import android.renderscript.Script;
+import android.view.SurfaceView;
+import android.view.SurfaceHolder;
+import android.widget.ImageView;
+import android.widget.SeekBar;
+
+public class ImageProcessingActivity extends Activity implements SurfaceHolder.Callback {
+ private Bitmap mBitmap;
+ private Params mParams;
+ private Script.Invokable mInvokable;
+ private int[] mOutData;
+
+ @SuppressWarnings({"FieldCanBeLocal"})
+ private RenderScript mRS;
+ @SuppressWarnings({"FieldCanBeLocal"})
+ private Type mParamsType;
+ @SuppressWarnings({"FieldCanBeLocal"})
+ private Allocation mParamsAllocation;
+ @SuppressWarnings({"FieldCanBeLocal"})
+ private Type mPixelType;
+ @SuppressWarnings({"FieldCanBeLocal"})
+ private Allocation mInPixelsAllocation;
+ @SuppressWarnings({"FieldCanBeLocal"})
+ private Allocation mOutPixelsAllocation;
+
+ private SurfaceView mSurfaceView;
+ private ImageView mDisplayView;
+
+ static class Params {
+ public int inWidth;
+ public int outWidth;
+ public int inHeight;
+ public int outHeight;
+
+ public float threshold;
+ }
+
+ static class Pixel {
+ public byte a;
+ public byte r;
+ public byte g;
+ public byte b;
+ }
+
+ class FilterCallback extends RenderScript.RSMessage {
+ private Runnable mAction = new Runnable() {
+ public void run() {
+ mOutPixelsAllocation.readData(mOutData);
+ mBitmap.setPixels(mOutData, 0, mParams.outWidth, 0, 0,
+ mParams.outWidth, mParams.outHeight);
+ mDisplayView.invalidate();
+ }
+ };
+
+ @Override
+ public void run() {
+ mSurfaceView.removeCallbacks(mAction);
+ mSurfaceView.post(mAction);
+ }
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main);
+
+ mBitmap = loadBitmap(R.drawable.data);
+
+ mSurfaceView = (SurfaceView) findViewById(R.id.surface);
+ mSurfaceView.getHolder().addCallback(this);
+
+ mDisplayView = (ImageView) findViewById(R.id.display);
+ mDisplayView.setImageBitmap(mBitmap);
+
+ ((SeekBar) findViewById(R.id.threshold)).setOnSeekBarChangeListener(
+ new SeekBar.OnSeekBarChangeListener() {
+ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+ if (fromUser) {
+ mParams.threshold = progress / 100.0f;
+ mParamsAllocation.data(mParams);
+ mInvokable.execute();
+ }
+ }
+
+ public void onStartTrackingTouch(SeekBar seekBar) {
+ }
+
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ }
+ });
+ }
+
+ public void surfaceCreated(SurfaceHolder holder) {
+ mParams = createParams();
+ mInvokable = createScript();
+
+ mInvokable.execute();
+ }
+
+ public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
+ }
+
+ public void surfaceDestroyed(SurfaceHolder holder) {
+ }
+
+ private Script.Invokable createScript() {
+ mRS = new RenderScript(mSurfaceView.getHolder().getSurface(), false, false);
+ mRS.mMessageCallback = new FilterCallback();
+
+ mParamsType = Type.createFromClass(mRS, Params.class, 1, "Parameters");
+ mParamsAllocation = Allocation.createTyped(mRS, mParamsType);
+ mParamsAllocation.data(mParams);
+
+ final int pixelCount = mParams.inWidth * mParams.inHeight;
+
+ mPixelType = Type.createFromClass(mRS, Pixel.class, 1, "Pixel");
+ mInPixelsAllocation = Allocation.createSized(mRS, Element.USER_I32(mRS),
+ pixelCount);
+ mOutPixelsAllocation = Allocation.createSized(mRS, Element.USER_I32(mRS),
+ pixelCount);
+
+ final int[] data = new int[pixelCount];
+ mBitmap.getPixels(data, 0, mParams.inWidth, 0, 0, mParams.inWidth, mParams.inHeight);
+ mInPixelsAllocation.data(data);
+
+ mOutData = new int[pixelCount];
+ mOutPixelsAllocation.data(mOutData);
+
+ ScriptC.Builder sb = new ScriptC.Builder(mRS);
+ sb.setType(mParamsType, "Params", 0);
+ sb.setType(mPixelType, "InPixel", 1);
+ sb.setType(mPixelType, "OutPixel", 2);
+ sb.setType(true, 2);
+ Script.Invokable invokable = sb.addInvokable("main");
+ sb.setScript(getResources(), R.raw.threshold);
+ sb.setRoot(true);
+
+ ScriptC script = sb.create();
+ script.bindAllocation(mParamsAllocation, 0);
+ script.bindAllocation(mInPixelsAllocation, 1);
+ script.bindAllocation(mOutPixelsAllocation, 2);
+
+ return invokable;
+ }
+
+ private Params createParams() {
+ final Params params = new Params();
+ params.inWidth = params.outWidth = mBitmap.getWidth();
+ params.inHeight = params.outHeight = mBitmap.getHeight();
+ params.threshold = 0.5f;
+ return params;
+ }
+
+ private Bitmap loadBitmap(int resource) {
+ final BitmapFactory.Options options = new BitmapFactory.Options();
+ options.inPreferredConfig = Bitmap.Config.ARGB_8888;
+ return copyBitmap(BitmapFactory.decodeResource(getResources(), resource, options));
+ }
+
+ private static Bitmap copyBitmap(Bitmap source) {
+ Bitmap b = Bitmap.createBitmap(source.getWidth(), source.getHeight(), source.getConfig());
+ Canvas c = new Canvas(b);
+ c.drawBitmap(source, 0, 0, null);
+ source.recycle();
+ return b;
+ }
+}
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp
index 436f48b319efd..5aef56d3fead3 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -227,6 +227,53 @@ static void SC_vec3Scale(vec3_t *lhs, float scale)
lhs->z *= scale;
}
+//////////////////////////////////////////////////////////////////////////////
+// Vec4 routines
+//////////////////////////////////////////////////////////////////////////////
+
+static void SC_vec4Norm(vec4_t *v)
+{
+ float len = sqrtf(v->x * v->x + v->y * v->y + v->z * v->z + v->w * v->w);
+ len = 1 / len;
+ v->x *= len;
+ v->y *= len;
+ v->z *= len;
+ v->w *= len;
+}
+
+static float SC_vec4Length(const vec4_t *v)
+{
+ return sqrtf(v->x * v->x + v->y * v->y + v->z * v->z + v->w * v->w);
+}
+
+static void SC_vec4Add(vec4_t *dest, const vec4_t *lhs, const vec4_t *rhs)
+{
+ dest->x = lhs->x + rhs->x;
+ dest->y = lhs->y + rhs->y;
+ dest->z = lhs->z + rhs->z;
+ dest->w = lhs->w + rhs->w;
+}
+
+static void SC_vec4Sub(vec4_t *dest, const vec4_t *lhs, const vec4_t *rhs)
+{
+ dest->x = lhs->x - rhs->x;
+ dest->y = lhs->y - rhs->y;
+ dest->z = lhs->z - rhs->z;
+ dest->w = lhs->w - rhs->w;
+}
+
+static float SC_vec4Dot(const vec4_t *lhs, const vec4_t *rhs)
+{
+ return lhs->x * rhs->x + lhs->y * rhs->y + lhs->z * rhs->z + lhs->w * rhs->w;
+}
+
+static void SC_vec4Scale(vec4_t *lhs, float scale)
+{
+ lhs->x *= scale;
+ lhs->y *= scale;
+ lhs->z *= scale;
+ lhs->w *= scale;
+}
//////////////////////////////////////////////////////////////////////////////
// Math routines
@@ -286,6 +333,16 @@ static float SC_randf2(float min, float max)
return r / RAND_MAX * (max - min) + min;
}
+static int SC_sign(int value)
+{
+ return (value > 0) - (value < 0);
+}
+
+static float SC_signf(float value)
+{
+ return (value > 0) - (value < 0);
+}
+
static float SC_clampf(float amount, float low, float high)
{
return amount < low ? low : (amount > high ? high : amount);
@@ -1103,6 +1160,10 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = {
"int", "(int)" },
{ "sqrf", (void *)&SC_sqrf,
"float", "(float)" },
+ { "sign", (void *)&SC_sign,
+ "int", "(int)" },
+ { "signf", (void *)&SC_signf,
+ "float", "(float)" },
{ "clamp", (void *)&SC_clamp,
"int", "(int, int, int)" },
{ "clampf", (void *)&SC_clampf,
@@ -1200,6 +1261,20 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = {
{ "vec3Scale", (void *)&SC_vec3Scale,
"void", "(struct vec3_s *lhs, float scale)" },
+ // vec4
+ { "vec4Norm", (void *)&SC_vec4Norm,
+ "void", "(struct vec4_s *)" },
+ { "vec4Length", (void *)&SC_vec4Length,
+ "float", "(struct vec4_s *)" },
+ { "vec4Add", (void *)&SC_vec4Add,
+ "void", "(struct vec4_s *dest, struct vec4_s *lhs, struct vec4_s *rhs)" },
+ { "vec4Sub", (void *)&SC_vec4Sub,
+ "void", "(struct vec4_s *dest, struct vec4_s *lhs, struct vec4_s *rhs)" },
+ { "vec4Dot", (void *)&SC_vec4Dot,
+ "float", "(struct vec4_s *lhs, struct vec4_s *rhs)" },
+ { "vec4Scale", (void *)&SC_vec4Scale,
+ "void", "(struct vec4_s *lhs, float scale)" },
+
// context
{ "bindProgramFragment", (void *)&SC_bindProgramFragment,
"void", "(int)" },