32807795 Security Vulnerability - AOSP Messaging App: thirdparty can attach private files from "/data/data/com.android.messaging/" directory to the messaging app. am: a2aa53f83a am: 90bf70396d am: 305a004e19 am: 2397f2fbef am: 313284eee7 am: 4dfcff98da am: 615f6d0b17 am: 49b092f602
am: a9bec8503b
Change-Id: Iecfaa9939f7ae7651a8fd8b1ba1a256e0945245c
diff --git a/Android.mk b/Android.mk
index e2ed18b..06ac9e6 100644
--- a/Android.mk
+++ b/Android.mk
@@ -64,11 +64,11 @@
LOCAL_REQUIRED_MODULES:= libframesequence libgiftranscode
endif
-LOCAL_PROGUARD_FLAGS := -ignorewarnings -include build/core/proguard_basic_keeps.flags
+LOCAL_PROGUARD_FLAGS := -ignorewarnings
LOCAL_PROGUARD_ENABLED := nosystem
-LOCAL_PROGUARD_FLAG_FILES := proguard.flags
+LOCAL_PROGUARD_FLAG_FILES := ../../../build/core/proguard_basic_keeps.flags proguard.flags
ifeq (eng,$(TARGET_BUILD_VARIANT))
LOCAL_PROGUARD_FLAG_FILES += proguard-test.flags
else
diff --git a/jni/Android.mk b/jni/Android.mk
index cd89b8f..dbc0674 100644
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -29,7 +29,7 @@
LOCAL_CFLAGS += -Wall -Wno-unused-parameter -Wno-switch
-LOCAL_SDK_VERSION := 8
+LOCAL_SDK_VERSION := 19
LOCAL_NDK_STL_VARIANT := c++_static # LLVM libc++
include $(BUILD_SHARED_LIBRARY)
diff --git a/jni/GifTranscoder.cpp b/jni/GifTranscoder.cpp
index a7f5c74..2169905 100644
--- a/jni/GifTranscoder.cpp
+++ b/jni/GifTranscoder.cpp
@@ -24,7 +24,7 @@
#include "GifTranscoder.h"
-#define SQUARE(a) (a)*(a)
+#define SQUARE(a) ((a)*(a))
// GIF does not support partial transparency, so our alpha channels are always 0x0 or 0xff.
static const ColorARGB TRANSPARENT = 0x0;
@@ -37,7 +37,7 @@
#define MAKE_COLOR_ARGB(a, r, g, b) \
((a) << 24 | (r) << 16 | (g) << 8 | (b))
-#define MAX_COLOR_DISTANCE 255 * 255 * 255
+#define MAX_COLOR_DISTANCE (255 * 255 * 255)
#define TAG "GifTranscoder.cpp"
#define LOGD_ENABLED 0
diff --git a/proguard.flags b/proguard.flags
index 76b033c..759f2d4 100644
--- a/proguard.flags
+++ b/proguard.flags
@@ -23,7 +23,7 @@
}
# Keep methods that have the @VisibleForAnimation annotation
--keep interface com.android.messaging.annotation.VisibleForAnimation
+-keep @interface com.android.messaging.annotation.VisibleForAnimation
-keepclassmembers class * {
@com.android.messaging.annotation.VisibleForAnimation *;
}