Merge "Import translations. DO NOT MERGE" into jb-ub-mail-ur9
diff --git a/Android.mk b/Android.mk
index 3c130fc..a1c9cb6 100644
--- a/Android.mk
+++ b/Android.mk
@@ -34,7 +34,6 @@
LOCAL_STATIC_JAVA_LIBRARIES += android-common
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v4
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13
-LOCAL_STATIC_JAVA_LIBRARIES += unified-email-analytics
LOCAL_SDK_VERSION := current
diff --git a/analytics/Android.mk b/analytics/Android.mk
deleted file mode 100644
index 9752f95..0000000
--- a/analytics/Android.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
- unified-email-analytics:libGoogleAnalyticsV2.jar
-
-include $(BUILD_MULTI_PREBUILT)
diff --git a/analytics/libGoogleAnalyticsV2.jar b/analytics/libGoogleAnalyticsV2.jar
deleted file mode 100755
index 48e1b1d..0000000
--- a/analytics/libGoogleAnalyticsV2.jar
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/header_convo_view_sender_bg_holo.9.png b/res/drawable-hdpi/header_convo_view_sender_bg_holo.9.png
deleted file mode 100644
index bfc020e..0000000
--- a/res/drawable-hdpi/header_convo_view_sender_bg_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/list_activated_holo.9.png b/res/drawable-hdpi/list_activated_holo.9.png
deleted file mode 100644
index f7337c3..0000000
--- a/res/drawable-hdpi/list_activated_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/panel_conversation_leftstroke.9.png b/res/drawable-hdpi/panel_conversation_leftstroke.9.png
deleted file mode 100644
index bd7b695..0000000
--- a/res/drawable-hdpi/panel_conversation_leftstroke.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/progressbar_indeterminate_holo1.png b/res/drawable-hdpi/progressbar_indeterminate_holo1.png
index 6d345be..4246d83 100644
--- a/res/drawable-hdpi/progressbar_indeterminate_holo1.png
+++ b/res/drawable-hdpi/progressbar_indeterminate_holo1.png
Binary files differ
diff --git a/res/drawable-hdpi/progressbar_indeterminate_holo2.png b/res/drawable-hdpi/progressbar_indeterminate_holo2.png
index 2ac4f09..29eb64e 100644
--- a/res/drawable-hdpi/progressbar_indeterminate_holo2.png
+++ b/res/drawable-hdpi/progressbar_indeterminate_holo2.png
Binary files differ
diff --git a/res/drawable-hdpi/progressbar_indeterminate_holo3.png b/res/drawable-hdpi/progressbar_indeterminate_holo3.png
index 2a43175..3b51ddc 100644
--- a/res/drawable-hdpi/progressbar_indeterminate_holo3.png
+++ b/res/drawable-hdpi/progressbar_indeterminate_holo3.png
Binary files differ
diff --git a/res/drawable-hdpi/progressbar_indeterminate_holo4.png b/res/drawable-hdpi/progressbar_indeterminate_holo4.png
index 9ae134d..6e5e42f 100644
--- a/res/drawable-hdpi/progressbar_indeterminate_holo4.png
+++ b/res/drawable-hdpi/progressbar_indeterminate_holo4.png
Binary files differ
diff --git a/res/drawable-hdpi/progressbar_indeterminate_holo5.png b/res/drawable-hdpi/progressbar_indeterminate_holo5.png
index 538a446..fe41b55 100644
--- a/res/drawable-hdpi/progressbar_indeterminate_holo5.png
+++ b/res/drawable-hdpi/progressbar_indeterminate_holo5.png
Binary files differ
diff --git a/res/drawable-hdpi/progressbar_indeterminate_holo6.png b/res/drawable-hdpi/progressbar_indeterminate_holo6.png
index 4077eb1..2ec95b8 100644
--- a/res/drawable-hdpi/progressbar_indeterminate_holo6.png
+++ b/res/drawable-hdpi/progressbar_indeterminate_holo6.png
Binary files differ
diff --git a/res/drawable-hdpi/progressbar_indeterminate_holo7.png b/res/drawable-hdpi/progressbar_indeterminate_holo7.png
index f882f90..2ea5e97 100644
--- a/res/drawable-hdpi/progressbar_indeterminate_holo7.png
+++ b/res/drawable-hdpi/progressbar_indeterminate_holo7.png
Binary files differ
diff --git a/res/drawable-hdpi/progressbar_indeterminate_holo8.png b/res/drawable-hdpi/progressbar_indeterminate_holo8.png
index 8f66117..f6b764b 100644
--- a/res/drawable-hdpi/progressbar_indeterminate_holo8.png
+++ b/res/drawable-hdpi/progressbar_indeterminate_holo8.png
Binary files differ
diff --git a/res/drawable-hdpi/progressbar_solid_holo.png b/res/drawable-hdpi/progressbar_solid_holo.png
index 92245b4..a285bbc 100644
--- a/res/drawable-hdpi/progressbar_solid_holo.png
+++ b/res/drawable-hdpi/progressbar_solid_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/header_convo_view_sender_bg_holo.9.png b/res/drawable-mdpi/header_convo_view_sender_bg_holo.9.png
deleted file mode 100644
index 2afef3c..0000000
--- a/res/drawable-mdpi/header_convo_view_sender_bg_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/list_activated_holo.9.png b/res/drawable-mdpi/list_activated_holo.9.png
deleted file mode 100644
index a644f4b..0000000
--- a/res/drawable-mdpi/list_activated_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/panel_conversation_leftstroke.9.png b/res/drawable-mdpi/panel_conversation_leftstroke.9.png
deleted file mode 100644
index 5559070..0000000
--- a/res/drawable-mdpi/panel_conversation_leftstroke.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/progressbar_indeterminate_holo1.png b/res/drawable-mdpi/progressbar_indeterminate_holo1.png
index 94316ab..bc13597 100644
--- a/res/drawable-mdpi/progressbar_indeterminate_holo1.png
+++ b/res/drawable-mdpi/progressbar_indeterminate_holo1.png
Binary files differ
diff --git a/res/drawable-mdpi/progressbar_indeterminate_holo2.png b/res/drawable-mdpi/progressbar_indeterminate_holo2.png
index bcd35d9..f7ba10c 100644
--- a/res/drawable-mdpi/progressbar_indeterminate_holo2.png
+++ b/res/drawable-mdpi/progressbar_indeterminate_holo2.png
Binary files differ
diff --git a/res/drawable-mdpi/progressbar_indeterminate_holo3.png b/res/drawable-mdpi/progressbar_indeterminate_holo3.png
index 9b914ed..c5ce419 100644
--- a/res/drawable-mdpi/progressbar_indeterminate_holo3.png
+++ b/res/drawable-mdpi/progressbar_indeterminate_holo3.png
Binary files differ
diff --git a/res/drawable-mdpi/progressbar_indeterminate_holo4.png b/res/drawable-mdpi/progressbar_indeterminate_holo4.png
index c945633..46f01d2 100644
--- a/res/drawable-mdpi/progressbar_indeterminate_holo4.png
+++ b/res/drawable-mdpi/progressbar_indeterminate_holo4.png
Binary files differ
diff --git a/res/drawable-mdpi/progressbar_indeterminate_holo5.png b/res/drawable-mdpi/progressbar_indeterminate_holo5.png
index 98c595d..19a4d65 100644
--- a/res/drawable-mdpi/progressbar_indeterminate_holo5.png
+++ b/res/drawable-mdpi/progressbar_indeterminate_holo5.png
Binary files differ
diff --git a/res/drawable-mdpi/progressbar_indeterminate_holo6.png b/res/drawable-mdpi/progressbar_indeterminate_holo6.png
index 1ab459f..baf6b4a 100644
--- a/res/drawable-mdpi/progressbar_indeterminate_holo6.png
+++ b/res/drawable-mdpi/progressbar_indeterminate_holo6.png
Binary files differ
diff --git a/res/drawable-mdpi/progressbar_indeterminate_holo7.png b/res/drawable-mdpi/progressbar_indeterminate_holo7.png
index 897e543..844968b 100644
--- a/res/drawable-mdpi/progressbar_indeterminate_holo7.png
+++ b/res/drawable-mdpi/progressbar_indeterminate_holo7.png
Binary files differ
diff --git a/res/drawable-mdpi/progressbar_indeterminate_holo8.png b/res/drawable-mdpi/progressbar_indeterminate_holo8.png
index c5d8699..2045f5c 100644
--- a/res/drawable-mdpi/progressbar_indeterminate_holo8.png
+++ b/res/drawable-mdpi/progressbar_indeterminate_holo8.png
Binary files differ
diff --git a/res/drawable-mdpi/progressbar_solid_holo.png b/res/drawable-mdpi/progressbar_solid_holo.png
index 1e2f23a..e27c12a 100644
--- a/res/drawable-mdpi/progressbar_solid_holo.png
+++ b/res/drawable-mdpi/progressbar_solid_holo.png
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/list_focused_holo.9.png b/res/drawable-sw600dp-hdpi/list_focused_holo.9.png
deleted file mode 100644
index daaf0b3..0000000
--- a/res/drawable-sw600dp-hdpi/list_focused_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/list_pressed_holo.9.png b/res/drawable-sw600dp-hdpi/list_pressed_holo.9.png
deleted file mode 100644
index dfb9d5f..0000000
--- a/res/drawable-sw600dp-hdpi/list_pressed_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/list_read_holo.9.png b/res/drawable-sw600dp-hdpi/list_read_holo.9.png
deleted file mode 100644
index b4712a0..0000000
--- a/res/drawable-sw600dp-hdpi/list_read_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/list_selected_holo.9.png b/res/drawable-sw600dp-hdpi/list_selected_holo.9.png
deleted file mode 100644
index 01645c4..0000000
--- a/res/drawable-sw600dp-hdpi/list_selected_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-hdpi/list_unread_holo.9.png b/res/drawable-sw600dp-hdpi/list_unread_holo.9.png
deleted file mode 100644
index bd0f967..0000000
--- a/res/drawable-sw600dp-hdpi/list_unread_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/list_focused_holo.9.png b/res/drawable-sw600dp-mdpi/list_focused_holo.9.png
deleted file mode 100644
index 745aa91..0000000
--- a/res/drawable-sw600dp-mdpi/list_focused_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/list_pressed_holo.9.png b/res/drawable-sw600dp-mdpi/list_pressed_holo.9.png
deleted file mode 100644
index bd514d8..0000000
--- a/res/drawable-sw600dp-mdpi/list_pressed_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/list_read_holo.9.png b/res/drawable-sw600dp-mdpi/list_read_holo.9.png
deleted file mode 100644
index 34e6052..0000000
--- a/res/drawable-sw600dp-mdpi/list_read_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/list_selected_holo.9.png b/res/drawable-sw600dp-mdpi/list_selected_holo.9.png
deleted file mode 100644
index 3dc2662..0000000
--- a/res/drawable-sw600dp-mdpi/list_selected_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-mdpi/list_unread_holo.9.png b/res/drawable-sw600dp-mdpi/list_unread_holo.9.png
deleted file mode 100644
index c06ea59..0000000
--- a/res/drawable-sw600dp-mdpi/list_unread_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/list_focused_holo.9.png b/res/drawable-sw600dp-xhdpi/list_focused_holo.9.png
deleted file mode 100644
index 3d8b4a1..0000000
--- a/res/drawable-sw600dp-xhdpi/list_focused_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/list_pressed_holo.9.png b/res/drawable-sw600dp-xhdpi/list_pressed_holo.9.png
deleted file mode 100644
index 4e7349e..0000000
--- a/res/drawable-sw600dp-xhdpi/list_pressed_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/list_read_holo.9.png b/res/drawable-sw600dp-xhdpi/list_read_holo.9.png
deleted file mode 100644
index 176e2d0..0000000
--- a/res/drawable-sw600dp-xhdpi/list_read_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/list_selected_holo.9.png b/res/drawable-sw600dp-xhdpi/list_selected_holo.9.png
deleted file mode 100644
index 43348db..0000000
--- a/res/drawable-sw600dp-xhdpi/list_selected_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp-xhdpi/list_unread_holo.9.png b/res/drawable-sw600dp-xhdpi/list_unread_holo.9.png
deleted file mode 100644
index 6ebf1f9..0000000
--- a/res/drawable-sw600dp-xhdpi/list_unread_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-sw600dp/conversation_read_selector.xml b/res/drawable-sw600dp/conversation_read_selector.xml
deleted file mode 100644
index 1e9751a..0000000
--- a/res/drawable-sw600dp/conversation_read_selector.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011 Google Inc.
- Licensed to 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.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_focused="true"
- android:drawable="@drawable/list_arrow_focused_holo" />
- <item android:state_pressed="true"
- android:drawable="@drawable/list_pressed_holo" />
- <item android:state_selected="true"
- android:state_activated="true"
- android:drawable="@drawable/list_arrow_selected_holo" />
- <item android:state_activated="true"
- android:drawable="@drawable/list_arrow_activated_holo" />
- <item android:state_selected="true"
- android:drawable="@drawable/list_selected_holo" />
- <item android:drawable="@drawable/list_read_holo" />
-</selector>
diff --git a/res/drawable-sw600dp/conversation_unread_selector.xml b/res/drawable-sw600dp/conversation_unread_selector.xml
deleted file mode 100644
index 4784808..0000000
--- a/res/drawable-sw600dp/conversation_unread_selector.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011 Google Inc.
- Licensed to 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.
--->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_focused="true"
- android:drawable="@drawable/list_arrow_focused_holo" />
- <item android:state_pressed="true"
- android:drawable="@drawable/list_pressed_holo" />
- <item android:state_selected="true"
- android:state_activated="true"
- android:drawable="@drawable/list_arrow_selected_holo" />
- <item android:state_activated="true"
- android:drawable="@drawable/list_arrow_activated_holo" />
- <item android:state_selected="true"
- android:drawable="@drawable/list_selected_holo" />
- <item android:drawable="@drawable/list_unread_holo" />
-</selector>
diff --git a/res/drawable-xhdpi/header_convo_view_sender_bg_holo.9.png b/res/drawable-xhdpi/header_convo_view_sender_bg_holo.9.png
deleted file mode 100644
index 3f57a7b..0000000
--- a/res/drawable-xhdpi/header_convo_view_sender_bg_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/list_activated_holo.9.png b/res/drawable-xhdpi/list_activated_holo.9.png
deleted file mode 100644
index 01364e7..0000000
--- a/res/drawable-xhdpi/list_activated_holo.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/panel_conversation_leftstroke.9.png b/res/drawable-xhdpi/panel_conversation_leftstroke.9.png
deleted file mode 100644
index 92b6033..0000000
--- a/res/drawable-xhdpi/panel_conversation_leftstroke.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/progressbar_indeterminate_holo1.png b/res/drawable-xhdpi/progressbar_indeterminate_holo1.png
index 0a4cd4b..5ad2938 100644
--- a/res/drawable-xhdpi/progressbar_indeterminate_holo1.png
+++ b/res/drawable-xhdpi/progressbar_indeterminate_holo1.png
Binary files differ
diff --git a/res/drawable-xhdpi/progressbar_indeterminate_holo2.png b/res/drawable-xhdpi/progressbar_indeterminate_holo2.png
index 78f98e3..7cf2952 100644
--- a/res/drawable-xhdpi/progressbar_indeterminate_holo2.png
+++ b/res/drawable-xhdpi/progressbar_indeterminate_holo2.png
Binary files differ
diff --git a/res/drawable-xhdpi/progressbar_indeterminate_holo3.png b/res/drawable-xhdpi/progressbar_indeterminate_holo3.png
index b313793..1817344 100644
--- a/res/drawable-xhdpi/progressbar_indeterminate_holo3.png
+++ b/res/drawable-xhdpi/progressbar_indeterminate_holo3.png
Binary files differ
diff --git a/res/drawable-xhdpi/progressbar_indeterminate_holo4.png b/res/drawable-xhdpi/progressbar_indeterminate_holo4.png
index 70d93bc..29ab58e 100644
--- a/res/drawable-xhdpi/progressbar_indeterminate_holo4.png
+++ b/res/drawable-xhdpi/progressbar_indeterminate_holo4.png
Binary files differ
diff --git a/res/drawable-xhdpi/progressbar_indeterminate_holo5.png b/res/drawable-xhdpi/progressbar_indeterminate_holo5.png
index efc9c3a..5a7f94f 100644
--- a/res/drawable-xhdpi/progressbar_indeterminate_holo5.png
+++ b/res/drawable-xhdpi/progressbar_indeterminate_holo5.png
Binary files differ
diff --git a/res/drawable-xhdpi/progressbar_indeterminate_holo6.png b/res/drawable-xhdpi/progressbar_indeterminate_holo6.png
index a69307d..67b9554 100644
--- a/res/drawable-xhdpi/progressbar_indeterminate_holo6.png
+++ b/res/drawable-xhdpi/progressbar_indeterminate_holo6.png
Binary files differ
diff --git a/res/drawable-xhdpi/progressbar_indeterminate_holo7.png b/res/drawable-xhdpi/progressbar_indeterminate_holo7.png
index 9020219..0651224 100644
--- a/res/drawable-xhdpi/progressbar_indeterminate_holo7.png
+++ b/res/drawable-xhdpi/progressbar_indeterminate_holo7.png
Binary files differ
diff --git a/res/drawable-xhdpi/progressbar_indeterminate_holo8.png b/res/drawable-xhdpi/progressbar_indeterminate_holo8.png
index 08dbbba..a3de9f8 100644
--- a/res/drawable-xhdpi/progressbar_indeterminate_holo8.png
+++ b/res/drawable-xhdpi/progressbar_indeterminate_holo8.png
Binary files differ
diff --git a/res/drawable-xhdpi/progressbar_solid_holo.png b/res/drawable-xhdpi/progressbar_solid_holo.png
index 5a18bdb..b6f1779 100644
--- a/res/drawable-xhdpi/progressbar_solid_holo.png
+++ b/res/drawable-xhdpi/progressbar_solid_holo.png
Binary files differ
diff --git a/res/drawable/conversation_read_selector.xml b/res/drawable/conversation_read_selector.xml
index 302602b..bd32b81 100644
--- a/res/drawable/conversation_read_selector.xml
+++ b/res/drawable/conversation_read_selector.xml
@@ -17,9 +17,11 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/list_pressed_holo" />
+ android:drawable="@color/checked_item_background_color" />
<item android:state_selected="true"
- android:drawable="@drawable/list_selected_holo" />
+ android:drawable="@color/checked_item_background_color" />
+ <item android:state_activated="true"
+ android:drawable="@color/activated_item_background_color" />
<item android:state_focused="true"
android:drawable="@drawable/list_focused_holo" />
<item android:drawable="@drawable/list_read_holo" />
diff --git a/res/drawable/conversation_unread_selector.xml b/res/drawable/conversation_unread_selector.xml
index cd96d97..138feeb 100644
--- a/res/drawable/conversation_unread_selector.xml
+++ b/res/drawable/conversation_unread_selector.xml
@@ -17,9 +17,11 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/list_pressed_holo" />
+ android:drawable="@color/checked_item_background_color" />
<item android:state_selected="true"
- android:drawable="@drawable/list_selected_holo" />
+ android:drawable="@color/checked_item_background_color" />
+ <item android:state_activated="true"
+ android:drawable="@color/activated_item_background_color" />
<item android:state_focused="true"
android:drawable="@drawable/list_focused_holo" />
<item android:drawable="@drawable/list_unread_holo" />
diff --git a/res/drawable/folder_item.xml b/res/drawable/folder_item.xml
index ef80e87..c28ae55 100644
--- a/res/drawable/folder_item.xml
+++ b/res/drawable/folder_item.xml
@@ -18,7 +18,7 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/list_pressed_holo" />
- <item android:state_activated="true" android:drawable="@drawable/list_activated_holo" />
+ <item android:state_activated="true" android:drawable="@color/mail_app_blue" />
<item android:state_focused="true" android:drawable="@drawable/list_focused_holo" />
<item android:drawable="@drawable/ic_drawer_divider" />
</selector>
diff --git a/res/drawable/message_header_bg.xml b/res/drawable/message_header_bg.xml
index 2cebd62..cafcdeb 100644
--- a/res/drawable/message_header_bg.xml
+++ b/res/drawable/message_header_bg.xml
@@ -17,7 +17,7 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_activated="true"
- android:drawable="@drawable/header_convo_view_sender_bg_holo" />
+ android:drawable="@color/mail_app_blue" />
<item
android:drawable="@drawable/header_convo_view_thread_bg_holo_repeat" />
</selector>
diff --git a/res/drawable/shadow_right.xml b/res/drawable/shadow_right.xml
new file mode 100644
index 0000000..b4380d7
--- /dev/null
+++ b/res/drawable/shadow_right.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 Google Inc.
+ Licensed to 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.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <gradient
+ android:angle="180"
+ android:startColor="#22000000"
+ android:endColor="@android:color/transparent" />
+</shape>
diff --git a/res/layout/account_switch_spinner_dropdown_footer.xml b/res/layout/account_switch_spinner_dropdown_footer.xml
deleted file mode 100644
index 342e1b7..0000000
--- a/res/layout/account_switch_spinner_dropdown_footer.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- Copyright (C) 2011 Google Inc.
- Licensed to 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.
--->
-
-<!-- The footer in the dropdown list that says "Show all labels" -->
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- style="?android:attr/spinnerDropDownItemStyle"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:minHeight="@dimen/account_dropdown_item_height">
- <TextView
- android:singleLine="true"
- android:layout_height="match_parent"
- android:layout_width="wrap_content"
- android:layout_centerVertical="true"
- android:ellipsize="end"
- android:gravity="center_vertical"
- android:text="@string/show_all_folders"
- style="@android:style/TextAppearance.Holo.Widget.ActionBar.Title" />
-</LinearLayout>
diff --git a/res/layout/conversation_list.xml b/res/layout/conversation_list.xml
index e4ad9ca..f5bd8ab 100644
--- a/res/layout/conversation_list.xml
+++ b/res/layout/conversation_list.xml
@@ -49,41 +49,33 @@
android:fadingEdge="none"
android:layout_alignParentTop="true"/>
- <!-- white background to make blue progress bar more visible -->
- <FrameLayout
+ <View
+ android:id="@+id/list_pane_edge"
+ android:layout_width="1dp"
+ android:layout_height="match_parent"
+ android:layout_gravity="right"
+ android:visibility="gone"
+ android:background="@color/light_gray" />
+
+ <ProgressBar
android:id="@+id/sync_trigger"
android:layout_width="match_parent"
- android:layout_height="4dp"
+ android:layout_height="wrap_content"
android:layout_gravity="top|center"
- android:background="#ffffff"
- android:visibility="gone">
+ android:visibility="gone"
+ style="?android:attr/progressBarStyleHorizontal"
+ android:max="100"
+ android:progress="100"
+ android:progressDrawable="@drawable/progressbar_solid_holo" />
- <ProgressBar
- style="?android:attr/progressBarStyleHorizontal"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="top"
- android:max="100"
- android:progress="100"
- android:progressDrawable="@drawable/progressbar_solid_holo" />
- </FrameLayout>
-
- <!-- white background to make blue progress bar more visible -->
- <FrameLayout
+ <ProgressBar
android:id="@+id/progress"
android:layout_width="match_parent"
- android:layout_height="4dp"
+ android:layout_height="wrap_content"
android:layout_gravity="top"
- android:background="#ffffff"
- android:visibility="gone">
-
- <ProgressBar
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="top"
- android:indeterminateDrawable="@drawable/progress_indeterminate_horizontal_holo"
- android:indeterminate="true" />
- </FrameLayout>
+ android:visibility="gone"
+ android:indeterminateDrawable="@drawable/progress_indeterminate_horizontal_holo"
+ android:indeterminate="true" />
</com.android.mail.ui.ConversationListView>
diff --git a/res/layout/folder_list.xml b/res/layout/folder_list.xml
index 2b01816..59c294a 100644
--- a/res/layout/folder_list.xml
+++ b/res/layout/folder_list.xml
@@ -24,7 +24,6 @@
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:cacheColorHint="@android:color/transparent"
android:drawSelectorOnTop="false"
android:fadingEdge="none"/>
</com.android.mail.ui.FolderListLayout>
diff --git a/res/layout/two_pane_activity.xml b/res/layout/two_pane_activity.xml
index 03b2734..1b1ba97 100644
--- a/res/layout/two_pane_activity.xml
+++ b/res/layout/two_pane_activity.xml
@@ -29,11 +29,24 @@
<FrameLayout
android:id="@+id/content_pane"
android:layout_width="0dp"
- android:layout_height="match_parent"
- android:background="@drawable/drawer_shadow_tablet">
+ android:layout_height="match_parent">
<fragment class="com.android.mail.ui.DrawerFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
+
+ <FrameLayout android:id="@+id/folders_pane_edge"
+ android:layout_width="8dp"
+ android:layout_height="match_parent"
+ android:layout_gravity="right"
+ android:background="@drawable/shadow_right">
+
+ <View
+ android:layout_width="1dp"
+ android:layout_height="match_parent"
+ android:layout_gravity="right"
+ android:background="@color/light_gray" />
+
+ </FrameLayout>
</FrameLayout>
<FrameLayout
diff --git a/res/menu-sw600dp/conversation_list_search_results_actions.xml b/res/menu-sw600dp-land/conversation_list_search_results_actions.xml
similarity index 100%
rename from res/menu-sw600dp/conversation_list_search_results_actions.xml
rename to res/menu-sw600dp-land/conversation_list_search_results_actions.xml
diff --git a/res/menu/conversation_list_menu.xml b/res/menu/conversation_list_menu.xml
index 99b9db2..efb638f 100644
--- a/res/menu/conversation_list_menu.xml
+++ b/res/menu/conversation_list_menu.xml
@@ -44,12 +44,6 @@
android:icon="@drawable/ic_menu_trash_holo_light" />
<!-- Always available -->
- <item android:id="@+id/show_all_folders"
- android:title="@string/show_all_folders"
- android:showAsAction="never"
- android:icon="@drawable/ic_menu_folders_holo_light" />
-
- <!-- Always available -->
<item android:id="@+id/refresh"
android:title="@string/refresh"
android:showAsAction="never"
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 10f7ce7..18945b7 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -18,6 +18,9 @@
<resources>
<color name="gray_text_color">#777777</color>
<color name="dark_gray_text_color">#58585b</color>
+ <color name="light_gray">#cccccc</color>
+ <!-- if you want to make something blue, please try to use THIS blue -->
+ <color name="mail_app_blue">@android:color/holo_blue_light</color>
<!-- Conversation List Item Colors -->
<color name="default_text_color">#ff000000</color>
<color name="subject_text_color_unread">@color/dark_gray_text_color</color>
@@ -29,6 +32,13 @@
<color name="date_text_color">@color/dark_gray_text_color</color>
<color name="message_info_text_color">@color/gray_text_color</color>
<color name="subject_text_color">#333333</color>
+ <!-- a 'checked' item is in the conversation selection set. also the 'pressed' color. -->
+ <!-- this is holo_blue_light @ 20% opacity -->
+ <color name="checked_item_background_color">#cfe9f3</color>
+ <!-- the 'activated' item is the visible conversation on tablet, with caret -->
+ <!-- this is holo_blue_light @ 45% opacity -->
+ <color name="activated_item_background_color">#9ed8ee</color>
+
<color name="drafts">#ff990000</color>
<color name="light_text_color">#ff666666</color>
<color name="folder_list_background_color">#ffdddddd</color>
@@ -40,7 +50,7 @@
<color name="default_folder_foreground_color">@color/gray_text_color</color>
<!-- Folder List/Drawer colors -->
- <color name="account_item_selected_text_color">#35b4e3</color>
+ <color name="account_item_selected_text_color">@color/mail_app_blue</color>
<color name="folder_list_divider_color">@color/gray_text_color</color>
<color name="folder_list_heading_text_color">@color/dark_gray_text_color</color>
<color name="list_background_color">#eeeeee</color>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 7b6f05e..82b46df 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -357,8 +357,6 @@
<string name="send_failed">Message wasn\'t sent.</string>
<!-- Strings used to show myself in a To/Cc list. [CHAR LIMIT=15] -->
<string name="me">me</string>
- <!-- List item to open folders view in account dropdown [CHAR LIMIT=50] -->
- <string name="show_all_folders">Show all folders</string>
<!-- Header for list of inboxes in the drawer (Inbox, Priority) [CHAR LIMIT=50] -->
<string name="inbox_folders_heading">Inbox</string>
@@ -894,8 +892,8 @@
<!-- Dialog message for empty folder confirmation dialog [CHAR LIMIT=300] -->
<plurals name="empty_folder_dialog_message">
- <item quantity="one">This <xliff:g id="count">%1$d</xliff:g> message will be permanently deleted.</item>
- <item quantity="other">These <xliff:g id="count">%1$d</xliff:g> messages will be permanently deleted.</item>
+ <item quantity="one"><xliff:g id="count">%1$d</xliff:g> message will be permanently deleted.</item>
+ <item quantity="other"><xliff:g id="count">%1$d</xliff:g> messages will be permanently deleted.</item>
</plurals>
<!-- Strings used for accessibility for the items that toggles the drawer action -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 4d3836d..703ccd9 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -207,7 +207,6 @@
<!-- Browse list item styles -->
<style name="ConversationListFade" parent="@android:style/Widget.Holo.Light.ListView">
- <item name="android:cacheColorHint">@android:color/transparent</item>
<item name="android:divider">@android:color/transparent</item>
<item name="android:dividerHeight">0dip</item>
</style>
diff --git a/src/com/android/mail/browse/ConversationItemView.java b/src/com/android/mail/browse/ConversationItemView.java
index e62a97c..be54727 100644
--- a/src/com/android/mail/browse/ConversationItemView.java
+++ b/src/com/android/mail/browse/ConversationItemView.java
@@ -84,12 +84,7 @@
import com.android.mail.utils.Utils;
import com.google.common.annotations.VisibleForTesting;
-// TODO(pwestbro): References to non AOSP code should be moved out of UnifiedEmail
-import com.google.analytics.tracking.android.EasyTracker;
-import com.google.analytics.tracking.android.Tracker;
-
import java.util.ArrayList;
-import java.util.List;
public class ConversationItemView extends View implements SwipeableItemView, ToggleableItem,
InvalidateCallback {
@@ -105,16 +100,6 @@
private static final String PERF_TAG_CALCULATE_COORDINATES = "CCHV.coordinates";
private static final String LOG_TAG = LogTag.getLogTag();
- // Analytics string values
- private static final String CONV_ITEM_VIEW_CATEGORY = "ConversationItemView";
- private static final String CONTACT_PHOTO_ACTION = "ContactPhoto";
- private static final String NUM_PHOTOS_LABEL = "num_photos";
- private static final String CUSTOM_DIMEN_ACCOUNT_TYPE_GOOGLE_COM = "account_type_google_com";
- private static final String CUSTOM_DIMEN_ACCOUNT_TYPE_NON_GOOGLE_COM
- = "account_type_non_google_com";
- private static final boolean REPORT_ANALYTICS = true;
-
-
// Static bitmaps.
private static Bitmap STAR_OFF;
private static Bitmap STAR_ON;
@@ -148,9 +133,6 @@
private static TextPaint sPaint = new TextPaint();
private static TextPaint sFoldersPaint = new TextPaint();
- private static Tracker sConversationItemViewTracker;
-
-
// Backgrounds for different states.
private final SparseArray<Drawable> mBackgrounds = new SparseArray<Drawable>();
@@ -167,9 +149,6 @@
/** Whether we are on a tablet device or not */
private final boolean mTabletDevice;
- /** Whether we have reported analytics for this view */
- private boolean mReportedStats = false;
-
@VisibleForTesting
ConversationItemViewCoordinates mCoordinates;
@@ -386,7 +365,7 @@
BitmapFactory.decodeResource(res, R.drawable.ic_badge_invite_holo_light);
// Initialize colors.
- sActivatedTextColor = res.getColor(android.R.color.white);
+ sActivatedTextColor = res.getColor(R.color.senders_text_color_read);
sActivatedTextSpan = CharacterStyle.wrap(new ForegroundColorSpan(sActivatedTextColor));
sSendersTextColorRead = res.getColor(R.color.senders_text_color_read);
sSendersTextColorUnread = res.getColor(R.color.senders_text_color_unread);
@@ -411,14 +390,8 @@
sFoldersLeftPadding = res.getDimensionPixelOffset(R.dimen.folders_left_padding);
sContactPhotoManager = ContactPhotoManager.createContactPhotoManager(context);
sAttachmentPreviewsManager = ContactPhotoManager.createContactPhotoManager(context);
-
- if (REPORT_ANALYTICS) {
- EasyTracker.getInstance().setContext(context);
- sConversationItemViewTracker = EasyTracker.getTracker();
- }
}
-
mSendersTextView = new TextView(mContext);
mSendersTextView.setEllipsize(TextUtils.TruncateAt.END);
mSendersTextView.setIncludeFontPadding(false);
@@ -438,44 +411,6 @@
mCoordinates.contactImagesX + mCoordinates.contactImagesWidth,
mCoordinates.contactImagesY + mCoordinates.contactImagesHeight);
}
-
- @Override
- public void onImagesResolved() {
- if (REPORT_ANALYTICS && !mReportedStats) {
- final int numTiles = mContactImagesHolder.getDivisionCount();
- final List<String> photoKeys = mContactImagesHolder.getDivisionIds();
- int numPhotos = 0;
- for (final String photoKey : photoKeys) {
- final Boolean isResolved =
- mContactImagesHolder.imageResolved(photoKey);
- if (isResolved != null && isResolved) {
- numPhotos++;
- }
- }
-
- // Number of subtiles
- sConversationItemViewTracker.setCustomMetric(1, (long)numTiles);
- // Number of resolved photos
- sConversationItemViewTracker.setCustomMetric(2, (long)numPhotos);
- // Number of letter subtiles
- sConversationItemViewTracker.setCustomMetric(3, (long)(numTiles - numPhotos));
- final String accountTypeCustomDimen = mAccount.endsWith("google.com") ?
- CUSTOM_DIMEN_ACCOUNT_TYPE_GOOGLE_COM :
- CUSTOM_DIMEN_ACCOUNT_TYPE_NON_GOOGLE_COM;
- sConversationItemViewTracker.setCustomDimension(3, accountTypeCustomDimen);
- // This is a hack. Ideally this would check the folder object to determine if it
- // is the primary section
- final String isPrimarySection =
- TextUtils.equals(mDisplayedFolder.persistentId, "^sq_ig_i_personal") ?
- "primary" : "not_primary";
- sConversationItemViewTracker.setCustomDimension(4, isPrimarySection);
-
- sConversationItemViewTracker.sendEvent(CONV_ITEM_VIEW_CATEGORY,
- CONTACT_PHOTO_ACTION, NUM_PHOTOS_LABEL, (long)numTiles);
-
- mReportedStats = true;
- }
- }
});
mAttachmentPreviewsCanvas = new DividedImageCanvas(context, this);
}
@@ -518,7 +453,6 @@
mStarEnabled = folder != null && !folder.isTrash();
mSwipeEnabled = swipeEnabled;
mAdapter = adapter;
- mReportedStats = false;
if (mHeader.conversation.getAttachmentsCount() == 0) {
mAttachmentPreviewMode = ConversationItemViewCoordinates.ATTACHMENT_PREVIEW_NONE;
} else {
@@ -768,12 +702,11 @@
mContactImagesHolder.setDimensions(mCoordinates.contactImagesWidth,
mCoordinates.contactImagesHeight);
mContactImagesHolder.setDivisionIds(mHeader.displayableSenderEmails);
- final int size = mHeader.displayableSenderEmails.size();
- final int numTiles = Math.min(DividedImageCanvas.MAX_DIVISIONS, size);
+ int size = mHeader.displayableSenderEmails.size();
String emailAddress;
- for (int i = 0; i < numTiles; i++) {
+ for (int i = 0; i < DividedImageCanvas.MAX_DIVISIONS && i < size; i++) {
emailAddress = mHeader.displayableSenderEmails.get(i);
- final PhotoIdentifier photoIdentifier = new ContactIdentifier(
+ PhotoIdentifier photoIdentifier = new ContactIdentifier(
mHeader.displayableSenderNames.get(i), emailAddress, i);
sContactPhotoManager.loadThumbnail(photoIdentifier, mContactImagesHolder);
}
@@ -872,15 +805,6 @@
mSubjectTextView.setText(displayedStringBuilder);
}
- /**
- * Returns the resource for the text color depending on whether the element is activated or not.
- * @param defaultColor
- */
- private int getFontColor(int defaultColor) {
- final boolean isBackGroundBlue = isActivated() && showActivatedText();
- return isBackGroundBlue ? sActivatedTextColor : defaultColor;
- }
-
private boolean showActivatedText() {
// For activated elements in tablet in conversation mode, we show an activated color, since
// the background is dark blue for activated versus gray for non-activated.
@@ -1167,8 +1091,7 @@
if (mHeader.sendersDisplayLayout != null) {
sPaint.setTextSize(mCoordinates.sendersFontSize);
sPaint.setTypeface(SendersView.getTypeface(isUnread));
- sPaint.setColor(getFontColor(isUnread ?
- sSendersTextColorUnread : sSendersTextColorRead));
+ sPaint.setColor(isUnread ? sSendersTextColorUnread : sSendersTextColorRead);
canvas.translate(mCoordinates.sendersX, mCoordinates.sendersY
+ mHeader.sendersDisplayLayout.getTopPadding());
mHeader.sendersDisplayLayout.draw(canvas);
@@ -1243,6 +1166,10 @@
drawAttachmentPreviews(canvas);
canvas.restore();
}
+
+ if (isActivated()) {
+ // TODO: draw caret on the right, centered vertically
+ }
}
private void drawContactImages(Canvas canvas) {
@@ -1282,48 +1209,23 @@
* @param isUnread
*/
private void updateBackground(boolean isUnread) {
- final boolean isListOnTablet = mTabletDevice && mActivity.getViewMode().isListMode();
final int background;
if (isUnread) {
- if (isListOnTablet) {
- if (mSelected) {
- background = R.drawable.list_conversation_wide_unread_selected_holo;
- } else {
- background = R.drawable.conversation_wide_unread_selector;
- }
+ if (mSelected) {
+ background = R.color.checked_item_background_color;
} else {
- if (mSelected) {
- background = getCheckedActivatedBackground();
- } else {
- background = R.drawable.conversation_unread_selector;
- }
+ background = R.drawable.conversation_unread_selector;
}
} else {
- if (isListOnTablet) {
- if (mSelected) {
- background = R.drawable.list_conversation_wide_read_selected_holo;
- } else {
- background = R.drawable.conversation_wide_read_selector;
- }
+ if (mSelected) {
+ background = R.color.checked_item_background_color;
} else {
- if (mSelected) {
- background = getCheckedActivatedBackground();
- } else {
- background = R.drawable.conversation_read_selector;
- }
+ background = R.drawable.conversation_read_selector;
}
}
setBackgroundResource(background);
}
- private final int getCheckedActivatedBackground() {
- if (isActivated() && mTabletDevice) {
- return R.drawable.list_arrow_selected_holo;
- } else {
- return R.drawable.list_selected_holo;
- }
- }
-
/**
* Toggle the check mark on this view and update the conversation or begin
* drag, if drag is enabled.
@@ -1703,9 +1605,4 @@
public float getMinAllowScrollDistance() {
return sScrollSlop;
}
-
- @Override
- public void onImagesResolved() {
- // Do nothing
- }
}
diff --git a/src/com/android/mail/photomanager/LetterTileProvider.java b/src/com/android/mail/photomanager/LetterTileProvider.java
index 57b8b55..cf752c2 100644
--- a/src/com/android/mail/photomanager/LetterTileProvider.java
+++ b/src/com/android/mail/photomanager/LetterTileProvider.java
@@ -127,7 +127,7 @@
} else {
bitmap = getBitmap(mDims, true /* getDefault */);
}
- dividedImageView.addDivisionImage(bitmap, address, false);
+ dividedImageView.addDivisionImage(bitmap, address);
}
private static boolean isEnglishLetterOrDigit(char c) {
diff --git a/src/com/android/mail/photomanager/PhotoManager.java b/src/com/android/mail/photomanager/PhotoManager.java
index c23ce04..c2650a9 100644
--- a/src/com/android/mail/photomanager/PhotoManager.java
+++ b/src/com/android/mail/photomanager/PhotoManager.java
@@ -39,6 +39,7 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -254,7 +255,7 @@
request,
Thread.currentThread());
- final boolean loaded = loadCachedPhoto(request, false);
+ boolean loaded = loadCachedPhoto(request, false);
if (loaded) {
if (DEBUG) LogUtils.v(TAG, "image request, cache hit. request queue size=%s",
mPendingRequests.size());
@@ -414,16 +415,12 @@
private void processLoadedImages() {
final List<Long> toRemove = Lists.newArrayList();
for (Long hash : mPendingRequests.keySet()) {
- final Request request = mPendingRequests.get(hash);
- final boolean loaded = loadCachedPhoto(request, true);
+ Request request = mPendingRequests.get(hash);
+ boolean loaded = loadCachedPhoto(request, true);
if (loaded) {
toRemove.add(hash);
}
- // We want to call onCachedImageLoaded in all cases here, as when loaded is false,
- // loadCachedPhoto will attempt to reload the letter tile.
- request.getView().onCachedImageLoaded();
}
-
for (Long key : toRemove) {
mPendingRequests.remove(key);
}
diff --git a/src/com/android/mail/ui/AbstractActivityController.java b/src/com/android/mail/ui/AbstractActivityController.java
index 403785e..4be4183 100644
--- a/src/com/android/mail/ui/AbstractActivityController.java
+++ b/src/com/android/mail/ui/AbstractActivityController.java
@@ -162,6 +162,11 @@
/** Tag used when loading a folder list fragment. */
protected static final String TAG_FOLDER_LIST = "tag-folder-list";
+ /** Key to store an account in a bundle */
+ private final String BUNDLE_ACCOUNT_KEY = "account";
+ /** Key to store a folder in a bundle */
+ private final String BUNDLE_FOLDER_KEY = "folder";
+
protected Account mAccount;
protected Folder mFolder;
/** True when {@link #mFolder} is first shown to the user. */
@@ -641,12 +646,16 @@
* or put in an idle state.
*/
@Override
- public void closeDrawer(final boolean hasNewFolderOrAccount) {
+ public void closeDrawer(final boolean hasNewFolderOrAccount, Account nextAccount,
+ Folder nextFolder) {
if (!isDrawerEnabled()) {
mDrawerObservers.notifyChanged();
return;
}
+ if (nextFolder != null) {
+ preloadConvList(nextAccount, nextFolder);
+ }
// If there are no new folders or accounts to switch to, just close the drawer
if (!hasNewFolderOrAccount) {
mDrawerContainer.closeDrawers();
@@ -671,6 +680,30 @@
}
}
+ /**
+ * Load the conversation list early for the given folder.
+ * @param nextFolder
+ */
+ protected void preloadConvList(Account nextAccount, Folder nextFolder) {
+ // Fire off the conversation list loader for this account already with a fake
+ // listener.
+ final Bundle args = new Bundle();
+ if (nextAccount != null) {
+ args.putParcelable(BUNDLE_ACCOUNT_KEY, nextAccount);
+ } else {
+ args.putParcelable(BUNDLE_ACCOUNT_KEY, mAccount);
+ }
+ if (nextFolder != null) {
+ args.putParcelable(BUNDLE_FOLDER_KEY, nextFolder);
+ } else {
+ LogUtils.e(LOG_TAG, new Error(), "AAC.preloadConvList(): Got an empty folder");
+ }
+ mFolder = null;
+ final LoaderManager lm = mActivity.getLoaderManager();
+ lm.destroyLoader(LOADER_CONVERSATION_LIST);
+ lm.initLoader(LOADER_CONVERSATION_LIST, args, mListCursorCallbacks);
+ }
+
private void fetchSearchFolder(Intent intent) {
final Bundle args = new Bundle();
args.putString(ConversationListContext.EXTRA_SEARCH_QUERY, intent
@@ -832,18 +865,16 @@
} else {
lm.restartLoader(LOADER_FOLDER_CURSOR, Bundle.EMPTY, mFolderCallbacks);
}
- // In this case, we are starting from no folder, which would occur
- // the first time the app was launched or on orientation changes.
- // We want to attach to an existing loader, if available.
- if (wasNull || lm.getLoader(LOADER_CONVERSATION_LIST) == null) {
- lm.initLoader(LOADER_CONVERSATION_LIST, Bundle.EMPTY, mListCursorCallbacks);
- } else {
- // However, if there was an existing folder AND we have changed
+ if (!wasNull && lm.getLoader(LOADER_CONVERSATION_LIST) != null) {
+ // If there was an existing folder AND we have changed
// folders, we want to restart the loader to get the information
// for the newly selected folder
lm.destroyLoader(LOADER_CONVERSATION_LIST);
- lm.initLoader(LOADER_CONVERSATION_LIST, Bundle.EMPTY, mListCursorCallbacks);
}
+ final Bundle args = new Bundle();
+ args.putParcelable(BUNDLE_ACCOUNT_KEY, mAccount);
+ args.putParcelable(BUNDLE_FOLDER_KEY, mFolder);
+ lm.initLoader(LOADER_CONVERSATION_LIST, args, mListCursorCallbacks);
}
@Override
@@ -1160,9 +1191,6 @@
case R.id.compose:
ComposeActivity.compose(mActivity.getActivityContext(), mAccount);
break;
- case R.id.show_all_folders:
- toggleFolderListState();
- break;
case R.id.refresh:
requestFolderRefresh();
break;
@@ -2004,6 +2032,9 @@
Folder.fromString(intent.getStringExtra(Utils.EXTRA_FOLDER));
folderUri = folder.uri;
} else {
+ final Bundle extras = intent.getExtras();
+ LogUtils.d(LOG_TAG, "Couldn't find a folder URI in the extras: %s",
+ extras == null ? "null" : extras.toString());
folderUri = mAccount.settings.defaultInbox;
}
@@ -3001,14 +3032,23 @@
@Override
public Loader<ConversationCursor> onCreateLoader(int id, Bundle args) {
- return new ConversationCursorLoader((Activity) mActivity,
- mAccount, mFolder.conversationListUri, mFolder.name);
+ final Account account = args.getParcelable(BUNDLE_ACCOUNT_KEY);
+ final Folder folder = args.getParcelable(BUNDLE_FOLDER_KEY);
+ if (account == null || folder == null) {
+ return null;
+ }
+ return new ConversationCursorLoader((Activity) mActivity, account,
+ folder.conversationListUri, folder.name);
}
@Override
public void onLoadFinished(Loader<ConversationCursor> loader, ConversationCursor data) {
LogUtils.d(LOG_TAG, "IN AAC.ConversationCursor.onLoadFinished, data=%s loader=%s",
data, loader);
+ if (isDrawerEnabled() && mDrawerContainer.isDrawerOpen(mDrawerPullout)) {
+ LogUtils.d(LOG_TAG, "ConversationListLoaderCallbacks.onLoadFinished: ignoring.");
+ return;
+ }
// Clear our all pending destructive actions before swapping the conversation cursor
destroyPending(null);
mConversationListCursor = data;
diff --git a/src/com/android/mail/ui/AccountController.java b/src/com/android/mail/ui/AccountController.java
index a34b5ea..eeb9ba1 100644
--- a/src/com/android/mail/ui/AccountController.java
+++ b/src/com/android/mail/ui/AccountController.java
@@ -22,6 +22,7 @@
import com.android.mail.providers.Account;
import com.android.mail.providers.AccountObserver;
+import com.android.mail.providers.Folder;
import com.android.mail.providers.FolderWatcher;
import com.android.mail.utils.VeiledAddressMatcher;
@@ -96,7 +97,7 @@
* @param hasNewFolderOrAccount true if we need to load conversations for a different folder
* or account, false otherwise.
*/
- void closeDrawer(boolean hasNewFolderOrAccount);
+ void closeDrawer(boolean hasNewFolderOrAccount, Account nextAccount, Folder nextFolder);
/**
* Set the folderWatcher
diff --git a/src/com/android/mail/ui/ConversationListFragment.java b/src/com/android/mail/ui/ConversationListFragment.java
index 98e1159..19d007d 100644
--- a/src/com/android/mail/ui/ConversationListFragment.java
+++ b/src/com/android/mail/ui/ConversationListFragment.java
@@ -108,6 +108,8 @@
private View mSearchStatusView;
+ private View mListEdge;
+
/**
* Current Account being viewed
*/
@@ -397,6 +399,8 @@
mListView.enableSwipe(mAccount.supportsCapability(AccountCapabilities.UNDO));
mListView.setSwipedListener(this);
+ mListEdge = rootView.findViewById(R.id.list_pane_edge);
+
if (savedState != null && savedState.containsKey(LIST_STATE_KEY)) {
mListView.onRestoreInstanceState(savedState.getParcelable(LIST_STATE_KEY));
}
@@ -583,10 +587,10 @@
// Change the divider based on view mode.
if (mTabletDevice) {
if (ViewMode.isConversationMode(newMode)) {
- mListView.setBackgroundResource(R.drawable.panel_conversation_leftstroke);
+ mListEdge.setVisibility(View.VISIBLE);
} else if (ViewMode.isListMode(newMode)) {
+ mListEdge.setVisibility(View.GONE);
// There are no selected conversations when in conversation list mode.
- mListView.setBackgroundDrawable(null);
mListView.clearChoices();
}
}
diff --git a/src/com/android/mail/ui/DividedImageCanvas.java b/src/com/android/mail/ui/DividedImageCanvas.java
index b441aba..2338189 100644
--- a/src/com/android/mail/ui/DividedImageCanvas.java
+++ b/src/com/android/mail/ui/DividedImageCanvas.java
@@ -55,8 +55,6 @@
private final Context mContext;
private final InvalidateCallback mCallback;
private final ArrayList<Bitmap> mDivisionImages = new ArrayList<Bitmap>(MAX_DIVISIONS);
- private final ArrayList<Boolean> mImageStatusList = new ArrayList<Boolean>(MAX_DIVISIONS);
- private int mNumCachedImagesLoaded = 0;
/**
* Ignore any request to draw final output when not yet ready. This prevents partially drawn
@@ -112,13 +110,10 @@
}
mDivisionMap.clear();
mDivisionImages.clear();
- mImageStatusList.clear();
- mNumCachedImagesLoaded = 0;
int i = 0;
for (String id : divisionIds) {
mDivisionMap.put(id, i);
mDivisionImages.add(null);
- mImageStatusList.add(null);
i++;
}
}
@@ -184,20 +179,18 @@
@Override
public void drawImage(Bitmap b, Object id) {
- addDivisionImage(b, id, true);
+ addDivisionImage(b, id);
}
/**
* Add a bitmap to this view in the quadrant matching its id.
* @param b Bitmap
* @param id Id to look for that was previously set in setDivisionIds.
- * @param resolved Indicates whether this image has been resolved
*/
- public void addDivisionImage(Bitmap b, Object id, boolean resolved) {
+ public void addDivisionImage(Bitmap b, Object id) {
final Integer pos = mDivisionMap.get(id);
if (pos != null && pos >= 0 && b != null) {
mDivisionImages.set(pos, b);
- mImageStatusList.set(pos, resolved);
boolean complete = false;
final int width = mWidth;
final int height = mHeight;
@@ -291,14 +284,6 @@
return pos != null && mDivisionImages.get(pos) != null;
}
- public Boolean imageResolved(Object id) {
- final Integer pos = mDivisionMap.get(id);
- if (pos == null) {
- return null;
- }
- return mImageStatusList.get(pos);
- }
-
private void setupDividerLines() {
if (sDividerLineWidth == -1) {
Resources res = getContext().getResources();
@@ -341,7 +326,6 @@
mDivisionMap.clear();
mDivisionImages.clear();
mGeneration++;
- mNumCachedImagesLoaded = 0;
}
@Override
@@ -385,10 +369,8 @@
* The class that will provided the canvas to which the DividedImageCanvas
* should render its contents must implement this interface.
*/
- // TODO(pwestbro): rename this interface to match the usage
public interface InvalidateCallback {
public void invalidate();
- public void onImagesResolved();
}
public int getDivisionCount() {
@@ -416,11 +398,4 @@
// TODO: remove me soon.
return null;
}
-
- @Override
- public void onCachedImageLoaded() {
- if (++mNumCachedImagesLoaded >= mDivisionMap.size()) {
- mCallback.onImagesResolved();
- }
- }
}
diff --git a/src/com/android/mail/ui/FolderListFragment.java b/src/com/android/mail/ui/FolderListFragment.java
index 5821f9e..ce592f3 100644
--- a/src/com/android/mail/ui/FolderListFragment.java
+++ b/src/com/android/mail/ui/FolderListFragment.java
@@ -49,7 +49,6 @@
import com.android.mail.providers.UIProvider.FolderType;
import com.android.mail.utils.LogTag;
import com.android.mail.utils.LogUtils;
-import com.android.mail.utils.Utils;
import java.util.ArrayList;
import java.util.Iterator;
@@ -427,6 +426,20 @@
viewFolderOrChangeAccount(position);
}
+ private Folder getDefaultInbox(Account account) {
+ if (account == null || mCursorAdapter == null) {
+ return null;
+ }
+ return mCursorAdapter.getDefaultInbox(account);
+ }
+
+ private void changeAccount(final Account account) {
+ // Switching accounts takes you to the inbox, which is always a system folder.
+ mSelectedFolderType = DrawerItem.FOLDER_SYSTEM;
+ mNextAccount = account;
+ mAccountChanger.closeDrawer(true, mNextAccount, getDefaultInbox(mNextAccount));
+ }
+
/**
* Display the conversation list from the folder at the position given.
* @param position a zero indexed position into the list.
@@ -451,12 +464,10 @@
mListView.setItemChecked(defaultInboxPosition, true);
}
// ... and close the drawer (no new target folders/accounts)
- mAccountChanger.closeDrawer(false /* hasNewFolderOrAccount */);
+ mAccountChanger.closeDrawer(false, mNextAccount,
+ getDefaultInbox(mNextAccount));
} else {
- // Switching accounts takes you to the inbox, which is always a system folder.
- mSelectedFolderType = DrawerItem.FOLDER_SYSTEM;
- mNextAccount = account;
- mAccountChanger.closeDrawer(true /* hasNewFolderOrAccount */);
+ changeAccount(account);
}
} else if (itemType == DrawerItem.VIEW_FOLDER) {
// Folder type, so change folders only.
@@ -480,6 +491,8 @@
folder = null;
}
if (folder != null) {
+ // Not changing the account.
+ final Account nextAccount = null;
// Since we may be looking at hierarchical views, if we can
// determine the parent of the folder we have tapped, set it here.
// If we are looking at the folder we are already viewing, don't
@@ -488,10 +501,10 @@
// Go to the conversation list for this folder.
if (!folder.uri.equals(mSelectedFolderUri)) {
mNextFolder = folder;
- mAccountChanger.closeDrawer(true /* hasNewFolderOrAccount */);
+ mAccountChanger.closeDrawer(true, nextAccount, folder);
} else {
// Clicked on same folder, just close drawer
- mAccountChanger.closeDrawer(false /* hasNewFolderOrAccount */);
+ mAccountChanger.closeDrawer(false, nextAccount, folder);
}
}
}
@@ -565,6 +578,8 @@
void destroy();
/** Notifies the adapter that the data has changed. */
void notifyDataSetChanged();
+ /** Returns default inbox for this account. */
+ Folder getDefaultInbox(Account account);
}
/**
@@ -765,12 +780,14 @@
mCursor.getPosition()));
}
} while (mCursor.moveToNext());
+
return;
}
// Otherwise, this is an adapter for a sectioned list.
final List<DrawerItem> allFoldersList = new ArrayList<DrawerItem>();
final List<DrawerItem> inboxFolders = new ArrayList<DrawerItem>();
+ boolean currentFolderFound = false;
do {
final Folder f = mCursor.getModel();
if (!isFolderTypeExcluded(f)) {
@@ -781,9 +798,19 @@
allFoldersList.add(DrawerItem.ofFolder(
mActivity, f, DrawerItem.FOLDER_USER, mCursor.getPosition()));
}
+ if (f.equals(mCurrentFolderForUnreadCheck)) {
+ currentFolderFound = true;
+ }
}
} while (mCursor.moveToNext());
+ if (!currentFolderFound && mCurrentFolderForUnreadCheck != null
+ && mCurrentAccount != null) {
+ LogUtils.d(LOG_TAG, "Current folder (%1$s) has disappeared for %2$s",
+ mCurrentFolderForUnreadCheck.name, mCurrentAccount.name);
+ changeAccount(mCurrentAccount);
+ }
+
// Add all inboxes (sectioned included) before recents.
addFolderSection(itemList, inboxFolders, R.string.inbox_folders_heading);
@@ -882,6 +909,14 @@
}
@Override
+ public Folder getDefaultInbox(Account account) {
+ if (mFolderWatcher != null) {
+ return mFolderWatcher.getDefaultInbox(account);
+ }
+ return null;
+ }
+
+ @Override
public int getItemType(DrawerItem item) {
return item.mType;
}
@@ -984,6 +1019,11 @@
}
@Override
+ public Folder getDefaultInbox(Account account) {
+ return null;
+ }
+
+ @Override
public int getItemType(DrawerItem item) {
// Always returns folders for now.
return DrawerItem.VIEW_FOLDER;
diff --git a/src/com/android/mail/ui/FolderSelectionActivity.java b/src/com/android/mail/ui/FolderSelectionActivity.java
index 2acee60..f1e1952 100644
--- a/src/com/android/mail/ui/FolderSelectionActivity.java
+++ b/src/com/android/mail/ui/FolderSelectionActivity.java
@@ -134,7 +134,8 @@
* Since there is no drawer to wait for, notifyChanged to the observers.
*/
@Override
- public void closeDrawer(final boolean hasNewFolderOrAccount) {
+ public void closeDrawer(final boolean hasNewFolderOrAccount,
+ Account account, Folder folder) {
mDrawerObservers.notifyChanged();
}
diff --git a/src/com/android/mail/ui/ImageCanvas.java b/src/com/android/mail/ui/ImageCanvas.java
index 8f7c130..850df2f 100644
--- a/src/com/android/mail/ui/ImageCanvas.java
+++ b/src/com/android/mail/ui/ImageCanvas.java
@@ -89,9 +89,4 @@
* data binding.
*/
int getGeneration();
-
- /**
- * Called when an image is loaded on this ImageCanvas
- */
- void onCachedImageLoaded();
}
diff --git a/src/com/android/mail/ui/TwoPaneLayout.java b/src/com/android/mail/ui/TwoPaneLayout.java
index 011df72..8ff45ef 100644
--- a/src/com/android/mail/ui/TwoPaneLayout.java
+++ b/src/com/android/mail/ui/TwoPaneLayout.java
@@ -523,7 +523,8 @@
}
mDrawerLayout.removeView(mFoldersView);
addView(mFoldersView, 0);
- mFoldersView.setBackgroundResource(R.drawable.drawer_shadow_tablet);
+ mFoldersView.findViewById(R.id.folders_pane_edge).setVisibility(VISIBLE);
+ mFoldersView.setBackgroundDrawable(null);
} else if (!mIsExpansiveLayout && foldersParent == this) {
removeView(mFoldersView);
mDrawerLayout.addView(mFoldersView);
@@ -531,6 +532,7 @@
(DrawerLayout.LayoutParams) mFoldersView.getLayoutParams();
lp.gravity = Gravity.START;
mFoldersView.setLayoutParams(lp);
+ mFoldersView.findViewById(R.id.folders_pane_edge).setVisibility(GONE);
mFoldersView.setBackgroundResource(R.color.list_background_color);
}