resolved conflicts for merge of cbb74ce5 to master
Change-Id: Ieeaf552ddf2a664bd75fef18ef9be7c1901b0a6d
diff --git a/Android.mk b/Android.mk
index 4b7d5a0..b78e5a8 100644
--- a/Android.mk
+++ b/Android.mk
@@ -40,4 +40,9 @@
$(foreach s,$(TARGET_AVAILABLE_SDK_VERSIONS),$(eval $(call _copy_prebuilt_sdk_to_the_right_place,$(s))))
+# Make sure we install the prebuilt current sdk when you do a checkbuild
+# so later users can run tapas and mm/mmm on an Android.mk with "LOCAL_SDK_VERSION := current".
+# That Android.mk may not be visible to platform build.
+checkbuild : $(call intermediates-dir-for,JAVA_LIBRARIES,sdk_vcurrent,,COMMON)/classes.jar
+
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/api/20.txt b/api/20.txt
index 23682f0..7964357 100644
--- a/api/20.txt
+++ b/api/20.txt
@@ -16301,11 +16301,9 @@
method public static void glGenTextures(int, java.nio.IntBuffer);
method public static void glGenerateMipmap(int);
method public static void glGetActiveAttrib(int, int, int, int[], int, int[], int, int[], int, byte[], int);
- method public static void glGetActiveAttrib(int, int, int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, byte);
method public static java.lang.String glGetActiveAttrib(int, int, int[], int, int[], int);
method public static java.lang.String glGetActiveAttrib(int, int, java.nio.IntBuffer, java.nio.IntBuffer);
method public static void glGetActiveUniform(int, int, int, int[], int, int[], int, int[], int, byte[], int);
- method public static void glGetActiveUniform(int, int, int, java.nio.IntBuffer, java.nio.IntBuffer, java.nio.IntBuffer, byte);
method public static java.lang.String glGetActiveUniform(int, int, int[], int, int[], int);
method public static java.lang.String glGetActiveUniform(int, int, java.nio.IntBuffer, java.nio.IntBuffer);
method public static void glGetAttachedShaders(int, int, int[], int, int[], int);
@@ -16331,7 +16329,6 @@
method public static void glGetShaderPrecisionFormat(int, int, int[], int, int[], int);
method public static void glGetShaderPrecisionFormat(int, int, java.nio.IntBuffer, java.nio.IntBuffer);
method public static void glGetShaderSource(int, int, int[], int, byte[], int);
- method public static void glGetShaderSource(int, int, java.nio.IntBuffer, byte);
method public static java.lang.String glGetShaderSource(int);
method public static void glGetShaderiv(int, int, int[], int);
method public static void glGetShaderiv(int, int, java.nio.IntBuffer);
@@ -17964,7 +17961,6 @@
method public final boolean hasFileDescriptors();
method public final byte[] marshall();
method public static android.os.Parcel obtain();
- method protected static final android.os.Parcel obtain(int);
method public final java.lang.Object[] readArray(java.lang.ClassLoader);
method public final java.util.ArrayList readArrayList(java.lang.ClassLoader);
method public final void readBinderArray(android.os.IBinder[]);
diff --git a/current/android.jar b/current/android.jar
index 7b6307d..24518bc 100644
--- a/current/android.jar
+++ b/current/android.jar
Binary files differ
diff --git a/current/framework.aidl b/current/framework.aidl
index 9bccbe1..9c2537e 100644
--- a/current/framework.aidl
+++ b/current/framework.aidl
@@ -25,10 +25,23 @@
parcelable android.os.DropBoxManager.Entry;
parcelable android.os.ParcelFileDescriptor;
parcelable android.os.ParcelUuid;
+parcelable android.print.PrinterInfo;
+parcelable android.print.PageRange;
+parcelable android.print.PrintAttributes;
+parcelable android.print.PrinterCapabilitiesInfo;
+parcelable android.print.PrinterId;
+parcelable android.print.PrintJobId;
+parcelable android.print.PrintJobInfo;
+parcelable android.view.accessibility.AccessibilityEvent;
+parcelable android.view.accessibility.AccessibilityNodeInfo;
+parcelable android.view.accessibility.AccessibilityRecord;
+parcelable android.view.accessibility.AccessibilityWindowInfo;
parcelable android.view.KeyEvent;
parcelable android.view.MotionEvent;
parcelable android.view.Surface;
parcelable android.view.WindowManager.LayoutParams;
+parcelable android.view.WindowAnimationFrameStats;
+parcelable android.view.WindowContentFrameStats;
parcelable android.widget.RemoteViews;
interface com.android.internal.textservice.ISpellCheckerService;
interface com.android.internal.textservice.ISpellCheckerSession;
diff --git a/current/uiautomator.jar b/current/uiautomator.jar
index 616415c..df138a8 100644
--- a/current/uiautomator.jar
+++ b/current/uiautomator.jar
Binary files differ
diff --git a/renderscript/clang-include/module.map b/renderscript/clang-include/module.map
new file mode 100644
index 0000000..9f7944d
--- /dev/null
+++ b/renderscript/clang-include/module.map
@@ -0,0 +1,156 @@
+module _Builtin_intrinsics [system] {
+ explicit module altivec {
+ requires altivec
+ header "altivec.h"
+ }
+
+ explicit module arm {
+ requires arm
+
+ explicit module neon {
+ requires neon
+ header "arm_neon.h"
+ export *
+ }
+ }
+
+ explicit module intel {
+ requires x86
+ export *
+
+ header "immintrin.h"
+ header "x86intrin.h"
+
+ explicit module mm_malloc {
+ header "mm_malloc.h"
+ export * // note: for <stdlib.h> dependency
+ }
+
+ explicit module cpuid {
+ requires x86
+ header "cpuid.h"
+ }
+
+ explicit module mmx {
+ requires mmx
+ header "mmintrin.h"
+ }
+
+ explicit module f16c {
+ requires f16c
+ header "f16cintrin.h"
+ }
+
+ explicit module sse {
+ requires sse
+ export mmx
+ export * // note: for hackish <emmintrin.h> dependency
+ header "xmmintrin.h"
+ }
+
+ explicit module sse2 {
+ requires sse2
+ export sse
+ header "emmintrin.h"
+ }
+
+ explicit module sse3 {
+ requires sse3
+ export sse2
+ header "pmmintrin.h"
+ }
+
+ explicit module ssse3 {
+ requires ssse3
+ export sse3
+ header "tmmintrin.h"
+ }
+
+ explicit module sse4_1 {
+ requires sse41
+ export ssse3
+ header "smmintrin.h"
+ }
+
+ explicit module sse4_2 {
+ requires sse42
+ export sse4_1
+ header "nmmintrin.h"
+ }
+
+ explicit module sse4a {
+ requires sse4a
+ export sse3
+ header "ammintrin.h"
+ }
+
+ explicit module avx {
+ requires avx
+ export sse4_2
+ header "avxintrin.h"
+ }
+
+ explicit module avx2 {
+ requires avx2
+ export avx
+ header "avx2intrin.h"
+ }
+
+ explicit module bmi {
+ requires bmi
+ header "bmiintrin.h"
+ }
+
+ explicit module bmi2 {
+ requires bmi2
+ header "bmi2intrin.h"
+ }
+
+ explicit module fma {
+ requires fma
+ header "fmaintrin.h"
+ }
+
+ explicit module fma4 {
+ requires fma4
+ export sse3
+ header "fma4intrin.h"
+ }
+
+ explicit module lzcnt {
+ requires lzcnt
+ header "lzcntintrin.h"
+ }
+
+ explicit module popcnt {
+ requires popcnt
+ header "popcntintrin.h"
+ }
+
+ explicit module mm3dnow {
+ requires mm3dnow
+ header "mm3dnow.h"
+ }
+
+ explicit module xop {
+ requires xop
+ export fma4
+ header "xopintrin.h"
+ }
+
+ explicit module aes_pclmul {
+ requires aes, pclmul
+ header "wmmintrin.h"
+ }
+
+ explicit module aes {
+ requires aes
+ header "__wmmintrin_aes.h"
+ }
+
+ explicit module pclmul {
+ requires pclmul
+ header "__wmmintrin_pclmul.h"
+ }
+ }
+}
diff --git a/tools/Android.mk b/tools/Android.mk
index 9e8a1b6..06d878b 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -120,6 +120,55 @@
$(hide) chmod 755 $@
##################################
+include $(CLEAR_VARS)
+
+# We have to call copy-file-to-new-target instead of simply including
+# $(BUILD_PREBUILT) here, because we must put dx.jar, shrinkedAndroid.jar and mainDexClasses.rules
+# as dependecy of mainDexClasses.
+
+LOCAL_MODULE := mainDexClasses
+LOCAL_IS_HOST_MODULE := true
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/dx$(COMMON_JAVA_PACKAGE_SUFFIX)
+$(LOCAL_BUILT_MODULE): $(HOST_OUT_JAVA_LIBRARIES)/shrinkedAndroid$(COMMON_JAVA_PACKAGE_SUFFIX)
+$(LOCAL_BUILT_MODULE): $(HOST_OUT_EXECUTABLES)/mainDexClasses.rules
+$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/mainDexClasses | $(ACP)
+ @echo "Copy: $(PRIVATE_MODULE) ($@)"
+ $(copy-file-to-new-target)
+ $(hide) chmod 755 $@
+
+##################################
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := mainDexClasses.rules
+LOCAL_SRC_FILES := mainDexClasses.rules
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX :=
+LOCAL_BUILT_MODULE_STEM := mainDexClasses.rules
+LOCAL_IS_HOST_MODULE := true
+
+include $(BUILD_PREBUILT)
+
+##################################
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := shrinkedAndroid
+LOCAL_SRC_FILES := lib/shrinkedAndroid.jar
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
+LOCAL_BUILT_MODULE_STEM := dx$(COMMON_JAVA_PACKAGE_SUFFIX)
+LOCAL_IS_HOST_MODULE := true
+
+include $(BUILD_PREBUILT)
+
+##################################
endif # TARGET_BUILD_APPS or TARGET_BUILD_PDK
diff --git a/tools/darwin/aapt b/tools/darwin/aapt
index 6782fd0..5abf528 100755
--- a/tools/darwin/aapt
+++ b/tools/darwin/aapt
Binary files differ
diff --git a/tools/lib/dx.jar b/tools/lib/dx.jar
index 746163b..40c0590 100644
--- a/tools/lib/dx.jar
+++ b/tools/lib/dx.jar
Binary files differ
diff --git a/tools/lib/shrinkedAndroid.jar b/tools/lib/shrinkedAndroid.jar
new file mode 100644
index 0000000..68b53fc
--- /dev/null
+++ b/tools/lib/shrinkedAndroid.jar
Binary files differ
diff --git a/tools/linux/aapt b/tools/linux/aapt
index 19bdd8c..0ea2faa 100755
--- a/tools/linux/aapt
+++ b/tools/linux/aapt
Binary files differ
diff --git a/tools/mainDexClasses b/tools/mainDexClasses
new file mode 100755
index 0000000..034d47e
--- /dev/null
+++ b/tools/mainDexClasses
@@ -0,0 +1,158 @@
+#!/bin/bash
+#
+# Copyright (C) 2013 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.
+
+function makeTempJar ()
+{
+ local tempDir=/tmp
+ if [ ! -e "${tempDir}" ]; then
+ tempDir=.
+ fi
+ local tempfile="${tempDir}/mainDexClasses-$$.tmp.jar"
+ if [ -e "${tempfile}" ]; then
+ echo "Failed to create temporary file" >2
+ exit 6
+ fi
+ echo "${tempfile}"
+}
+
+function cleanTmp ()
+{
+ if [ -e "${tmpOut}" ] ; then
+ rm "${tmpOut}"
+ fi
+}
+
+
+# Set up prog to be the path of this script, including following symlinks,
+# and set up progdir to be the fully-qualified pathname of its directory.
+prog="$0"
+
+while [ -h "${prog}" ]; do
+ newProg=`/bin/ls -ld "${prog}"`
+ newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
+ if expr "x${newProg}" : 'x/' >/dev/null; then
+ prog="${newProg}"
+ else
+ progdir=`dirname "${prog}"`
+ prog="${progdir}/${newProg}"
+ fi
+done
+oldwd=`pwd`
+progdir=`dirname "${prog}"`
+cd "${progdir}"
+progdir=`pwd`
+prog="${progdir}"/`basename "${prog}"`
+cd "${oldwd}"
+
+baserules="${progdir}"/mainDexClasses.rules
+if [ ! -r ${baserules} ]; then
+ echo `basename "$prog"`": can't find mainDexClasses.rules" 1>&2
+ exit 1
+fi
+
+jarfile=dx.jar
+libdir="$progdir"
+
+if [ ! -r "$libdir/$jarfile" ]; then
+ # set dx.jar location for the SDK case
+ libdir="$libdir/lib"
+fi
+
+
+if [ ! -r "$libdir/$jarfile" ]; then
+ # set dx.jar location for the Android tree case
+ libdir=`dirname "$progdir"`/framework
+fi
+
+if [ ! -r "$libdir/$jarfile" ]; then
+ echo `basename "$prog"`": can't find $jarfile" 1>&2
+ exit 1
+fi
+
+proguardExec="proguard.sh"
+proguard=${PROGUARD_HOME}/bin/${proguardExec}
+
+if [ ! -r "${proguard}" ]; then
+ # set proguard location for the SDK case
+ proguardBaseDir=`dirname "$progdir"`
+ # "${progdir}"/../..
+ proguardBaseDir=`dirname "$proguardBaseDir"`
+ proguard="${proguardBaseDir}"/tools/proguard/bin/${proguardExec}
+fi
+
+if [ ! -r "${proguard}" ]; then
+ # set proguard location for the Android tree case
+ proguardBaseDir=`dirname "$proguardBaseDir"`
+ # "${progdir}"/../../../..
+ proguardBaseDir=`dirname "$proguardBaseDir"`
+ proguard="${proguardBaseDir}"/external/proguard/bin/${proguardExec}
+fi
+
+if [ ! -r "${proguard}" ]; then
+ proguard="`which proguard`"
+fi
+
+if [ -z "${proguard}" -o ! -r "${proguard}" ]; then
+ proguard="`which ${proguardExec}`"
+fi
+
+if [ -z "${proguard}" -o ! -r "${proguard}" ]; then
+ echo `basename "$prog"`": can't find ${proguardExec}" 1>&2
+ exit 1
+fi
+
+shrinkedAndroidJar="${SHRINKED_ANDROID_JAR}"
+if [ -z "${shrinkedAndroidJar}" ]; then
+ shrinkedAndroidJar=shrinkedAndroid.jar
+fi
+
+if [ ! -r "${shrinkedAndroidJar}" ]; then
+ shrinkedAndroidJar=${libdir}/${shrinkedAndroidJar}
+fi
+
+if [ ! -r "${shrinkedAndroidJar}" ]; then
+ echo `basename "$prog"`": can't find shrinkedAndroid.jar" 1>&2
+ exit 1
+fi
+
+if [ "$OSTYPE" = "cygwin" ]; then
+ # For Cygwin, convert the jarfile path into native Windows style.
+ jarpath=`cygpath -w "$libdir/$jarfile"`
+ proguard=`cygpath -w "${proguard}"`
+ shrinkedAndroidJar=`cygpath -w "${shrinkedAndroidJar}"`
+else
+ jarpath="$libdir/$jarfile"
+fi
+
+if expr "x$1" : 'x--output' >/dev/null; then
+ exec 1>$2
+ shift 2
+fi
+
+if [ $# -ne 1 ]; then
+ echo "Usage : $0 [--output <output file>] <application path>" 1>&2
+ exit 2
+fi
+
+tmpOut=`makeTempJar`
+
+trap cleanTmp 0
+
+${proguard} -injars ${@} -dontwarn -forceprocessing -outjars ${tmpOut} \
+ -libraryjars "${shrinkedAndroidJar}" -dontoptimize -dontobfuscate -dontpreverify \
+ -include "${baserules}" 1>/dev/null || exit 10
+
+java -cp "$jarpath" com.android.multidex.ClassReferenceListBuilder "${tmpOut}" ${@} || exit 11
diff --git a/tools/mainDexClasses.rules b/tools/mainDexClasses.rules
new file mode 100644
index 0000000..f57cbdd
--- /dev/null
+++ b/tools/mainDexClasses.rules
@@ -0,0 +1,22 @@
+ -keep public class * extends android.app.Instrumentation {
+ <init>();
+ }
+ -keep public class * extends android.app.Application {
+ <init>();
+ void attachBaseContext(android.content.Context);
+ }
+ -keep public class * extends android.app.Activity {
+ <init>();
+ }
+ -keep public class * extends android.app.Service {
+ <init>();
+ }
+ -keep public class * extends android.content.ContentProvider {
+ <init>();
+ }
+ -keep public class * extends android.content.BroadcastReceiver {
+ <init>();
+ }
+ -keep public class * extends android.app.backup.BackupAgent {
+ <init>();
+ }