From 0ee2a3ccee6b5646ab06e2ec2a130861ab63cca7 Mon Sep 17 00:00:00 2001 From: Andy Huang Date: Tue, 6 Mar 2012 16:28:59 -0800 Subject: [PATCH] Fix conversation view problems in Email2 The JavaScript in the assets/ dir wasn't inherited from UnifiedEmail, and UnifiedEmail's ProGuard flags were being ignored. Also refactor a bit of the makefile. Change-Id: Ic3de41f3eb1882831d61b8ae34e4dd298660acdb --- email2/Android.mk | 18 +++++++++++------- email2/proguard.flags | 25 +------------------------ 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/email2/Android.mk b/email2/Android.mk index b26a3e73b..e7fd1cb29 100644 --- a/email2/Android.mk +++ b/email2/Android.mk @@ -2,18 +2,18 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) -# Include res dir from chips -chips_dir := ../../../../frameworks/ex/chips/res +chips_dir := ../../../../frameworks/ex/chips +unified_email_dir := ../../../../packages/apps/UnifiedEmail +# Include res dir from chips # Include res dir from UnifiedEmail -unified_email_dir := ../../UnifiedEmail/res -res_dirs := res $(chips_dir) $(unified_email_dir) +res_dirs := res $(chips_dir)/res $(unified_email_dir)/res LOCAL_MODULE_TAGS := optional src_dirs := src \ - ../../UnifiedEmail/src \ - ../../UnifiedEmail/email_src + $(unified_email_dir)/src \ + $(unified_email_dir)/email_src LOCAL_STATIC_JAVA_LIBRARIES := android-common-chips @@ -29,6 +29,10 @@ LOCAL_SRC_FILES := $(call all-java-files-under, $(src_dirs)) \ LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs)) +# Use assets dir from UnifiedEmail +# (the default package target doesn't seem to deal with multiple asset dirs) +LOCAL_ASSET_DIR := $(LOCAL_PATH)/$(unified_email_dir)/assets + LOCAL_AAPT_FLAGS := \ --auto-add-overlay \ --rename-manifest-package com.android.email2 \ @@ -38,7 +42,7 @@ LOCAL_PACKAGE_NAME := Email2 LOCAL_OVERRIDES_PACKAGES := UnifiedEmail -LOCAL_PROGUARD_FLAG_FILES := proguard.flags +LOCAL_PROGUARD_FLAG_FILES := proguard.flags $(unified_email_dir)/proguard.flags include $(BUILD_PACKAGE) diff --git a/email2/proguard.flags b/email2/proguard.flags index 87838223b..325f366a3 100644 --- a/email2/proguard.flags +++ b/email2/proguard.flags @@ -1,25 +1,2 @@ -# The support library contains references to newer platform versions. -# Don't warn about those in case this app is linking against an older -# platform version. We know about them, and they are safe. +#Email-specific proguard flags that are not covered by UnifiedEmail go here (none so far) --dontwarn android.support.v4.** --dontwarn android.support.v13.** - -# keep names that are used by reflection, from javascript or from unit tests - --keepclasseswithmembers class com.android.mail.providers.UIProvider { - *** getAccountsUri(...); -} - --keepclasseswithmembers class com.android.mail.utils.LogUtils { - public ; -} - - --keepclasseswithmembers class com.google.common.collect.Sets { - *** of(...); -} - --keepclasseswithmembers class com.android.mail.UnifiedEmail { - public ; -}