switch to appcompat. b/16664350

Currently only for MailActivity, ComposeActivity,
and FolderSelectionActivity.

Any activity that inherits from ActionBarActivity must
use an Appcompat-derived style. Three styles currently
exist: UnifiedEmail.Appcompat, UnifiedEmail.Appcompat.Toolbar,
and ShortcutWidgetTheme are all based on appcompat.

go/appcompat-material-doc contains the full migration guide.

The fast version is:
All MenuItem-related work that relates to actions must use
the MenuItemCompat-equivalent.
Any theming should use the appcompat versions which don't require
a namespace prefix. For instance, use actionBarStyle instead of
android:actionBarStyle.

There are a few missing styles on views that can't use appcompat versions.
Those still use style overrides for v21 changes. All others use appcompat versions.

A few methods on activity should now use the support equivalents:
getSupportActionBar()
supportInvalidateOptionsMenu()
startSupportActionMode()

Change-Id: Ic6f5964f4115ab4bde49c19df5fe49c9086df965
diff --git a/Android.mk b/Android.mk
index 4775d68..ef3693a 100644
--- a/Android.mk
+++ b/Android.mk
@@ -17,12 +17,13 @@
 # Include res dir from chips
 chips_dir := ../../../frameworks/opt/chips/res
 
-#Include res dir from photoviewer
+#Include res dir from libraries
+appcompat_dir := ../../../prebuilts/sdk/current/support/v7/appcompat/res
 photo_dir := ../../../frameworks/opt/photoviewer/res ../../../frameworks/opt/photoviewer/activity/res
 gridlayout_dir := ../../../prebuilts/sdk/current/support/v7/gridlayout/res
 bitmap_dir := ../../../frameworks/opt/bitmap/res
 datetimepicker_dir := ../../../frameworks/opt/datetimepicker/res
-res_dirs := res $(chips_dir) $(photo_dir) $(gridlayout_dir) $(bitmap_dir) $(datetimepicker_dir)
+res_dirs := res $(appcompat_dir) $(chips_dir) $(photo_dir) $(gridlayout_dir) $(bitmap_dir) $(datetimepicker_dir)
 
 ##################################################
 # Build APK
@@ -36,6 +37,7 @@
 LOCAL_STATIC_JAVA_LIBRARIES += guava
 LOCAL_STATIC_JAVA_LIBRARIES += android-common
 LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
+LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat
 LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-gridlayout
 LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13
 LOCAL_STATIC_JAVA_LIBRARIES += android-opt-bitmap
@@ -48,7 +50,7 @@
         $(call all-logtags-files-under, $(src_dirs))
 LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))
 LOCAL_AAPT_FLAGS := --auto-add-overlay
-LOCAL_AAPT_FLAGS += --extra-packages com.android.ex.chips:com.android.ex.photo:android.support.v7.gridlayout:com.android.bitmap:com.android.datetimepicker
+LOCAL_AAPT_FLAGS += --extra-packages com.android.ex.chips:com.android.ex.photo:android.support.v7.appcompat:android.support.v7.gridlayout:com.android.bitmap:com.android.datetimepicker
 
 LOCAL_PROGUARD_FLAG_FILES := proguard.flags