am 6e3f5a05: am 51401366: am b74a98d1: am 263ca4e5: am 2b8b9029: Support RTL in chips library.

* commit '6e3f5a05061ffa3cc4a0cf374fb0fe28e46f2e56':
diff --git a/carousel/test/res/values-am/strings.xml b/carousel/test/res/values-am/strings.xml
index f1e8da2..5f4b961 100644
--- a/carousel/test/res/values-am/strings.xml
+++ b/carousel/test/res/values-am/strings.xml
@@ -21,7 +21,7 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="music_demo_activity_label" msgid="4382090808250495841">"የሙዚቃ Carousel"</string>
     <string name="carousel_test_activity_label" msgid="6014624482213318747">"የCarousel ፍተሻ"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"የCarouselን ጥቅም የሚያሳይ መተግበሪያ"</string>
+    <string name="carousel_test_activity_description" msgid="1632693812604375483">"የCarouselን ጥቅም የሚያሳይ ትግበራ"</string>
     <string name="task_switcher_activity_label" msgid="714620143340933546">"ክንውን ቀያያሪ"</string>
     <string name="recent_tasks_title" msgid="1030287226205477117">"የቅርብ ጊዜ ትግበራዎች"</string>
     <string name="no_recent_tasks" msgid="6884096266670555780">"ምንም የቅርብ ጊዜ ክንውን የለም"</string>
diff --git a/carousel/test/res/values-az-rAZ/strings.xml b/carousel/test/res/values-az-rAZ/strings.xml
deleted file mode 100644
index 634f926..0000000
--- a/carousel/test/res/values-az-rAZ/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"MusicCarousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"CarouselTest"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"Carousel istifadəsini göstərmək üçün tətbiq"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"TaskSwitcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"Son Tətbiqlər"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"Son tapşırıqlar yoxdur"</string>
-</resources>
diff --git a/carousel/test/res/values-az/strings.xml b/carousel/test/res/values-az/strings.xml
deleted file mode 100644
index 634f926..0000000
--- a/carousel/test/res/values-az/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"MusicCarousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"CarouselTest"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"Carousel istifadəsini göstərmək üçün tətbiq"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"TaskSwitcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"Son Tətbiqlər"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"Son tapşırıqlar yoxdur"</string>
-</resources>
diff --git a/carousel/test/res/values-en-rIN/strings.xml b/carousel/test/res/values-en-rIN/strings.xml
deleted file mode 100644
index 86ea2cb..0000000
--- a/carousel/test/res/values-en-rIN/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"Music Carousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"Carousel Test"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"An application to show the use of Carousel"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"Task Switcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"Recent Applications"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"No recent tasks"</string>
-</resources>
diff --git a/carousel/test/res/values-et-rEE/strings.xml b/carousel/test/res/values-et-rEE/strings.xml
deleted file mode 100644
index 59f0b5c..0000000
--- a/carousel/test/res/values-et-rEE/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"MusicCarousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"CarouselTest"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"Rakendus, mis näitab karusselli kasutust"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"TaskSwitcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"Hiljutised rakendused"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"Hiljutised ülesanded puuduvad"</string>
-</resources>
diff --git a/carousel/test/res/values-fr-rCA/strings.xml b/carousel/test/res/values-fr-rCA/strings.xml
deleted file mode 100644
index 87aeb34..0000000
--- a/carousel/test/res/values-fr-rCA/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"MusicCarousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"CarouselTest"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"Une application expliquant l\'utilisation de Carousel"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"TaskSwitcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"Applications récentes"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"Aucune tâche récente"</string>
-</resources>
diff --git a/carousel/test/res/values-hy-rAM/strings.xml b/carousel/test/res/values-hy-rAM/strings.xml
deleted file mode 100644
index 39bf205..0000000
--- a/carousel/test/res/values-hy-rAM/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"MusicCarousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"CarouselTest"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"Հավելված` Carousel-ի օգտագործումը ցույց տալու համար"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"TaskSwitcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"Վերջին հավելվածները"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"Վերջին առաջադրանքներ չկան"</string>
-</resources>
diff --git a/carousel/test/res/values-iw/strings.xml b/carousel/test/res/values-iw/strings.xml
index a4163c5..53fa5d2 100644
--- a/carousel/test/res/values-iw/strings.xml
+++ b/carousel/test/res/values-iw/strings.xml
@@ -21,8 +21,8 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="music_demo_activity_label" msgid="4382090808250495841">"MusicCarousel"</string>
     <string name="carousel_test_activity_label" msgid="6014624482213318747">"CarouselTest"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"אפליקציה להצגת השימוש בקרוסלה"</string>
+    <string name="carousel_test_activity_description" msgid="1632693812604375483">"יישום להצגת השימוש בקרוסלה"</string>
     <string name="task_switcher_activity_label" msgid="714620143340933546">"TaskSwitcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"אפליקציות אחרונות"</string>
+    <string name="recent_tasks_title" msgid="1030287226205477117">"יישומים אחרונים"</string>
     <string name="no_recent_tasks" msgid="6884096266670555780">"אין משימות אחרונות"</string>
 </resources>
diff --git a/carousel/test/res/values-ka-rGE/strings.xml b/carousel/test/res/values-ka-rGE/strings.xml
deleted file mode 100644
index 0764f3f..0000000
--- a/carousel/test/res/values-ka-rGE/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"MusicCarousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"CarouselTest"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"Carousel-ის გამოყენების მაჩვენებელი აპლიკაცია"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"TaskSwitcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"ბოლოდროინდელი აპლიკაციები"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"ბოლოდროინდელი ამოცანები არ არის."</string>
-</resources>
diff --git a/carousel/test/res/values-km-rKH/strings.xml b/carousel/test/res/values-km-rKH/strings.xml
deleted file mode 100644
index 5bb198d..0000000
--- a/carousel/test/res/values-km-rKH/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"MusicCarousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"CarouselTest"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"កម្មវិធី​ត្រូវ​បង្ហាញ​ការ​ប្រើ Carousel"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"TaskSwitcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"កម្មវិធី​ថ្មីៗ"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"គ្មាន​ភារកិច្ច​ថ្មីៗ"</string>
-</resources>
diff --git a/carousel/test/res/values-lo-rLA/strings.xml b/carousel/test/res/values-lo-rLA/strings.xml
deleted file mode 100644
index 83a4cbd..0000000
--- a/carousel/test/res/values-lo-rLA/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"MusicCarousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"CarouselTest"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"ແອັບພລິເຄຊັນທີ່ໃຊ້ສະແດງປະໂຫຍດຂອງ Carousel"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"TaskSwitcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"ແອັບຯພລິເຄຊັນທີ່ຫາກໍໃຊ້"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"ບໍ່ມີວຽກເມື່ອໄວໆນີ້ເທື່ອ"</string>
-</resources>
diff --git a/carousel/test/res/values-mn-rMN/strings.xml b/carousel/test/res/values-mn-rMN/strings.xml
deleted file mode 100644
index 20d9f8d..0000000
--- a/carousel/test/res/values-mn-rMN/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"Хөгжмийн тойруулга"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"Тойруулга тест"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"Тойруулга ашиглалтыг харуулах аппликешн"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"Даалгавар солигч"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"Сүүлийн аппликешн"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"Сүүлийн даалгавар хоосон"</string>
-</resources>
diff --git a/carousel/test/res/values-ms-rMY/strings.xml b/carousel/test/res/values-ms-rMY/strings.xml
deleted file mode 100644
index ab9381a..0000000
--- a/carousel/test/res/values-ms-rMY/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"MusicCarousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"CarouselTest"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"Satu aplikasi untuk menunjukkan penggunaan Carousel"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"TaskSwitcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"Aplikasi Terbaru"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"Tiada tugasan terbaru"</string>
-</resources>
diff --git a/carousel/test/res/values-nb/strings.xml b/carousel/test/res/values-nb/strings.xml
index 751baf9..8cddca0 100644
--- a/carousel/test/res/values-nb/strings.xml
+++ b/carousel/test/res/values-nb/strings.xml
@@ -21,8 +21,8 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="music_demo_activity_label" msgid="4382090808250495841">"MusicCarousel"</string>
     <string name="carousel_test_activity_label" msgid="6014624482213318747">"CarouselTest"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"En app som viser bruken av Carousel"</string>
+    <string name="carousel_test_activity_description" msgid="1632693812604375483">"En applikasjon som viser bruken av Carousel"</string>
     <string name="task_switcher_activity_label" msgid="714620143340933546">"TaskSwitcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"Nylige apper"</string>
+    <string name="recent_tasks_title" msgid="1030287226205477117">"Nylige applikasjoner"</string>
     <string name="no_recent_tasks" msgid="6884096266670555780">"Ingen nylige oppgaver"</string>
 </resources>
diff --git a/carousel/test/res/values-ne-rNP/strings.xml b/carousel/test/res/values-ne-rNP/strings.xml
deleted file mode 100644
index 838502f..0000000
--- a/carousel/test/res/values-ne-rNP/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"संगीत करउसेल"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"करउसेल परीक्षण"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"कारउसेलको प्रयोग देखाउन एउटा अनुप्रयोग"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"कार्य स्विच गर्ने"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"भर्खरैका अनुप्रयोगहरू"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"कुनै भरखरका कार्यहरू छैनन्।"</string>
-</resources>
diff --git a/carousel/test/res/values-ne/strings.xml b/carousel/test/res/values-ne/strings.xml
deleted file mode 100644
index 838502f..0000000
--- a/carousel/test/res/values-ne/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"संगीत करउसेल"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"करउसेल परीक्षण"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"कारउसेलको प्रयोग देखाउन एउटा अनुप्रयोग"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"कार्य स्विच गर्ने"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"भर्खरैका अनुप्रयोगहरू"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"कुनै भरखरका कार्यहरू छैनन्।"</string>
-</resources>
diff --git a/carousel/test/res/values-si-rLK/strings.xml b/carousel/test/res/values-si-rLK/strings.xml
deleted file mode 100644
index 5a1aa48..0000000
--- a/carousel/test/res/values-si-rLK/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"සංගීත Carousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"Carousel පරීක්ෂණය"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"Carousel භාවිතය පෙන්වීමට යෙදුමකි"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"කාර්ය ස්විචය"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"මෑත කාලීන යෙදුම්"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"මෑත කාර්යයන් නැත"</string>
-</resources>
diff --git a/carousel/test/res/values-si/strings.xml b/carousel/test/res/values-si/strings.xml
deleted file mode 100644
index 5a1aa48..0000000
--- a/carousel/test/res/values-si/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"සංගීත Carousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"Carousel පරීක්ෂණය"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"Carousel භාවිතය පෙන්වීමට යෙදුමකි"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"කාර්ය ස්විචය"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"මෑත කාලීන යෙදුම්"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"මෑත කාර්යයන් නැත"</string>
-</resources>
diff --git a/carousel/test/res/values-zh-rHK/strings.xml b/carousel/test/res/values-zh-rHK/strings.xml
deleted file mode 100644
index 193cb4a..0000000
--- a/carousel/test/res/values-zh-rHK/strings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-/*
-* Copyright (C) 2009 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.
-*/
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="music_demo_activity_label" msgid="4382090808250495841">"MusicCarousel"</string>
-    <string name="carousel_test_activity_label" msgid="6014624482213318747">"CarouselTest"</string>
-    <string name="carousel_test_activity_description" msgid="1632693812604375483">"展示輪轉使用方法的應用程式"</string>
-    <string name="task_switcher_activity_label" msgid="714620143340933546">"TaskSwitcher"</string>
-    <string name="recent_tasks_title" msgid="1030287226205477117">"最近使用的應用程式"</string>
-    <string name="no_recent_tasks" msgid="6884096266670555780">"最近沒有任務"</string>
-</resources>
diff --git a/chips/project.properties b/chips/project.properties
index 1b8c5a3..91d2b02 100644
--- a/chips/project.properties
+++ b/chips/project.properties
@@ -11,5 +11,5 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 # Project target.
-target=android-18
+target=android-19
 android.library=true
diff --git a/chips/res/values-az-rAZ/strings.xml b/chips/res/values-az-rAZ/strings.xml
deleted file mode 100644
index c1e8567..0000000
--- a/chips/res/values-az-rAZ/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"E-poçt ünvanını kopyalayın"</string>
-    <string name="copy_number" msgid="530057841276106843">"Telefon nömrəsini kopyalayın"</string>
-    <string name="done" msgid="2356320650733788862">"Geri qayıt"</string>
-</resources>
diff --git a/chips/res/values-az/strings.xml b/chips/res/values-az/strings.xml
deleted file mode 100644
index c1e8567..0000000
--- a/chips/res/values-az/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"E-poçt ünvanını kopyalayın"</string>
-    <string name="copy_number" msgid="530057841276106843">"Telefon nömrəsini kopyalayın"</string>
-    <string name="done" msgid="2356320650733788862">"Geri qayıt"</string>
-</resources>
diff --git a/chips/res/values-en-rIN/strings.xml b/chips/res/values-en-rIN/strings.xml
deleted file mode 100644
index 1ae784b..0000000
--- a/chips/res/values-en-rIN/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"Copy email address"</string>
-    <string name="copy_number" msgid="530057841276106843">"Copy phone number"</string>
-    <string name="done" msgid="2356320650733788862">"Return"</string>
-</resources>
diff --git a/chips/res/values-et-rEE/strings.xml b/chips/res/values-et-rEE/strings.xml
deleted file mode 100644
index f32e66d..0000000
--- a/chips/res/values-et-rEE/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"Kopeeri e-posti aadress"</string>
-    <string name="copy_number" msgid="530057841276106843">"Kopeeri telefoninumber"</string>
-    <string name="done" msgid="2356320650733788862">"Sisestus"</string>
-</resources>
diff --git a/chips/res/values-fr-rCA/strings.xml b/chips/res/values-fr-rCA/strings.xml
deleted file mode 100644
index 758f5a8..0000000
--- a/chips/res/values-fr-rCA/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"Copier l\'adresse de courriel"</string>
-    <string name="copy_number" msgid="530057841276106843">"Copier le numéro de téléphone"</string>
-    <string name="done" msgid="2356320650733788862">"Renvoyer"</string>
-</resources>
diff --git a/chips/res/values-hy-rAM/strings.xml b/chips/res/values-hy-rAM/strings.xml
deleted file mode 100644
index ca2695c..0000000
--- a/chips/res/values-hy-rAM/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"Պատճենել էլփոստի հասցեն"</string>
-    <string name="copy_number" msgid="530057841276106843">"Պատճենել հեռախոսահամարը"</string>
-    <string name="done" msgid="2356320650733788862">"Վերադառնալ"</string>
-</resources>
diff --git a/chips/res/values-ka-rGE/strings.xml b/chips/res/values-ka-rGE/strings.xml
deleted file mode 100644
index 9d24e05..0000000
--- a/chips/res/values-ka-rGE/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"ელფოსტის მისამართის კოპირება"</string>
-    <string name="copy_number" msgid="530057841276106843">"ტელეფონის ნომრის კოპირება"</string>
-    <string name="done" msgid="2356320650733788862">"დაბრუნება"</string>
-</resources>
diff --git a/chips/res/values-km-rKH/strings.xml b/chips/res/values-km-rKH/strings.xml
deleted file mode 100644
index e51c667..0000000
--- a/chips/res/values-km-rKH/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"ចម្លង​អាសយដ្ឋាន​អ៊ីមែល"</string>
-    <string name="copy_number" msgid="530057841276106843">"ចម្លង​លេខ​ទូរស័ព្ទ"</string>
-    <string name="done" msgid="2356320650733788862">"ត្រឡប់"</string>
-</resources>
diff --git a/chips/res/values-lo-rLA/strings.xml b/chips/res/values-lo-rLA/strings.xml
deleted file mode 100644
index 44912af..0000000
--- a/chips/res/values-lo-rLA/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"ສຳເນົາທີ່ຢູ່ອີເມວ"</string>
-    <string name="copy_number" msgid="530057841276106843">"ສຳເນົາເບີໂທລະສັບ"</string>
-    <string name="done" msgid="2356320650733788862">"ກັບຄືນ"</string>
-</resources>
diff --git a/chips/res/values-mn-rMN/strings.xml b/chips/res/values-mn-rMN/strings.xml
deleted file mode 100644
index 89923c3..0000000
--- a/chips/res/values-mn-rMN/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"Имэйл хаяг хуулах"</string>
-    <string name="copy_number" msgid="530057841276106843">"Утасны дугаар хуулах"</string>
-    <string name="done" msgid="2356320650733788862">"Оруулах"</string>
-</resources>
diff --git a/chips/res/values-ms-rMY/strings.xml b/chips/res/values-ms-rMY/strings.xml
deleted file mode 100644
index 76320f9..0000000
--- a/chips/res/values-ms-rMY/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"Salin alamat e-mel"</string>
-    <string name="copy_number" msgid="530057841276106843">"Salin nombor telefon"</string>
-    <string name="done" msgid="2356320650733788862">"Kembali"</string>
-</resources>
diff --git a/chips/res/values-ne-rNP/strings.xml b/chips/res/values-ne-rNP/strings.xml
deleted file mode 100644
index 4710484..0000000
--- a/chips/res/values-ne-rNP/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"इमेल ठेगानाको प्रतिलिपि बनाउनुहोस्"</string>
-    <string name="copy_number" msgid="530057841276106843">"फोन नम्बरको प्रतिलिपि गर्नुहोस्"</string>
-    <string name="done" msgid="2356320650733788862">"फिर्ता हुनुहोस्"</string>
-</resources>
diff --git a/chips/res/values-ne/strings.xml b/chips/res/values-ne/strings.xml
deleted file mode 100644
index 4710484..0000000
--- a/chips/res/values-ne/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"इमेल ठेगानाको प्रतिलिपि बनाउनुहोस्"</string>
-    <string name="copy_number" msgid="530057841276106843">"फोन नम्बरको प्रतिलिपि गर्नुहोस्"</string>
-    <string name="done" msgid="2356320650733788862">"फिर्ता हुनुहोस्"</string>
-</resources>
diff --git a/chips/res/values-si-rLK/strings.xml b/chips/res/values-si-rLK/strings.xml
deleted file mode 100644
index 313405f..0000000
--- a/chips/res/values-si-rLK/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"ඊ-තැපැල් ලිපිනය පිටපත් කරන්න"</string>
-    <string name="copy_number" msgid="530057841276106843">"දුරකථන අංකය පිටපත් කරන්න"</string>
-    <string name="done" msgid="2356320650733788862">"ආපසු එවන්න"</string>
-</resources>
diff --git a/chips/res/values-si/strings.xml b/chips/res/values-si/strings.xml
deleted file mode 100644
index 313405f..0000000
--- a/chips/res/values-si/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g>"</string>
-    <string name="copy_email" msgid="7869435992461603532">"ඊ-තැපැල් ලිපිනය පිටපත් කරන්න"</string>
-    <string name="copy_number" msgid="530057841276106843">"දුරකථන අංකය පිටපත් කරන්න"</string>
-    <string name="done" msgid="2356320650733788862">"ආපසු එවන්න"</string>
-</resources>
diff --git a/chips/res/values-sw600dp/styles.xml b/chips/res/values-sw600dp/styles.xml
index b6014ea..00988a9 100644
--- a/chips/res/values-sw600dp/styles.xml
+++ b/chips/res/values-sw600dp/styles.xml
@@ -13,7 +13,8 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+<resources xmlns:tools="http://schemas.android.com/tools"
+           xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <style name="RecipientEditTextView" parent="@android:attr/autoCompleteTextViewStyle">
         <item name="android:paddingLeft">8dip</item>
         <item name="android:paddingRight">4dip</item>
@@ -25,5 +26,7 @@
         <item name="android:layout_width">match_parent</item>
         <item name="android:dropDownVerticalOffset">0dip</item>
         <item name="android:dropDownHorizontalOffset">-4dip</item>
+        <item name="android:textAlignment" tools:ignore="NewApi">viewStart</item>
+        <item name="android:textDirection" tools:ignore="NewApi">locale</item>
     </style>
 </resources>
diff --git a/chips/res/values-zh-rHK/strings.xml b/chips/res/values-zh-rHK/strings.xml
deleted file mode 100644
index 31a122a..0000000
--- a/chips/res/values-zh-rHK/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--  Copyright (C) 2011 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.
- -->
-
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="more_string" msgid="8495478259330621990">"+<xliff:g id="COUNT">%1$s</xliff:g> 人"</string>
-    <string name="copy_email" msgid="7869435992461603532">"複製電郵地址"</string>
-    <string name="copy_number" msgid="530057841276106843">"複製電話號碼"</string>
-    <string name="done" msgid="2356320650733788862">"Return 鍵"</string>
-</resources>
diff --git a/chips/res/values/attrs.xml b/chips/res/values/attrs.xml
index 96d995a..d3500aa 100644
--- a/chips/res/values/attrs.xml
+++ b/chips/res/values/attrs.xml
@@ -27,5 +27,9 @@
         <attr name="chipPadding" format="reference" />
         <attr name="disableDelete" format="boolean" />
         <attr name="invalidChipBackground" format="reference" />
+        <attr name="imageSpanAlignment">
+            <enum name="bottom" value = "0"/>
+            <enum name="baseline" value = "1"/>
+        </attr>
     </declare-styleable>
 </resources>
\ No newline at end of file
diff --git a/chips/res/values/styles.xml b/chips/res/values/styles.xml
index 83f96b4..9b60cde 100644
--- a/chips/res/values/styles.xml
+++ b/chips/res/values/styles.xml
@@ -13,7 +13,8 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+<resources xmlns:tools="http://schemas.android.com/tools"
+           xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <style name="RecipientEditTextView" parent="@android:attr/autoCompleteTextViewStyle">
         <item name="android:inputType">textEmailAddress|textMultiLine</item>
         <item name="android:imeOptions">actionNext|flagNoFullscreen</item>
@@ -25,6 +26,8 @@
         <item name="android:dropDownHorizontalOffset">-16dip</item>
         <item name="android:minHeight">48dip</item>
         <item name="android:lineSpacingExtra">@dimen/line_spacing_extra</item>
+        <item name="android:textAlignment" tools:ignore="NewApi">viewStart</item>
+        <item name="android:textDirection" tools:ignore="NewApi">locale</item>
     </style>
 
     <style name="ChipTitleStyle">
diff --git a/chips/sample/res/values-af/strings.xml b/chips/sample/res/values-af/strings.xml
index b29edff..e4c4945 100644
--- a/chips/sample/res/values-af/strings.xml
+++ b/chips/sample/res/values-af/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips-voorbeeld"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-posadresse"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Foonnommers"</string>
 </resources>
diff --git a/chips/sample/res/values-am/strings.xml b/chips/sample/res/values-am/strings.xml
index 1da685a..d19c4e8 100644
--- a/chips/sample/res/values-am/strings.xml
+++ b/chips/sample/res/values-am/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"የቺፕስ ናሙና"</string>
     <string name="email_addresses" msgid="5320415175940315400">"የኢሜይል አድራሻዎች"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"ስልክ ቁጥሮች"</string>
 </resources>
diff --git a/chips/sample/res/values-ar/strings.xml b/chips/sample/res/values-ar/strings.xml
index 09f9e76..4492ec7 100644
--- a/chips/sample/res/values-ar/strings.xml
+++ b/chips/sample/res/values-ar/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"عينة شرائح"</string>
     <string name="email_addresses" msgid="5320415175940315400">"عناوين البريد الإلكتروني"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"أرقام الهواتف"</string>
 </resources>
diff --git a/chips/sample/res/values-bg/strings.xml b/chips/sample/res/values-bg/strings.xml
index 24d690b..4c118c1 100644
--- a/chips/sample/res/values-bg/strings.xml
+++ b/chips/sample/res/values-bg/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Имейл адреси"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Телефонни номера"</string>
 </resources>
diff --git a/chips/sample/res/values-ca/strings.xml b/chips/sample/res/values-ca/strings.xml
index 054ee13..847cc6f 100644
--- a/chips/sample/res/values-ca/strings.xml
+++ b/chips/sample/res/values-ca/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Mostra de xips"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Adreces electròniques"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Números de telèfon"</string>
 </resources>
diff --git a/chips/sample/res/values-cs/strings.xml b/chips/sample/res/values-cs/strings.xml
index fcdb9cf..3e0a928 100644
--- a/chips/sample/res/values-cs/strings.xml
+++ b/chips/sample/res/values-cs/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Vzorové čipy"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-mailové adresy"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefonní čísla"</string>
 </resources>
diff --git a/chips/sample/res/values-da/strings.xml b/chips/sample/res/values-da/strings.xml
index 41279d3..e55fcc6 100644
--- a/chips/sample/res/values-da/strings.xml
+++ b/chips/sample/res/values-da/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Eksempel på chips"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-mailadresser"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefonnumre"</string>
 </resources>
diff --git a/chips/sample/res/values-de/strings.xml b/chips/sample/res/values-de/strings.xml
index c234ec4..614081c 100644
--- a/chips/sample/res/values-de/strings.xml
+++ b/chips/sample/res/values-de/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-Mail-Adressen"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefonnummern"</string>
 </resources>
diff --git a/chips/sample/res/values-el/strings.xml b/chips/sample/res/values-el/strings.xml
index ea827d9..a90018a 100644
--- a/chips/sample/res/values-el/strings.xml
+++ b/chips/sample/res/values-el/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Δείγμα τσιπ"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Διευθύνσεις ηλεκτρονικού ταχυδρομείου"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Αριθμοί τηλεφώνου"</string>
 </resources>
diff --git a/chips/sample/res/values-en-rGB/strings.xml b/chips/sample/res/values-en-rGB/strings.xml
index 8cf71de..aaccb10 100644
--- a/chips/sample/res/values-en-rGB/strings.xml
+++ b/chips/sample/res/values-en-rGB/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Email Addresses"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Phone Numbers"</string>
 </resources>
diff --git a/chips/sample/res/values-en-rIN/strings.xml b/chips/sample/res/values-en-rIN/strings.xml
index 8cf71de..aaccb10 100644
--- a/chips/sample/res/values-en-rIN/strings.xml
+++ b/chips/sample/res/values-en-rIN/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Email Addresses"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Phone Numbers"</string>
 </resources>
diff --git a/chips/sample/res/values-es-rUS/strings.xml b/chips/sample/res/values-es-rUS/strings.xml
index 270a120..e314778 100644
--- a/chips/sample/res/values-es-rUS/strings.xml
+++ b/chips/sample/res/values-es-rUS/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Muestra de chips"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Direcciones de correo electrónico"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Números de teléfono"</string>
 </resources>
diff --git a/chips/sample/res/values-es/strings.xml b/chips/sample/res/values-es/strings.xml
index 270a120..dd64514 100644
--- a/chips/sample/res/values-es/strings.xml
+++ b/chips/sample/res/values-es/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Muestra de Chips"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Direcciones de correo electrónico"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Números de teléfono"</string>
 </resources>
diff --git a/chips/sample/res/values-et-rEE/strings.xml b/chips/sample/res/values-et-rEE/strings.xml
index e343cf4..5c7d6e5 100644
--- a/chips/sample/res/values-et-rEE/strings.xml
+++ b/chips/sample/res/values-et-rEE/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-posti aadressid"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefoninumbrid"</string>
 </resources>
diff --git a/chips/sample/res/values-fa/strings.xml b/chips/sample/res/values-fa/strings.xml
index d31e347..8ee4162 100644
--- a/chips/sample/res/values-fa/strings.xml
+++ b/chips/sample/res/values-fa/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"نمونه تراشه‌ها"</string>
     <string name="email_addresses" msgid="5320415175940315400">"آدرس‌های ایمیل"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"شماره‌ تلفن‌ها"</string>
 </resources>
diff --git a/chips/sample/res/values-fi/strings.xml b/chips/sample/res/values-fi/strings.xml
index 348473d..c72df4d 100644
--- a/chips/sample/res/values-fi/strings.xml
+++ b/chips/sample/res/values-fi/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Sähköpostiosoitteet"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Puhelinnumerot"</string>
 </resources>
diff --git a/chips/sample/res/values-fr-rCA/strings.xml b/chips/sample/res/values-fr-rCA/strings.xml
index 68dcf33..e88de2d 100644
--- a/chips/sample/res/values-fr-rCA/strings.xml
+++ b/chips/sample/res/values-fr-rCA/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Échantillon Chips"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Adresses de courriel"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Numéros de téléphone"</string>
 </resources>
diff --git a/chips/sample/res/values-fr/strings.xml b/chips/sample/res/values-fr/strings.xml
index e0bf7ac..2b1c18e 100644
--- a/chips/sample/res/values-fr/strings.xml
+++ b/chips/sample/res/values-fr/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Échantillon Chips"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Adresses e-mail"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Numéros de téléphone"</string>
 </resources>
diff --git a/chips/sample/res/values-hi/strings.xml b/chips/sample/res/values-hi/strings.xml
index 20a8435..bae6585 100644
--- a/chips/sample/res/values-hi/strings.xml
+++ b/chips/sample/res/values-hi/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"चिप्‍स नमूने"</string>
     <string name="email_addresses" msgid="5320415175940315400">"ईमेल पते"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"फ़ोन नंबर"</string>
 </resources>
diff --git a/chips/sample/res/values-hr/strings.xml b/chips/sample/res/values-hr/strings.xml
index d6da228..6eb8a8e 100644
--- a/chips/sample/res/values-hr/strings.xml
+++ b/chips/sample/res/values-hr/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-adrese"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefonski brojevi"</string>
 </resources>
diff --git a/chips/sample/res/values-hu/strings.xml b/chips/sample/res/values-hu/strings.xml
index b2ba000..1d00752 100644
--- a/chips/sample/res/values-hu/strings.xml
+++ b/chips/sample/res/values-hu/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"„Chips” minta"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-mail címek"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefonszámok"</string>
 </resources>
diff --git a/chips/sample/res/values-hy-rAM/strings.xml b/chips/sample/res/values-hy-rAM/strings.xml
index 09ad981..fbdcb21 100644
--- a/chips/sample/res/values-hy-rAM/strings.xml
+++ b/chips/sample/res/values-hy-rAM/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Չիպերի նմուշ"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Էլփոստի հասցեներ"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Հեռախոսահամարներ"</string>
 </resources>
diff --git a/chips/sample/res/values-in/strings.xml b/chips/sample/res/values-in/strings.xml
index 036e97d..1ebd148 100644
--- a/chips/sample/res/values-in/strings.xml
+++ b/chips/sample/res/values-in/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Contoh Chip"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Alamat Email"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Nomor Telepon"</string>
 </resources>
diff --git a/chips/sample/res/values-it/strings.xml b/chips/sample/res/values-it/strings.xml
index 67bca55..aefbd01 100644
--- a/chips/sample/res/values-it/strings.xml
+++ b/chips/sample/res/values-it/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Indirizzi email"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Numeri di telefono"</string>
 </resources>
diff --git a/chips/sample/res/values-iw/strings.xml b/chips/sample/res/values-iw/strings.xml
index 7ead2ae..24c7e69 100644
--- a/chips/sample/res/values-iw/strings.xml
+++ b/chips/sample/res/values-iw/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"דוגמאות שבבים"</string>
     <string name="email_addresses" msgid="5320415175940315400">"כתובות דוא\"ל"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"מספרי טלפון"</string>
 </resources>
diff --git a/chips/sample/res/values-ja/strings.xml b/chips/sample/res/values-ja/strings.xml
index 6b0c0a7..c75120a 100644
--- a/chips/sample/res/values-ja/strings.xml
+++ b/chips/sample/res/values-ja/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"チップサンプル"</string>
     <string name="email_addresses" msgid="5320415175940315400">"メールアドレス"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"電話番号"</string>
 </resources>
diff --git a/chips/sample/res/values-ka-rGE/strings.xml b/chips/sample/res/values-ka-rGE/strings.xml
index ec7f764..a21dab5 100644
--- a/chips/sample/res/values-ka-rGE/strings.xml
+++ b/chips/sample/res/values-ka-rGE/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"ჩიპების ნიმუში"</string>
     <string name="email_addresses" msgid="5320415175940315400">"ელფოსტის მისამართები"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"ტელეფონის ნომრები"</string>
 </resources>
diff --git a/chips/sample/res/values-km-rKH/strings.xml b/chips/sample/res/values-km-rKH/strings.xml
index 70ca37e..3730a7d 100644
--- a/chips/sample/res/values-km-rKH/strings.xml
+++ b/chips/sample/res/values-km-rKH/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"គំរូ​បន្ទះ​សៀគ្វី"</string>
     <string name="email_addresses" msgid="5320415175940315400">"អាសយដ្ឋាន​អ៊ីមែល"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"លេខទូរស័ព្ទ"</string>
 </resources>
diff --git a/chips/sample/res/values-ko/strings.xml b/chips/sample/res/values-ko/strings.xml
index 32b49a7..24d2793 100644
--- a/chips/sample/res/values-ko/strings.xml
+++ b/chips/sample/res/values-ko/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"칩 샘플"</string>
     <string name="email_addresses" msgid="5320415175940315400">"이메일 주소"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"전화번호"</string>
 </resources>
diff --git a/chips/sample/res/values-lo-rLA/strings.xml b/chips/sample/res/values-lo-rLA/strings.xml
index 6ccf492..6357807 100644
--- a/chips/sample/res/values-lo-rLA/strings.xml
+++ b/chips/sample/res/values-lo-rLA/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"ທີ່ຢູ່ອີເມວ"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"ເບີໂທລະສັບ:"</string>
 </resources>
diff --git a/chips/sample/res/values-lt/strings.xml b/chips/sample/res/values-lt/strings.xml
index ce73b40..b966062 100644
--- a/chips/sample/res/values-lt/strings.xml
+++ b/chips/sample/res/values-lt/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Lustų pavyzdžiai"</string>
     <string name="email_addresses" msgid="5320415175940315400">"El. pašto adresai"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefonų numeriai"</string>
 </resources>
diff --git a/chips/sample/res/values-lv/strings.xml b/chips/sample/res/values-lv/strings.xml
index 6dd6ffe..fec05b5 100644
--- a/chips/sample/res/values-lv/strings.xml
+++ b/chips/sample/res/values-lv/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-pasta adreses"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Tālruņa numuri"</string>
 </resources>
diff --git a/chips/sample/res/values-mn-rMN/strings.xml b/chips/sample/res/values-mn-rMN/strings.xml
index 1398a43..5289e5c 100644
--- a/chips/sample/res/values-mn-rMN/strings.xml
+++ b/chips/sample/res/values-mn-rMN/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Чипний дээж"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Имэйл хаягууд"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Утасны дугаарууд"</string>
 </resources>
diff --git a/chips/sample/res/values-ms-rMY/strings.xml b/chips/sample/res/values-ms-rMY/strings.xml
index 696871d..12ab807 100644
--- a/chips/sample/res/values-ms-rMY/strings.xml
+++ b/chips/sample/res/values-ms-rMY/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Sampel Cip"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Alamat E-mel"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Nombor Telefon"</string>
 </resources>
diff --git a/chips/sample/res/values-nb/strings.xml b/chips/sample/res/values-nb/strings.xml
index 2d5e56a..3bff3e2 100644
--- a/chips/sample/res/values-nb/strings.xml
+++ b/chips/sample/res/values-nb/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips-eksempel"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-postadresser"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefonnumre"</string>
 </resources>
diff --git a/chips/sample/res/values-nl/strings.xml b/chips/sample/res/values-nl/strings.xml
index f47ff3a..8951311 100644
--- a/chips/sample/res/values-nl/strings.xml
+++ b/chips/sample/res/values-nl/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chipsvoorbeeld"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-mailadressen"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefoonnummers"</string>
 </resources>
diff --git a/chips/sample/res/values-pl/strings.xml b/chips/sample/res/values-pl/strings.xml
index 573d22e..fedec0d 100644
--- a/chips/sample/res/values-pl/strings.xml
+++ b/chips/sample/res/values-pl/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Próbka chipsów"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Adresy e-mail"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Numery telefonów"</string>
 </resources>
diff --git a/chips/sample/res/values-pt-rPT/strings.xml b/chips/sample/res/values-pt-rPT/strings.xml
index 675e2eb..951d30a 100644
--- a/chips/sample/res/values-pt-rPT/strings.xml
+++ b/chips/sample/res/values-pt-rPT/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Amostra de Chips"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Endereços de email"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Números de telefone"</string>
 </resources>
diff --git a/chips/sample/res/values-pt/strings.xml b/chips/sample/res/values-pt/strings.xml
index 5f8e346..9d2e732 100644
--- a/chips/sample/res/values-pt/strings.xml
+++ b/chips/sample/res/values-pt/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Amostra de chips"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Endereços de e-mail"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Números de telefone"</string>
 </resources>
diff --git a/chips/sample/res/values-ro/strings.xml b/chips/sample/res/values-ro/strings.xml
index eb71526..bcffb5e 100644
--- a/chips/sample/res/values-ro/strings.xml
+++ b/chips/sample/res/values-ro/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Mostră Chips"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Adrese de e-mail"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Numere de telefon"</string>
 </resources>
diff --git a/chips/sample/res/values-ru/strings.xml b/chips/sample/res/values-ru/strings.xml
index 215e40a..10f052e 100644
--- a/chips/sample/res/values-ru/strings.xml
+++ b/chips/sample/res/values-ru/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Адреса эл. почты"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Номера телефонов"</string>
 </resources>
diff --git a/chips/sample/res/values-sk/strings.xml b/chips/sample/res/values-sk/strings.xml
index 11d71c5..1297298 100644
--- a/chips/sample/res/values-sk/strings.xml
+++ b/chips/sample/res/values-sk/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Ukážka čipov"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-mailové adresy"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefónne čísla"</string>
 </resources>
diff --git a/chips/sample/res/values-sl/strings.xml b/chips/sample/res/values-sl/strings.xml
index 1e1c566..0e1c855 100644
--- a/chips/sample/res/values-sl/strings.xml
+++ b/chips/sample/res/values-sl/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Vzorec čipov"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-poštni naslovi"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefonske številke"</string>
 </resources>
diff --git a/chips/sample/res/values-sr/strings.xml b/chips/sample/res/values-sr/strings.xml
index 4bca249..dbd91a5 100644
--- a/chips/sample/res/values-sr/strings.xml
+++ b/chips/sample/res/values-sr/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Пример чипова"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Адресе е-поште"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Бројеви телефона"</string>
 </resources>
diff --git a/chips/sample/res/values-sv/strings.xml b/chips/sample/res/values-sv/strings.xml
index d7f6773..d787c85 100644
--- a/chips/sample/res/values-sv/strings.xml
+++ b/chips/sample/res/values-sv/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chipsprov"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-postadresser"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefonnummer"</string>
 </resources>
diff --git a/chips/sample/res/values-sw/strings.xml b/chips/sample/res/values-sw/strings.xml
index 62f4048..5afd792 100644
--- a/chips/sample/res/values-sw/strings.xml
+++ b/chips/sample/res/values-sw/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Sampuli ya Chips"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Anwani za Barua Pepe"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Nambari za Simu"</string>
 </resources>
diff --git a/chips/sample/res/values-th/strings.xml b/chips/sample/res/values-th/strings.xml
index 3658256..80bf67d 100644
--- a/chips/sample/res/values-th/strings.xml
+++ b/chips/sample/res/values-th/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"ตัวอย่างชิป"</string>
     <string name="email_addresses" msgid="5320415175940315400">"ที่อยู่อีเมล"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"หมายเลขโทรศัพท์"</string>
 </resources>
diff --git a/chips/sample/res/values-tl/strings.xml b/chips/sample/res/values-tl/strings.xml
index 96cd1c7..411e0d4 100644
--- a/chips/sample/res/values-tl/strings.xml
+++ b/chips/sample/res/values-tl/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Sample ng Mga Chip"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Mga Email Address"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Mga Numero ng Telepono"</string>
 </resources>
diff --git a/chips/sample/res/values-tr/strings.xml b/chips/sample/res/values-tr/strings.xml
index 13395ab..dad01bb 100644
--- a/chips/sample/res/values-tr/strings.xml
+++ b/chips/sample/res/values-tr/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Fiş Örneği"</string>
     <string name="email_addresses" msgid="5320415175940315400">"E-posta Adresleri"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Telefon Numaraları"</string>
 </resources>
diff --git a/chips/sample/res/values-uk/strings.xml b/chips/sample/res/values-uk/strings.xml
index cdf5837..f09cb8c 100644
--- a/chips/sample/res/values-uk/strings.xml
+++ b/chips/sample/res/values-uk/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Електронні адреси"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Номери телефонів"</string>
 </resources>
diff --git a/chips/sample/res/values-vi/strings.xml b/chips/sample/res/values-vi/strings.xml
index a93a8c9..b9bc474 100644
--- a/chips/sample/res/values-vi/strings.xml
+++ b/chips/sample/res/values-vi/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Mẫu chip"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Địa chỉ email"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Số điện thoại"</string>
 </resources>
diff --git a/chips/sample/res/values-zh-rCN/strings.xml b/chips/sample/res/values-zh-rCN/strings.xml
index 40f6ef1..ebee45c 100644
--- a/chips/sample/res/values-zh-rCN/strings.xml
+++ b/chips/sample/res/values-zh-rCN/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"电子邮件地址"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"电话号码"</string>
 </resources>
diff --git a/chips/sample/res/values-zh-rHK/strings.xml b/chips/sample/res/values-zh-rHK/strings.xml
index 18c7f2e..d2c3bb0 100644
--- a/chips/sample/res/values-zh-rHK/strings.xml
+++ b/chips/sample/res/values-zh-rHK/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"電郵地址"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"電話號碼"</string>
 </resources>
diff --git a/chips/sample/res/values-zh-rTW/strings.xml b/chips/sample/res/values-zh-rTW/strings.xml
index 971df5d..b502833 100644
--- a/chips/sample/res/values-zh-rTW/strings.xml
+++ b/chips/sample/res/values-zh-rTW/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Chips Sample"</string>
     <string name="email_addresses" msgid="5320415175940315400">"電子郵件地址"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"電話號碼"</string>
 </resources>
diff --git a/chips/sample/res/values-zu/strings.xml b/chips/sample/res/values-zu/strings.xml
index de6722b..6a106b7 100644
--- a/chips/sample/res/values-zu/strings.xml
+++ b/chips/sample/res/values-zu/strings.xml
@@ -16,6 +16,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_name" msgid="4076638519189386225">"Isempula yama-chip"</string>
     <string name="email_addresses" msgid="5320415175940315400">"Amakheli we-imeyili"</string>
     <string name="phone_numbers" msgid="7836326833170390688">"Izinombolo zefoni"</string>
 </resources>
diff --git a/chips/src/com/android/ex/chips/BaseRecipientAdapter.java b/chips/src/com/android/ex/chips/BaseRecipientAdapter.java
index d52c7ca..468e168 100644
--- a/chips/src/com/android/ex/chips/BaseRecipientAdapter.java
+++ b/chips/src/com/android/ex/chips/BaseRecipientAdapter.java
@@ -23,6 +23,8 @@
 import android.content.pm.PackageManager.NameNotFoundException;
 import android.content.res.Resources;
 import android.database.Cursor;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
 import android.net.Uri;
 import android.os.AsyncTask;
 import android.os.Handler;
@@ -45,6 +47,7 @@
 import com.android.ex.chips.DropdownChipLayouter.AdapterType;
 
 import java.io.ByteArrayOutputStream;
+import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
@@ -57,8 +60,7 @@
 /**
  * Adapter for showing a recipient list.
  */
-public abstract class BaseRecipientAdapter extends BaseAdapter implements Filterable,
-        AccountSpecifier {
+public class BaseRecipientAdapter extends BaseAdapter implements Filterable, AccountSpecifier {
     private static final String TAG = "BaseRecipientAdapter";
 
     private static final boolean DEBUG = false;
@@ -147,10 +149,11 @@
         public final int destinationType;
         public final String destinationLabel;
         public final long contactId;
+        public final Long directoryId;
         public final long dataId;
         public final String thumbnailUriString;
         public final int displayNameSource;
-        public final boolean isGalContact;
+        public final String lookupKey;
 
         public TemporaryEntry(
                 String displayName,
@@ -158,31 +161,34 @@
                 int destinationType,
                 String destinationLabel,
                 long contactId,
+                Long directoryId,
                 long dataId,
                 String thumbnailUriString,
                 int displayNameSource,
-                boolean isGalContact) {
+                String lookupKey) {
             this.displayName = displayName;
             this.destination = destination;
             this.destinationType = destinationType;
             this.destinationLabel = destinationLabel;
             this.contactId = contactId;
+            this.directoryId = directoryId;
             this.dataId = dataId;
             this.thumbnailUriString = thumbnailUriString;
             this.displayNameSource = displayNameSource;
-            this.isGalContact = isGalContact;
+            this.lookupKey = lookupKey;
         }
 
-        public TemporaryEntry(Cursor cursor, boolean isGalContact) {
+        public TemporaryEntry(Cursor cursor, Long directoryId) {
             this.displayName = cursor.getString(Queries.Query.NAME);
             this.destination = cursor.getString(Queries.Query.DESTINATION);
             this.destinationType = cursor.getInt(Queries.Query.DESTINATION_TYPE);
             this.destinationLabel = cursor.getString(Queries.Query.DESTINATION_LABEL);
             this.contactId = cursor.getLong(Queries.Query.CONTACT_ID);
+            this.directoryId = directoryId;
             this.dataId = cursor.getLong(Queries.Query.DATA_ID);
             this.thumbnailUriString = cursor.getString(Queries.Query.PHOTO_THUMBNAIL_URI);
             this.displayNameSource = cursor.getInt(Queries.Query.DISPLAY_NAME_SOURCE);
-            this.isGalContact = isGalContact;
+            this.lookupKey = cursor.getString(Queries.Query.LOOKUP_KEY);
         }
     }
 
@@ -234,7 +240,8 @@
             }
 
             try {
-                defaultDirectoryCursor = doQuery(constraint, mPreferredMaxResultCount, null);
+                defaultDirectoryCursor = doQuery(constraint, mPreferredMaxResultCount,
+                        null /* directoryId */);
 
                 if (defaultDirectoryCursor == null) {
                     if (DEBUG) {
@@ -254,7 +261,7 @@
                         // Note: At this point each entry doesn't contain any photo
                         // (thus getPhotoBytes() returns null).
                         putOneEntry(new TemporaryEntry(defaultDirectoryCursor,
-                                false /* isGalContact */),
+                                null /* directoryId */),
                                 true, entryMap, nonAggregatedEntries, existingDestinations);
                     }
 
@@ -385,7 +392,7 @@
 
                     if (cursor != null) {
                         while (cursor.moveToNext()) {
-                            tempEntries.add(new TemporaryEntry(cursor, true /* isGalContact */));
+                            tempEntries.add(new TemporaryEntry(cursor, mParams.directoryId));
                         }
                     }
                 } finally {
@@ -695,8 +702,8 @@
                     entry.displayName,
                     entry.displayNameSource,
                     entry.destination, entry.destinationType, entry.destinationLabel,
-                    entry.contactId, entry.dataId, entry.thumbnailUriString, true,
-                    entry.isGalContact));
+                    entry.contactId, entry.directoryId, entry.dataId, entry.thumbnailUriString,
+                    true, entry.lookupKey));
         } else if (entryMap.containsKey(entry.contactId)) {
             // We already have a section for the person.
             final List<RecipientEntry> entryList = entryMap.get(entry.contactId);
@@ -704,16 +711,16 @@
                     entry.displayName,
                     entry.displayNameSource,
                     entry.destination, entry.destinationType, entry.destinationLabel,
-                    entry.contactId, entry.dataId, entry.thumbnailUriString, true,
-                    entry.isGalContact));
+                    entry.contactId, entry.directoryId, entry.dataId, entry.thumbnailUriString,
+                    true, entry.lookupKey));
         } else {
             final List<RecipientEntry> entryList = new ArrayList<RecipientEntry>();
             entryList.add(RecipientEntry.constructTopLevelEntry(
                     entry.displayName,
                     entry.displayNameSource,
                     entry.destination, entry.destinationType, entry.destinationLabel,
-                    entry.contactId, entry.dataId, entry.thumbnailUriString, true,
-                    entry.isGalContact));
+                    entry.contactId, entry.directoryId, entry.dataId, entry.thumbnailUriString,
+                    true, entry.lookupKey));
             entryMap.put(entry.contactId, entryList);
         }
     }
@@ -757,7 +764,7 @@
     }
 
 
-    protected interface EntriesUpdatedObserver {
+    public interface EntriesUpdatedObserver {
         public void onChanged(List<RecipientEntry> entries);
     }
 
@@ -879,6 +886,39 @@
             } finally {
                 photoCursor.close();
             }
+        } else {
+            InputStream inputStream = null;
+            ByteArrayOutputStream outputStream = null;
+            try {
+                inputStream = mContentResolver.openInputStream(photoThumbnailUri);
+                final Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
+
+                if (bitmap != null) {
+                    outputStream = new ByteArrayOutputStream();
+                    bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream);
+                    photoBytes = outputStream.toByteArray();
+
+                    entry.setPhotoBytes(photoBytes);
+                    mPhotoCacheMap.put(photoThumbnailUri, photoBytes);
+                }
+            } catch (final FileNotFoundException e) {
+                Log.w(TAG, "Error opening InputStream for photo", e);
+            } finally {
+                try {
+                    if (inputStream != null) {
+                        inputStream.close();
+                    }
+                } catch (IOException e) {
+                    Log.e(TAG, "Error closing photo input stream", e);
+                }
+                try {
+                    if (outputStream != null) {
+                        outputStream.close();
+                    }
+                } catch (IOException e) {
+                    Log.e(TAG, "Error closing photo output stream", e);
+                }
+            }
         }
     }
 
@@ -952,8 +992,11 @@
     public View getView(int position, View convertView, ViewGroup parent) {
         final RecipientEntry entry = getEntries().get(position);
 
+        final String constraint = mCurrentConstraint == null ? null :
+                mCurrentConstraint.toString();
+
         return mDropdownChipLayouter.bindView(convertView, parent, entry, position,
-                AdapterType.BASE_RECIPIENT, mCurrentConstraint.toString());
+                AdapterType.BASE_RECIPIENT, constraint);
     }
 
     public Account getAccount() {
diff --git a/chips/src/com/android/ex/chips/DropdownChipLayouter.java b/chips/src/com/android/ex/chips/DropdownChipLayouter.java
index aceefab..6b0e78e 100644
--- a/chips/src/com/android/ex/chips/DropdownChipLayouter.java
+++ b/chips/src/com/android/ex/chips/DropdownChipLayouter.java
@@ -171,7 +171,7 @@
                     if (thumbnailUri != null) {
                         // TODO: see if this needs to be done outside the main thread
                         // as it may be too slow to get immediately.
-                        view.setImageURI(entry.getPhotoThumbnailUri());
+                        view.setImageURI(thumbnailUri);
                     } else {
                         view.setImageResource(getDefaultPhotoResId());
                     }
diff --git a/chips/src/com/android/ex/chips/Queries.java b/chips/src/com/android/ex/chips/Queries.java
index 9d31aec..1e66b96 100644
--- a/chips/src/com/android/ex/chips/Queries.java
+++ b/chips/src/com/android/ex/chips/Queries.java
@@ -18,6 +18,7 @@
 
 import android.content.res.Resources;
 import android.net.Uri;
+import android.provider.ContactsContract;
 import android.provider.ContactsContract.CommonDataKinds.Email;
 import android.provider.ContactsContract.CommonDataKinds.Phone;
 import android.provider.ContactsContract.Contacts;
@@ -28,14 +29,16 @@
 /* package */ class Queries {
 
     public static final Query PHONE = new Query(new String[] {
-            Contacts.DISPLAY_NAME,       // 0
-            Phone.NUMBER,                // 1
-            Phone.TYPE,                  // 2
-            Phone.LABEL,                 // 3
-            Phone.CONTACT_ID,            // 4
-            Phone._ID,                   // 5
-            Contacts.PHOTO_THUMBNAIL_URI,// 6
-            Contacts.DISPLAY_NAME_SOURCE // 7
+            Contacts.DISPLAY_NAME,                          // 0
+            Phone.NUMBER,                                   // 1
+            Phone.TYPE,                                     // 2
+            Phone.LABEL,                                    // 3
+            Phone.CONTACT_ID,                               // 4
+            Phone._ID,                                      // 5
+            Contacts.PHOTO_THUMBNAIL_URI,                   // 6
+            Contacts.DISPLAY_NAME_SOURCE,                   // 7
+            Contacts.LOOKUP_KEY,                            // 8
+            ContactsContract.CommonDataKinds.Email.MIMETYPE // 9
         }, Phone.CONTENT_FILTER_URI, Phone.CONTENT_URI) {
 
             @Override
@@ -46,14 +49,16 @@
     };
 
     public static final Query EMAIL = new Query(new String[]{
-            Contacts.DISPLAY_NAME,       // 0
-            Email.DATA,                  // 1
-            Email.TYPE,                  // 2
-            Email.LABEL,                 // 3
-            Email.CONTACT_ID,            // 4
-            Email._ID,                   // 5
-            Contacts.PHOTO_THUMBNAIL_URI,// 6
-            Contacts.DISPLAY_NAME_SOURCE // 7
+            Contacts.DISPLAY_NAME,                          // 0
+            Email.DATA,                                     // 1
+            Email.TYPE,                                     // 2
+            Email.LABEL,                                    // 3
+            Email.CONTACT_ID,                               // 4
+            Email._ID,                                      // 5
+            Contacts.PHOTO_THUMBNAIL_URI,                   // 6
+            Contacts.DISPLAY_NAME_SOURCE,                   // 7
+            Contacts.LOOKUP_KEY,                            // 8
+            ContactsContract.CommonDataKinds.Email.MIMETYPE // 9
         }, Email.CONTENT_FILTER_URI, Email.CONTENT_URI) {
 
             @Override
@@ -76,8 +81,10 @@
         public static final int DATA_ID = 5;             // long
         public static final int PHOTO_THUMBNAIL_URI = 6; // String
         public static final int DISPLAY_NAME_SOURCE = 7; // int
+        public static final int LOOKUP_KEY = 8;          // String
+        public static final int MIME_TYPE = 9;           // String
 
-        public Query (String[] projection, Uri contentFilter, Uri content) {
+        public Query(String[] projection, Uri contentFilter, Uri content) {
             mProjection = projection;
             mContentFilterUri = contentFilter;
             mContentUri = content;
diff --git a/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java b/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
index 547a76b..f6f662d 100644
--- a/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
+++ b/chips/src/com/android/ex/chips/RecipientAlternatesAdapter.java
@@ -23,6 +23,7 @@
 import android.database.MatrixCursor;
 import android.net.Uri;
 import android.provider.ContactsContract;
+import android.provider.ContactsContract.Contacts;
 import android.text.TextUtils;
 import android.text.util.Rfc822Token;
 import android.text.util.Rfc822Tokenizer;
@@ -60,9 +61,11 @@
 
     public static final int QUERY_TYPE_EMAIL = 0;
     public static final int QUERY_TYPE_PHONE = 1;
-    private Query mQuery;
+    private final Long mDirectoryId;
     private DropdownChipLayouter mDropdownChipLayouter;
 
+    private static final Map<String, String> sCorrectedPhotoUris = new HashMap<String, String>();
+
     public interface RecipientMatchCallback {
         public void matchesFound(Map<String, RecipientEntry> results);
         /**
@@ -123,7 +126,7 @@
                     query.getProjection(),
                     query.getProjection()[Queries.Query.DESTINATION] + " IN ("
                             + bindString.toString() + ")", addressArray, null);
-            recipientEntries = processContactEntries(c);
+            recipientEntries = processContactEntries(c, null /* directoryId */);
             callback.matchesFound(recipientEntries);
         } finally {
             if (c != null) {
@@ -163,6 +166,7 @@
             if (paramsList != null) {
                 Cursor directoryContactsCursor = null;
                 for (String unresolvedAddress : unresolvedAddresses) {
+                    Long directoryId = null;
                     for (int i = 0; i < paramsList.size(); i++) {
                         try {
                             directoryContactsCursor = doQuery(unresolvedAddress, 1,
@@ -174,6 +178,7 @@
                                 directoryContactsCursor.close();
                                 directoryContactsCursor = null;
                             } else {
+                                directoryId = paramsList.get(i).directoryId;
                                 break;
                             }
                         }
@@ -181,7 +186,7 @@
                     if (directoryContactsCursor != null) {
                         try {
                             final Map<String, RecipientEntry> entries =
-                                    processContactEntries(directoryContactsCursor);
+                                    processContactEntries(directoryContactsCursor, directoryId);
 
                             for (final String address : entries.keySet()) {
                                 matchesNotFound.remove(address);
@@ -212,7 +217,8 @@
         callback.matchesNotFound(matchesNotFound);
     }
 
-    private static HashMap<String, RecipientEntry> processContactEntries(Cursor c) {
+    private static HashMap<String, RecipientEntry> processContactEntries(Cursor c,
+            Long directoryId) {
         HashMap<String, RecipientEntry> recipientEntries = new HashMap<String, RecipientEntry>();
         if (c != null && c.moveToFirst()) {
             do {
@@ -225,10 +231,11 @@
                         c.getInt(Queries.Query.DESTINATION_TYPE),
                         c.getString(Queries.Query.DESTINATION_LABEL),
                         c.getLong(Queries.Query.CONTACT_ID),
+                        directoryId,
                         c.getLong(Queries.Query.DATA_ID),
                         c.getString(Queries.Query.PHOTO_THUMBNAIL_URI),
                         true,
-                        false /* isGalContact TODO(skennedy) We should look these up eventually */);
+                        c.getString(Queries.Query.LOOKUP_KEY));
 
                 /*
                  * In certain situations, we may have two results for one address, where one of the
@@ -325,43 +332,74 @@
         return cursor;
     }
 
-    public RecipientAlternatesAdapter(Context context, long contactId, long currentId,
-            int queryMode, OnCheckedItemChangedListener listener,
-        DropdownChipLayouter dropdownChipLayouter) {
-        super(context, getCursorForConstruction(context, contactId, queryMode), 0);
+    public RecipientAlternatesAdapter(Context context, long contactId, Long directoryId,
+            String lookupKey, long currentId, int queryMode, OnCheckedItemChangedListener listener,
+            DropdownChipLayouter dropdownChipLayouter) {
+        super(context,
+                getCursorForConstruction(context, contactId, directoryId, lookupKey, queryMode), 0);
         mCurrentId = currentId;
+        mDirectoryId = directoryId;
         mCheckedItemChangedListener = listener;
 
-        if (queryMode == QUERY_TYPE_EMAIL) {
-            mQuery = Queries.EMAIL;
-        } else if (queryMode == QUERY_TYPE_PHONE) {
-            mQuery = Queries.PHONE;
-        } else {
-            mQuery = Queries.EMAIL;
-            Log.e(TAG, "Unsupported query type: " + queryMode);
-        }
-
         mDropdownChipLayouter = dropdownChipLayouter;
     }
 
-    private static Cursor getCursorForConstruction(Context context, long contactId, int queryType) {
+    private static Cursor getCursorForConstruction(Context context, long contactId,
+            Long directoryId, String lookupKey, int queryType) {
         final Cursor cursor;
+        final String desiredMimeType;
         if (queryType == QUERY_TYPE_EMAIL) {
+            final Uri uri;
+            final StringBuilder selection = new StringBuilder();
+            selection.append(Queries.EMAIL.getProjection()[Queries.Query.CONTACT_ID]);
+            selection.append(" = ?");
+
+            if (directoryId == null || lookupKey == null) {
+                uri = Queries.EMAIL.getContentUri();
+                desiredMimeType = null;
+            } else {
+                final Uri.Builder builder = Contacts.getLookupUri(contactId, lookupKey).buildUpon();
+                builder.appendPath(Contacts.Entity.CONTENT_DIRECTORY)
+                        .appendQueryParameter(ContactsContract.DIRECTORY_PARAM_KEY,
+                                String.valueOf(directoryId));
+                uri = builder.build();
+                desiredMimeType = ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE;
+            }
             cursor = context.getContentResolver().query(
-                    Queries.EMAIL.getContentUri(),
+                    uri,
                     Queries.EMAIL.getProjection(),
-                    Queries.EMAIL.getProjection()[Queries.Query.CONTACT_ID] + " =?", new String[] {
+                    selection.toString(), new String[] {
                         String.valueOf(contactId)
                     }, null);
         } else {
+            final Uri uri;
+            final StringBuilder selection = new StringBuilder();
+            selection.append(Queries.PHONE.getProjection()[Queries.Query.CONTACT_ID]);
+            selection.append(" = ?");
+
+            if (lookupKey == null) {
+                uri = Queries.PHONE.getContentUri();
+                desiredMimeType = null;
+            } else {
+                final Uri.Builder builder = Contacts.getLookupUri(contactId, lookupKey).buildUpon();
+                builder.appendPath(Contacts.Entity.CONTENT_DIRECTORY)
+                        .appendQueryParameter(ContactsContract.DIRECTORY_PARAM_KEY,
+                                String.valueOf(directoryId));
+                uri = builder.build();
+                desiredMimeType = ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE;
+            }
             cursor = context.getContentResolver().query(
-                    Queries.PHONE.getContentUri(),
+                    uri,
                     Queries.PHONE.getProjection(),
-                    Queries.PHONE.getProjection()[Queries.Query.CONTACT_ID] + " =?", new String[] {
+                    selection.toString(), new String[] {
                         String.valueOf(contactId)
                     }, null);
         }
-        return removeDuplicateDestinations(cursor);
+
+        final Cursor resultCursor = removeUndesiredDestinations(cursor, desiredMimeType, lookupKey);
+        cursor.close();
+
+        return resultCursor;
     }
 
     /**
@@ -374,22 +412,53 @@
      * - This method creates a MatrixCursor, so all data will be kept in memory.  We wouldn't want
      * to do this if the original cursor is large, but it's okay here because the alternate list
      * won't be that big.
+     *
+     * @param desiredMimeType If this is non-<code>null</code>, only entries with this mime type
+     *            will be added to the cursor
+     * @param lookupKey The lookup key used for this contact if there isn't one in the cursor. This
+     *            should be the same one used in the query that returned the cursor
      */
     // Visible for testing
-    /* package */ static Cursor removeDuplicateDestinations(Cursor original) {
+    static Cursor removeUndesiredDestinations(final Cursor original, final String desiredMimeType,
+            final String lookupKey) {
         final MatrixCursor result = new MatrixCursor(
                 original.getColumnNames(), original.getCount());
         final HashSet<String> destinationsSeen = new HashSet<String>();
 
+        String defaultDisplayName = null;
+        String defaultPhotoThumbnailUri = null;
+        int defaultDisplayNameSource = 0;
+
+        // Find some nice defaults in case we need them
         original.moveToPosition(-1);
         while (original.moveToNext()) {
+            final String mimeType = original.getString(Query.MIME_TYPE);
+
+            if (ContactsContract.CommonDataKinds.StructuredName.CONTENT_ITEM_TYPE.equals(
+                    mimeType)) {
+                // Store this data
+                defaultDisplayName = original.getString(Query.NAME);
+                defaultPhotoThumbnailUri = original.getString(Query.PHOTO_THUMBNAIL_URI);
+                defaultDisplayNameSource = original.getInt(Query.DISPLAY_NAME_SOURCE);
+                break;
+            }
+        }
+
+        original.moveToPosition(-1);
+        while (original.moveToNext()) {
+            if (desiredMimeType != null) {
+                final String mimeType = original.getString(Query.MIME_TYPE);
+                if (!desiredMimeType.equals(mimeType)) {
+                    continue;
+                }
+            }
             final String destination = original.getString(Query.DESTINATION);
             if (destinationsSeen.contains(destination)) {
                 continue;
             }
             destinationsSeen.add(destination);
 
-            result.addRow(new Object[] {
+            final Object[] row = new Object[] {
                     original.getString(Query.NAME),
                     original.getString(Query.DESTINATION),
                     original.getInt(Query.DESTINATION_TYPE),
@@ -397,8 +466,48 @@
                     original.getLong(Query.CONTACT_ID),
                     original.getLong(Query.DATA_ID),
                     original.getString(Query.PHOTO_THUMBNAIL_URI),
-                    original.getInt(Query.DISPLAY_NAME_SOURCE)
-                    });
+                    original.getInt(Query.DISPLAY_NAME_SOURCE),
+                    original.getString(Query.LOOKUP_KEY),
+                    original.getString(Query.MIME_TYPE)
+            };
+
+            if (row[Query.NAME] == null) {
+                row[Query.NAME] = defaultDisplayName;
+            }
+            if (row[Query.PHOTO_THUMBNAIL_URI] == null) {
+                row[Query.PHOTO_THUMBNAIL_URI] = defaultPhotoThumbnailUri;
+            }
+            if ((Integer) row[Query.DISPLAY_NAME_SOURCE] == 0) {
+                row[Query.DISPLAY_NAME_SOURCE] = defaultDisplayNameSource;
+            }
+            if (row[Query.LOOKUP_KEY] == null) {
+                row[Query.LOOKUP_KEY] = lookupKey;
+            }
+
+            // Ensure we don't have two '?' like content://.../...?account_name=...?sz=...
+            final String photoThumbnailUri = (String) row[Query.PHOTO_THUMBNAIL_URI];
+            if (photoThumbnailUri != null) {
+                if (sCorrectedPhotoUris.containsKey(photoThumbnailUri)) {
+                    row[Query.PHOTO_THUMBNAIL_URI] = sCorrectedPhotoUris.get(photoThumbnailUri);
+                } else if (photoThumbnailUri.indexOf('?') != photoThumbnailUri.lastIndexOf('?')) {
+                    final String[] parts = photoThumbnailUri.split("\\?");
+                    final StringBuilder correctedUriBuilder = new StringBuilder();
+                    for (int i = 0; i < parts.length; i++) {
+                        if (i == 1) {
+                            correctedUriBuilder.append("?"); // We only want one of these
+                        } else if (i > 1) {
+                            correctedUriBuilder.append("&"); // And we want these elsewhere
+                        }
+                        correctedUriBuilder.append(parts[i]);
+                    }
+
+                    final String correctedUri = correctedUriBuilder.toString();
+                    sCorrectedPhotoUris.put(photoThumbnailUri, correctedUri);
+                    row[Query.PHOTO_THUMBNAIL_URI] = correctedUri;
+                }
+            }
+
+            result.addRow(row);
         }
 
         return result;
@@ -423,10 +532,11 @@
                 c.getInt(Queries.Query.DESTINATION_TYPE),
                 c.getString(Queries.Query.DESTINATION_LABEL),
                 c.getLong(Queries.Query.CONTACT_ID),
+                mDirectoryId,
                 c.getLong(Queries.Query.DATA_ID),
                 c.getString(Queries.Query.PHOTO_THUMBNAIL_URI),
                 true,
-                false /* isGalContact TODO(skennedy) We should look these up eventually */);
+                c.getString(Queries.Query.LOOKUP_KEY));
     }
 
     @Override
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java
index e48a3b1..4339b9e 100644
--- a/chips/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java
@@ -160,6 +160,17 @@
 
     private static final int AVATAR_POSITION_START = 1;
 
+    /**
+     * Enumerator for image span alignment. See attr.xml for more details.
+     * 0 for bottom, 1 for baseline.
+     */
+    private int mImageSpanAlignment;
+
+    private static final int IMAGE_SPAN_ALIGNMENT_BOTTOM = 0;
+
+    private static final int IMAGE_SPAN_ALIGNMENT_BASELINE = 1;
+
+
     private boolean mDisableDelete;
 
     private Tokenizer mTokenizer;
@@ -316,11 +327,13 @@
 
     @Override
     protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
         mAttachedToWindow = false;
     }
 
     @Override
     protected void onAttachedToWindow() {
+        super.onAttachedToWindow();
         mAttachedToWindow = true;
     }
 
@@ -466,7 +479,7 @@
         baseAdapter.setDropdownChipLayouter(mDropdownChipLayouter);
     }
 
-    private void scrollBottomIntoView() {
+    protected void scrollBottomIntoView() {
         if (mScrollView != null && mShouldShrink) {
             int[] location = new int[2];
             getLocationOnScreen(location);
@@ -482,6 +495,10 @@
         }
     }
 
+    protected ScrollView getScrollView() {
+        return mScrollView;
+    }
+
     @Override
     public void performValidation() {
         // Do nothing. Chips handles its own validation.
@@ -617,7 +634,8 @@
         float[] widths = new float[1];
         paint.getTextWidths(" ", widths);
         CharSequence ellipsizedText = ellipsizeText(createChipDisplayText(contact), paint,
-                calculateAvailableWidth() - iconWidth - widths[0]);
+                calculateAvailableWidth() - iconWidth - widths[0] - backgroundPadding.left
+                    - backgroundPadding.right);;
         int textWidth = (int) paint.measureText(ellipsizedText, 0, ellipsizedText.length());
 
         // Make sure there is a minimum chip width so the user can ALWAYS
@@ -718,7 +736,7 @@
     }
 
     /**
-     * Draws the icon onto the canvas given the source rectangle of the bitmap and the destination 
+     * Draws the icon onto the canvas given the source rectangle of the bitmap and the destination
      * rectangle of the canvas.
      */
     protected void drawIconOnCanvas(Bitmap icon, Canvas canvas, Paint paint, RectF src, RectF dst) {
@@ -749,13 +767,25 @@
         // Pass the full text, un-ellipsized, to the chip.
         Drawable result = new BitmapDrawable(getResources(), tmpBitmap);
         result.setBounds(0, 0, tmpBitmap.getWidth(), tmpBitmap.getHeight());
-        DrawableRecipientChip recipientChip = new VisibleRecipientChip(result, contact);
+        DrawableRecipientChip recipientChip =
+                new VisibleRecipientChip(result, contact, getImageSpanAlignment());
         // Return text to the original size.
         paint.setTextSize(defaultSize);
         paint.setColor(defaultColor);
         return recipientChip;
     }
 
+    private int getImageSpanAlignment() {
+        switch (mImageSpanAlignment) {
+            case IMAGE_SPAN_ALIGNMENT_BASELINE:
+                return ImageSpan.ALIGN_BASELINE;
+            case IMAGE_SPAN_ALIGNMENT_BOTTOM:
+                return ImageSpan.ALIGN_BOTTOM;
+            default:
+                return ImageSpan.ALIGN_BOTTOM;
+        }
+    }
+
     /**
      * Calculate the bottom of the line the chip will be located on using:
      * 1) which line the chip appears on
@@ -820,7 +850,8 @@
             mInvalidChipBackground = r.getDrawable(R.drawable.chip_background_invalid);
         }
         mAvatarPosition = a.getInt(R.styleable.RecipientEditTextView_avatarPosition, 0);
-        mDisableDelete = a.getBoolean(R.styleable.RecipientEditTextView_avatarPosition, false);
+        mImageSpanAlignment = a.getInt(R.styleable.RecipientEditTextView_imageSpanAlignment, 0);
+        mDisableDelete = a.getBoolean(R.styleable.RecipientEditTextView_disableDelete, false);
 
         mLineSpacingExtra =  r.getDimension(R.dimen.line_spacing_extra);
         mMaxLines = r.getInteger(R.integer.chips_max_lines);
@@ -899,7 +930,8 @@
             Rect bounds;
             for (DrawableRecipientChip chip : chips) {
                 bounds = chip.getBounds();
-                if (getWidth() > 0 && bounds.right - bounds.left > getWidth()) {
+                if (getWidth() > 0 && bounds.right - bounds.left >
+                        getWidth() - getPaddingLeft() - getPaddingRight()) {
                     // Need to redraw that chip.
                     replaceChip(chip, chip.getEntry());
                 }
@@ -1431,9 +1463,11 @@
             Spannable span = getSpannable();
             DrawableRecipientChip[] chips = span.getSpans(start, end, DrawableRecipientChip.class);
             if (chips != null && chips.length > 0) {
+                dismissDropDown();
                 return;
             }
         } else if (isCompletedToken) {
+            dismissDropDown();
             return;
         }
         super.performFiltering(text, keyCode);
@@ -1565,7 +1599,8 @@
     }
 
     private ListAdapter createAlternatesAdapter(DrawableRecipientChip chip) {
-        return new RecipientAlternatesAdapter(getContext(), chip.getContactId(), chip.getDataId(),
+        return new RecipientAlternatesAdapter(getContext(), chip.getContactId(),
+                chip.getDirectoryId(), chip.getLookupKey(), chip.getDataId(),
                 getAdapter().getQueryType(), this, mDropdownChipLayouter);
     }
 
@@ -2040,8 +2075,7 @@
             return constructChipSpan(
                     RecipientEntry.constructFakeEntry((String) text, isValid(text.toString())),
                     true, false);
-        } else if (currentChip.getContactId() == RecipientEntry.GENERATED_CONTACT
-                || currentChip.isGalContact()) {
+        } else if (currentChip.getContactId() == RecipientEntry.GENERATED_CONTACT) {
             int start = getChipStart(currentChip);
             int end = getChipEnd(currentChip);
             getSpannable().removeSpan(currentChip);
@@ -2293,6 +2327,7 @@
                 if (mMoreChip != null) {
                     spannable.removeSpan(mMoreChip);
                 }
+                clearSelectedChip();
                 return;
             }
             // Get whether there are any recipients pending addition to the
@@ -2583,7 +2618,7 @@
                     addresses.add(createAddressText(chip.getEntry()));
                 }
             }
-            final BaseRecipientAdapter adapter = (BaseRecipientAdapter) getAdapter();
+            final BaseRecipientAdapter adapter = getAdapter();
             RecipientAlternatesAdapter.getMatchingRecipients(getContext(), adapter, addresses,
                     adapter.getAccount(), new RecipientMatchCallback() {
                         @Override
@@ -2711,7 +2746,7 @@
                     addresses.add(createAddressText(chip.getEntry()));
                 }
             }
-            final BaseRecipientAdapter adapter = (BaseRecipientAdapter) getAdapter();
+            final BaseRecipientAdapter adapter = getAdapter();
             RecipientAlternatesAdapter.getMatchingRecipients(getContext(), adapter, addresses,
                     adapter.getAccount(),
                     new RecipientMatchCallback() {
diff --git a/chips/src/com/android/ex/chips/RecipientEntry.java b/chips/src/com/android/ex/chips/RecipientEntry.java
index 30fccae..7d9b87f 100644
--- a/chips/src/com/android/ex/chips/RecipientEntry.java
+++ b/chips/src/com/android/ex/chips/RecipientEntry.java
@@ -61,6 +61,8 @@
     private final String mDestinationLabel;
     /** ID for the person */
     private final long mContactId;
+    /** ID for the directory this contact came from, or <code>null</code> */
+    private final Long mDirectoryId;
     /** ID for the destination */
     private final long mDataId;
     private final boolean mIsDivider;
@@ -74,11 +76,13 @@
      */
     private byte[] mPhotoBytes;
 
-    private final boolean mIsGalContact;
+    /** See {@link ContactsContract.Contacts#LOOKUP_KEY} */
+    private final String mLookupKey;
 
     private RecipientEntry(int entryType, String displayName, String destination,
-            int destinationType, String destinationLabel, long contactId, long dataId,
-            Uri photoThumbnailUri, boolean isFirstLevel, boolean isValid, boolean isGalContact) {
+            int destinationType, String destinationLabel, long contactId, Long directoryId,
+            long dataId, Uri photoThumbnailUri, boolean isFirstLevel, boolean isValid,
+            String lookupKey) {
         mEntryType = entryType;
         mIsFirstLevel = isFirstLevel;
         mDisplayName = displayName;
@@ -86,12 +90,13 @@
         mDestinationType = destinationType;
         mDestinationLabel = destinationLabel;
         mContactId = contactId;
+        mDirectoryId = directoryId;
         mDataId = dataId;
         mPhotoThumbnailUri = photoThumbnailUri;
         mPhotoBytes = null;
         mIsDivider = false;
         mIsValid = isValid;
-        mIsGalContact = isGalContact;
+        mLookupKey = lookupKey;
     }
 
     public boolean isValid() {
@@ -116,8 +121,8 @@
         final String tokenizedAddress = tokens.length > 0 ? tokens[0].getAddress() : address;
 
         return new RecipientEntry(ENTRY_TYPE_PERSON, tokenizedAddress, tokenizedAddress,
-                INVALID_DESTINATION_TYPE, null,
-                INVALID_CONTACT, INVALID_CONTACT, null, true, isValid, false /* isGalContact */);
+                INVALID_DESTINATION_TYPE, null, INVALID_CONTACT, null /* directoryId */,
+                INVALID_CONTACT, null, true, isValid, null /* lookupKey */);
     }
 
     /**
@@ -126,8 +131,8 @@
     public static RecipientEntry constructFakePhoneEntry(final String phoneNumber,
             final boolean isValid) {
         return new RecipientEntry(ENTRY_TYPE_PERSON, phoneNumber, phoneNumber,
-                INVALID_DESTINATION_TYPE, null,
-                INVALID_CONTACT, INVALID_CONTACT, null, true, isValid, false /* isGalContact */);
+                INVALID_DESTINATION_TYPE, null, INVALID_CONTACT, null /* directoryId */,
+                INVALID_CONTACT, null, true, isValid, null /* lookupKey */);
     }
 
     /**
@@ -149,35 +154,37 @@
     public static RecipientEntry constructGeneratedEntry(String display, String address,
             boolean isValid) {
         return new RecipientEntry(ENTRY_TYPE_PERSON, display, address, INVALID_DESTINATION_TYPE,
-                null, GENERATED_CONTACT, GENERATED_CONTACT, null, true, isValid,
-                false /* isGalContact */);
+                null, GENERATED_CONTACT, null /* directoryId */, GENERATED_CONTACT, null, true,
+                isValid, null /* lookupKey */);
     }
 
     public static RecipientEntry constructTopLevelEntry(String displayName, int displayNameSource,
             String destination, int destinationType, String destinationLabel, long contactId,
-            long dataId, Uri photoThumbnailUri, boolean isValid, boolean isGalContact) {
+            Long directoryId, long dataId, Uri photoThumbnailUri, boolean isValid,
+            String lookupKey) {
         return new RecipientEntry(ENTRY_TYPE_PERSON, pickDisplayName(displayNameSource,
                 displayName, destination), destination, destinationType, destinationLabel,
-                contactId, dataId, photoThumbnailUri, true, isValid, isGalContact);
+                contactId, directoryId, dataId, photoThumbnailUri, true, isValid, lookupKey);
     }
 
     public static RecipientEntry constructTopLevelEntry(String displayName, int displayNameSource,
             String destination, int destinationType, String destinationLabel, long contactId,
-            long dataId, String thumbnailUriAsString, boolean isValid, boolean isGalContact) {
+            Long directoryId, long dataId, String thumbnailUriAsString, boolean isValid,
+            String lookupKey) {
         return new RecipientEntry(ENTRY_TYPE_PERSON, pickDisplayName(displayNameSource,
                 displayName, destination), destination, destinationType, destinationLabel,
-                contactId, dataId, (thumbnailUriAsString != null ? Uri.parse(thumbnailUriAsString)
-                        : null), true, isValid, isGalContact);
+                contactId, directoryId, dataId, (thumbnailUriAsString != null
+                        ? Uri.parse(thumbnailUriAsString) : null), true, isValid, lookupKey);
     }
 
     public static RecipientEntry constructSecondLevelEntry(String displayName,
             int displayNameSource, String destination, int destinationType,
-            String destinationLabel, long contactId, long dataId, String thumbnailUriAsString,
-            boolean isValid, boolean isGalContact) {
+            String destinationLabel, long contactId, Long directoryId, long dataId,
+            String thumbnailUriAsString, boolean isValid, String lookupKey) {
         return new RecipientEntry(ENTRY_TYPE_PERSON, pickDisplayName(displayNameSource,
                 displayName, destination), destination, destinationType, destinationLabel,
-                contactId, dataId, (thumbnailUriAsString != null ? Uri.parse(thumbnailUriAsString)
-                        : null), false, isValid, isGalContact);
+                contactId, directoryId, dataId, (thumbnailUriAsString != null
+                        ? Uri.parse(thumbnailUriAsString) : null), false, isValid, lookupKey);
     }
 
     public int getEntryType() {
@@ -204,6 +211,10 @@
         return mContactId;
     }
 
+    public Long getDirectoryId() {
+        return mDirectoryId;
+    }
+
     public long getDataId() {
         return mDataId;
     }
@@ -234,8 +245,8 @@
         return mEntryType == ENTRY_TYPE_PERSON;
     }
 
-    public boolean isGalContact() {
-        return mIsGalContact;
+    public String getLookupKey() {
+        return mLookupKey;
     }
 
     @Override
diff --git a/chips/src/com/android/ex/chips/recipientchip/BaseRecipientChip.java b/chips/src/com/android/ex/chips/recipientchip/BaseRecipientChip.java
index 032d3b2..8012b5c 100644
--- a/chips/src/com/android/ex/chips/recipientchip/BaseRecipientChip.java
+++ b/chips/src/com/android/ex/chips/recipientchip/BaseRecipientChip.java
@@ -50,6 +50,16 @@
     long getContactId();
 
     /**
+     * Get the directory id of the contact associated with this chip.
+     */
+    Long getDirectoryId();
+
+    /**
+     * Get the directory lookup key associated with this chip, or <code>null</code>.
+     */
+    String getLookupKey();
+
+    /**
      * Get the id of the data associated with this chip.
      */
     long getDataId();
@@ -70,11 +80,4 @@
      * before any reverse lookups.
      */
     CharSequence getOriginalText();
-
-    /**
-     * Checks if this contact was retrieved from a GAL lookup.
-     *
-     * @return <code>true</code> if it came from GAL, <code>false</code> otherwise
-     */
-    boolean isGalContact();
 }
diff --git a/chips/src/com/android/ex/chips/recipientchip/InvisibleRecipientChip.java b/chips/src/com/android/ex/chips/recipientchip/InvisibleRecipientChip.java
index 11a66da..455f2cb 100644
--- a/chips/src/com/android/ex/chips/recipientchip/InvisibleRecipientChip.java
+++ b/chips/src/com/android/ex/chips/recipientchip/InvisibleRecipientChip.java
@@ -62,6 +62,16 @@
     }
 
     @Override
+    public Long getDirectoryId() {
+        return mDelegate.getDirectoryId();
+    }
+
+    @Override
+    public String getLookupKey() {
+        return mDelegate.getLookupKey();
+    }
+
+    @Override
     public long getDataId() {
         return mDelegate.getDataId();
     }
@@ -82,11 +92,6 @@
     }
 
     @Override
-    public boolean isGalContact() {
-        return mDelegate.isGalContact();
-    }
-
-    @Override
     public void draw(final Canvas canvas, final CharSequence text, final int start, final int end,
             final float x, final int top, final int y, final int bottom, final Paint paint) {
         // Do nothing.
diff --git a/chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java b/chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java
index ac8e897..533f53f 100644
--- a/chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java
+++ b/chips/src/com/android/ex/chips/recipientchip/SimpleRecipientChip.java
@@ -27,6 +27,10 @@
 
     private final long mContactId;
 
+    private final Long mDirectoryId;
+
+    private final String mLookupKey;
+
     private final long mDataId;
 
     private final RecipientEntry mEntry;
@@ -39,6 +43,8 @@
         mDisplay = entry.getDisplayName();
         mValue = entry.getDestination().trim();
         mContactId = entry.getContactId();
+        mDirectoryId = entry.getDirectoryId();
+        mLookupKey = entry.getLookupKey();
         mDataId = entry.getDataId();
         mEntry = entry;
     }
@@ -69,6 +75,16 @@
     }
 
     @Override
+    public Long getDirectoryId() {
+        return mDirectoryId;
+    }
+
+    @Override
+    public String getLookupKey() {
+        return mLookupKey;
+    }
+
+    @Override
     public long getDataId() {
         return mDataId;
     }
@@ -93,11 +109,6 @@
     }
 
     @Override
-    public boolean isGalContact() {
-        return mEntry.isGalContact();
-    }
-
-    @Override
     public String toString() {
         return mDisplay + " <" + mValue + ">";
     }
diff --git a/chips/src/com/android/ex/chips/recipientchip/VisibleRecipientChip.java b/chips/src/com/android/ex/chips/recipientchip/VisibleRecipientChip.java
index 4637f69..6d3d27d 100644
--- a/chips/src/com/android/ex/chips/recipientchip/VisibleRecipientChip.java
+++ b/chips/src/com/android/ex/chips/recipientchip/VisibleRecipientChip.java
@@ -32,7 +32,12 @@
     private final SimpleRecipientChip mDelegate;
 
     public VisibleRecipientChip(final Drawable drawable, final RecipientEntry entry) {
-        super(drawable, DynamicDrawableSpan.ALIGN_BOTTOM);
+        this(drawable, entry, DynamicDrawableSpan.ALIGN_BOTTOM);
+    }
+
+    public VisibleRecipientChip(final Drawable drawable, final RecipientEntry entry,
+            final int verticalAlignment) {
+        super(drawable, verticalAlignment);
 
         mDelegate = new SimpleRecipientChip(entry);
     }
@@ -63,6 +68,16 @@
     }
 
     @Override
+    public Long getDirectoryId() {
+        return mDelegate.getDirectoryId();
+    }
+
+    @Override
+    public String getLookupKey() {
+        return mDelegate.getLookupKey();
+    }
+
+    @Override
     public long getDataId() {
         return mDelegate.getDataId();
     }
@@ -83,11 +98,6 @@
     }
 
     @Override
-    public boolean isGalContact() {
-        return mDelegate.isGalContact();
-    }
-
-    @Override
     public Rect getBounds() {
         return getDrawable().getBounds();
     }
diff --git a/chips/tests/src/com/android/ex/chips/RecipientAlternatesAdapterTest.java b/chips/tests/src/com/android/ex/chips/RecipientAlternatesAdapterTest.java
index d4c0460..afb6a00 100644
--- a/chips/tests/src/com/android/ex/chips/RecipientAlternatesAdapterTest.java
+++ b/chips/tests/src/com/android/ex/chips/RecipientAlternatesAdapterTest.java
@@ -27,25 +27,28 @@
 
 public class RecipientAlternatesAdapterTest extends AndroidTestCase {
 
-    public void testRemoveDuplicateDestinations() {
+    public void testRemoveUndesiredDestinations() {
         MatrixCursor c = new MatrixCursor(Queries.EMAIL.getProjection());
         Cursor result;
 
         // Test: Empty input
-        assertEquals(0, RecipientAlternatesAdapter.removeDuplicateDestinations(c).getCount());
+        assertEquals(0, RecipientAlternatesAdapter.removeUndesiredDestinations(c,
+                null /* desiredMimeType */, null /* lookupKey */).getCount());
 
 
         // Test: One row
         addRow(c, "a", "1@android.com", 1, "home", 1000, 2000, "x", 0);
 
-        result = RecipientAlternatesAdapter.removeDuplicateDestinations(c);
+        result = RecipientAlternatesAdapter.removeUndesiredDestinations(c,
+                null /* desiredMimeType */, null /* lookupKey */);
         assertEquals(1, result.getCount());
         assertRow(result, 0, "a", "1@android.com", 1, "home", 1000, 2000, "x", 0);
 
         // Test: two unique rows, different destinations
         addRow(c, "a", "2@android.com", 1, "home", 1000, 2000, "x", 0);
 
-        result = RecipientAlternatesAdapter.removeDuplicateDestinations(c);
+        result = RecipientAlternatesAdapter.removeUndesiredDestinations(c,
+                null /* desiredMimeType */, null /* lookupKey */);
         assertEquals(2, result.getCount());
         assertRow(result, 0, "a", "1@android.com", 1, "home", 1000, 2000, "x", 0);
         assertRow(result, 1, "a", "2@android.com", 1, "home", 1000, 2000, "x", 0);
@@ -54,7 +57,8 @@
         addRow(c, "ax", "1@android.com", 11, "homex", 10001, 2000, "xx", 1);
 
         // Third row should be removed.
-        result = RecipientAlternatesAdapter.removeDuplicateDestinations(c);
+        result = RecipientAlternatesAdapter.removeUndesiredDestinations(c,
+                null /* desiredMimeType */, null /* lookupKey */);
         assertEquals(2, result.getCount());
         assertRow(result, 0, "a", "1@android.com", 1, "home", 1000, 2000, "x", 0);
         assertRow(result, 1, "a", "2@android.com", 1, "home", 1000, 2000, "x", 0);
@@ -63,7 +67,8 @@
         addRow(c, "ax", "2@android.com", 11, "homex", 10001, 2000, "xx", 1);
 
         // Forth row should also be removed.
-        result = RecipientAlternatesAdapter.removeDuplicateDestinations(c);
+        result = RecipientAlternatesAdapter.removeUndesiredDestinations(c,
+                null /* desiredMimeType */, null /* lookupKey */);
         assertEquals(2, result.getCount());
         assertRow(result, 0, "a", "1@android.com", 1, "home", 1000, 2000, "x", 0);
         assertRow(result, 1, "a", "2@android.com", 1, "home", 1000, 2000, "x", 0);
@@ -120,8 +125,8 @@
         {
             final RecipientEntry entry1 =
                     RecipientEntry.constructTopLevelEntry("Android", DisplayNameSources.NICKNAME,
-                            "1@android.com", 0, null, 0, 0, (Uri) null, true,
-                            false /* isGalContact */);
+                            "1@android.com", 0, null, 0, null /* directoryId */, 0, (Uri) null,
+                            true, null /* lookupKey */);
             final RecipientEntry entry2 = RecipientEntry.constructFakeEntry("1@android.com", true);
 
             assertEquals(RecipientAlternatesAdapter.getBetterRecipient(entry1, entry2), entry1);
@@ -133,12 +138,12 @@
         {
             final RecipientEntry entry1 =
                     RecipientEntry.constructTopLevelEntry("Android", DisplayNameSources.NICKNAME,
-                            "1@android.com", 0, null, 0, 0, (Uri) null, true,
-                            false /* isGalContact */);
+                            "1@android.com", 0, null, 0, null /* directoryId */, 0, (Uri) null,
+                            true, null /* lookupKey */);
             final RecipientEntry entry2 =
                     RecipientEntry.constructTopLevelEntry("2@android.com", DisplayNameSources.EMAIL,
-                            "2@android.com", 0, null, 0, 0, (Uri) null, true,
-                            false /* isGalContact */);
+                            "2@android.com", 0, null, 0, null /* directoryId */, 0, (Uri) null,
+                            true, null /* lookupKey */);
 
             assertEquals(RecipientAlternatesAdapter.getBetterRecipient(entry1, entry2), entry1);
             assertEquals(RecipientAlternatesAdapter.getBetterRecipient(entry2, entry1), entry1);
@@ -148,12 +153,12 @@
         {
             final RecipientEntry entry1 =
                     RecipientEntry.constructTopLevelEntry("Android", DisplayNameSources.NICKNAME,
-                            "1@android.com", 0, null, 0, 0, Uri.parse("http://www.android.com"),
-                            true, false /* isGalContact */);
+                            "1@android.com", 0, null, 0, null /* directoryId */, 0,
+                            Uri.parse("http://www.android.com"), true, null /* lookupKey */);
             final RecipientEntry entry2 =
                     RecipientEntry.constructTopLevelEntry("Android", DisplayNameSources.EMAIL,
-                            "2@android.com", 0, null, 0, 0, (Uri) null, true,
-                            false /* isGalContact */);
+                            "2@android.com", 0, null, 0, null /* directoryId */,
+                            0, (Uri) null, true, null /* lookupKey */);
 
             assertEquals(RecipientAlternatesAdapter.getBetterRecipient(entry1, entry2), entry1);
             assertEquals(RecipientAlternatesAdapter.getBetterRecipient(entry2, entry1), entry1);
diff --git a/common/java/com/android/common/NetworkConnectivityListener.java b/common/java/com/android/common/NetworkConnectivityListener.java
index b49b80d..187b1f1 100644
--- a/common/java/com/android/common/NetworkConnectivityListener.java
+++ b/common/java/com/android/common/NetworkConnectivityListener.java
@@ -36,6 +36,7 @@
  * (or poll ConnectivityManager) directly.
  * {@hide}
  */
+@Deprecated
 public class NetworkConnectivityListener {
     private static final String TAG = "NetworkConnectivityListener";
     private static final boolean DBG = false;
@@ -102,7 +103,7 @@
                 target.sendMessage(message);
             }
         }
-    };
+    }
 
     public enum State {
         UNKNOWN,
diff --git a/common/java/com/android/common/Rfc822Validator.java b/common/java/com/android/common/Rfc822Validator.java
index 2db00ff..bb77508 100644
--- a/common/java/com/android/common/Rfc822Validator.java
+++ b/common/java/com/android/common/Rfc822Validator.java
@@ -19,6 +19,7 @@
 import android.text.TextUtils;
 import android.text.util.Rfc822Token;
 import android.text.util.Rfc822Tokenizer;
+import android.util.Patterns;
 import android.widget.AutoCompleteTextView;
 
 import java.util.regex.Pattern;
@@ -38,15 +39,45 @@
  */
 @Deprecated
 public class Rfc822Validator implements AutoCompleteTextView.Validator {
-    /*
-     * Regex.EMAIL_ADDRESS_PATTERN hardcodes the TLD that we accept, but we
-     * want to make sure we will keep accepting email addresses with TLD's
-     * that don't exist at the time of this writing, so this regexp relaxes
-     * that constraint by accepting any kind of top level domain, not just
-     * ".com", ".fr", etc...
+    /**
+     * Expression that matches the local part of an email address.
+     * This expression does not follow the constraints of the RFC towards the dots, because the
+     * de facto standard is to allow them anywhere.
+     *
+     * It is however a simplification and it will not validate the double-quote syntax.
+     */
+    private static final String EMAIL_ADDRESS_LOCALPART_REGEXP =
+        "((?!\\s)[\\.\\w!#$%&'*+\\-/=?^`{|}~\u0080-\uFFFE])+";
+
+    /**
+     * Alias of characters that can be used in IRI, as per RFC 3987.
+     */
+    private static final String GOOD_IRI_CHAR = Patterns.GOOD_IRI_CHAR;
+
+    /**
+     * Regular expression for a domain label, as per RFC 3490.
+     * Its total length must not exceed 63 octets, according to RFC 5890.
+     */
+    private static final String LABEL_REGEXP =
+        "([" + GOOD_IRI_CHAR + "][" + GOOD_IRI_CHAR + "\\-]{0,61})?[" + GOOD_IRI_CHAR + "]";
+
+    /**
+     * Expression that matches a domain name, including international domain names in Punycode or
+     * Unicode.
+     */
+    private static final String DOMAIN_REGEXP =
+        "("+ LABEL_REGEXP + "\\.)+"                 // Subdomains and domain
+        // Top-level domain must be at least 2 chars
+        + "[" + GOOD_IRI_CHAR + "][" + GOOD_IRI_CHAR + "\\-]{0,61}[" + GOOD_IRI_CHAR + "]";
+
+    /**
+     * Pattern for an email address.
+     *
+     * It is similar to {@link android.util.Patterns#EMAIL_ADDRESS}, but also accepts Unicode
+     * characters.
      */
     private static final Pattern EMAIL_ADDRESS_PATTERN =
-            Pattern.compile("[^\\s@]+@([^\\s@\\.]+\\.)+[a-zA-z][a-zA-Z][a-zA-Z]*");
+            Pattern.compile(EMAIL_ADDRESS_LOCALPART_REGEXP + "@" + DOMAIN_REGEXP);
 
     private String mDomain;
     private boolean mRemoveInvalid = false;
@@ -64,7 +95,6 @@
      */
     public boolean isValid(CharSequence text) {
         Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(text);
-
         return tokens.length == 1 &&
                EMAIL_ADDRESS_PATTERN.
                    matcher(tokens[0].getAddress()).matches();
diff --git a/common/tests/src/com/android/common/Rfc822ValidatorTest.java b/common/tests/src/com/android/common/Rfc822ValidatorTest.java
index cbcc812..61b8f25 100644
--- a/common/tests/src/com/android/common/Rfc822ValidatorTest.java
+++ b/common/tests/src/com/android/common/Rfc822ValidatorTest.java
@@ -18,30 +18,74 @@
 
 import android.test.suitebuilder.annotation.SmallTest;
 
+import junit.framework.TestCase;
+
 import java.util.HashMap;
 import java.util.Map;
 
-import junit.framework.TestCase;
-
 public class Rfc822ValidatorTest extends TestCase {
+    static final String[] VALID_EMAILS = new String[] {
+            "a@example.org", "b@exemple.fr", "c@d.e-f",
+            "Very.Common@example.org",
+            "john@EXAMPLE.ORG",
+            "john@a123b.c-d.dept.example.com",
+            "xn--r8jz45g@example.com",
+            "disposable.style.email.with+symbol@example.com",
+            "other.email-with-dash@example.com",
+            "!#$%&'*+-/=?^_`{}|~@example.com",  // Use of allowed special characters.
+            "a@domain-label-cannot-be-longer-than-63-chars-and-this-is-maximum.example.com",
+            // Valid de facto, even if RFC doesn't allow it.
+            "a..b@example.com", ".a@example.com", "b.@example.com",
+            // Punycode is an ASCII representation of International domain names.
+            "john.doe@xn--r8jz45g.xn--zckzah",
+            "john.doe@XN--R8JZ45G.XN--ZXKZAH",
+            "xn--r8jz45g@xn--r8jz45g.XN--ZXKZAH",
+            // Quoted address.
+            // TODO(regisd) Fix Rfc822Tokenizer which loses the quotes.
+            // "\"much.more unusual\"",
+            // "\"very.unusual.@.unusual.com\""
+
+            // Valid only in new Internalized email address.
+             "a@\u00E9.example.com",
+            //"みんな@例え.テスト",
+            "\u307F\u3093\u306A@\u4F8B\u3048.\u30C6\u30B9\u30C8",
+            // "test@test.テスト", // Unicode in TLD only.
+            "everybody@example.\u30C6\u30B9\u30C8",
+            // "test@例え.test", // Unicode in domain only.
+            "everybody@\u4F8B\u3048.test",
+            // "みんな@example.com" // Unicode in localpart only.
+            "\u307F\u3093\u306A@example.test"
+    };
+
+    static final String[] INVALID_EMAILS = new String[] {
+            "a", "example.com", "john.example.com", // Missing at sign.
+            "a b", "a space@example.com", // Space not allowed.
+            // Invalid domain.
+            "john@example..com", "a@b", "a@-b.com", "a@b-.com", "a@b.c",
+            "a@a123456789-123456789-123456789-123456789-123456789-123456789-bcd.example.com",
+            // Invalid characters in domain as per RFC 1034 and RFC 1035,
+            // even if these characters are in RFC5322's domain production.
+            "a@d_e.fg", "a@d!e.fg", "a@d#e.fg", "a@d$e.fg", "a@d%e.fg", "a@d&e.fg", "a@d'e.fg",
+            "a@d*e.fg", "a@d+e.fg", "a@d/e.fg", "a@d=e.fg", "a@d?e.fg", "a@d^e.fg", "a@d{}e.fg",
+            "a@d|e.fg", "a@d~e.fg",
+            // The domain is too long
+            "no@domain-label-cannot-be-longer-than-63-chars-but-this-is-64-chars.com",
+            "john@doe@example.com", // @ must be unique.
+            // Incorrect double quote.
+            // TODO(regisd): Fix Rfc822tokenizer which strips the quotes
+            // "just\"not\"right@example.com", "\"just.not\\\"@example.com",
+            "this\\ still\\\"not\\\\allowed@example.com"
+    };
 
     @SmallTest
     public void testEmailValidator() {
         Rfc822Validator validator = new Rfc822Validator("gmail.com");
-        String[] validEmails = new String[] {
-            "a@b.com", "a@b.fr", "a+b@c.com", "a@b.info", "john@example.com", "john@example.fr",
-            "john@corp.example.com",
-        };
 
-        for (String email : validEmails) {
+        for (String email : VALID_EMAILS) {
             assertTrue(email + " should be a valid email address", validator.isValid(email));
         }
 
-        String[] invalidEmails = new String[] {
-            "a", "a@b", "a b", "a@b.12", "john@example..com", "johnexample.com", "john.example.com"
-        };
-
-        for (String email : invalidEmails) {
+        for (String email : INVALID_EMAILS) {
             assertFalse(email + " should not be a valid email address", validator.isValid(email));
         }
 
diff --git a/framesequence/jni/FrameSequence.cpp b/framesequence/jni/FrameSequence.cpp
index 5c34425..efcfefa 100644
--- a/framesequence/jni/FrameSequence.cpp
+++ b/framesequence/jni/FrameSequence.cpp
@@ -20,5 +20,16 @@
 
 FrameSequence* FrameSequence::create(Stream* stream) {
     const RegistryEntry* entry = Registry::Find(stream);
-    return entry ? entry->createFrameSequence(stream) : 0;
+
+    if (!entry) return NULL;
+
+    FrameSequence* frameSequence = entry->createFrameSequence(stream);
+    if (!frameSequence->getFrameCount() ||
+            !frameSequence->getWidth() || !frameSequence->getHeight()) {
+        // invalid contents, abort
+        delete frameSequence;
+        return NULL;
+    }
+
+    return frameSequence;
 }
diff --git a/framesequence/jni/FrameSequenceJNI.cpp b/framesequence/jni/FrameSequenceJNI.cpp
index efeed7e..08a73bc 100644
--- a/framesequence/jni/FrameSequenceJNI.cpp
+++ b/framesequence/jni/FrameSequenceJNI.cpp
@@ -53,8 +53,7 @@
                 "couldn't read array bytes");
         return NULL;
     }
-    bytes += offset;
-    MemoryStream stream(bytes, length);
+    MemoryStream stream(bytes + offset, length);
     FrameSequence* frameSequence = FrameSequence::create(&stream);
     env->ReleasePrimitiveArrayCritical(byteArray, bytes, 0);
     return createJavaFrameSequence(env, frameSequence);
diff --git a/framesequence/jni/FrameSequence_gif.cpp b/framesequence/jni/FrameSequence_gif.cpp
index 2402439..daa097b 100644
--- a/framesequence/jni/FrameSequence_gif.cpp
+++ b/framesequence/jni/FrameSequence_gif.cpp
@@ -81,14 +81,14 @@
         for (int j = 0; (j + 1) < image.ExtensionBlockCount; j++) {
             ExtensionBlock* eb1 = image.ExtensionBlocks + j;
             ExtensionBlock* eb2 = image.ExtensionBlocks + j + 1;
-            if (eb1->Function == APPLICATION_EXT_FUNC_CODE &&
+            if (eb1->Function == APPLICATION_EXT_FUNC_CODE
                     // look for "NETSCAPE2.0" app extension
-                    eb1->ByteCount == 11 &&
-                    !strcmp((const char*)(eb1->Bytes), "NETSCAPE2.0") &&
+                    && eb1->ByteCount == 11
+                    && !memcmp((const char*)(eb1->Bytes), "NETSCAPE2.0", 11)
                     // verify extension contents and get loop count
-                    eb2->Function == CONTINUE_EXT_FUNC_CODE &&
-                    eb2->ByteCount == 3 &&
-                    eb2->Bytes[0] == 1) {
+                    && eb2->Function == CONTINUE_EXT_FUNC_CODE
+                    && eb2->ByteCount == 3
+                    && eb2->Bytes[0] == 1) {
                 mLoopCount = (int)(eb2->Bytes[2] & 0xff) + (int)(eb2->Bytes[1] & 0xff);
             }
         }
diff --git a/framesequence/samples/RastermillSamples/src/com/android/rastermill/samples/AnimatedGifTest.java b/framesequence/samples/RastermillSamples/src/com/android/rastermill/samples/AnimatedGifTest.java
index ea593dc..2328975 100644
--- a/framesequence/samples/RastermillSamples/src/com/android/rastermill/samples/AnimatedGifTest.java
+++ b/framesequence/samples/RastermillSamples/src/com/android/rastermill/samples/AnimatedGifTest.java
@@ -16,6 +16,7 @@
 package com.android.rastermill.samples;
 
 import android.app.Activity;
+import android.graphics.Bitmap;
 import android.os.Bundle;
 import android.support.rastermill.FrameSequence;
 import android.support.rastermill.FrameSequenceDrawable;
@@ -24,51 +25,96 @@
 import android.widget.Toast;
 
 import java.io.InputStream;
+import java.util.HashSet;
 
 public class AnimatedGifTest extends Activity {
+    FrameSequenceDrawable mDrawable;
+
+    // This provider is entirely unnecessary, just here to validate the acquire/release process
+    private class CheckingProvider implements FrameSequenceDrawable.BitmapProvider {
+        HashSet<Bitmap> mBitmaps = new HashSet<Bitmap>();
+        @Override
+        public Bitmap acquireBitmap(int minWidth, int minHeight) {
+            Bitmap bitmap =
+                    Bitmap.createBitmap(minWidth + 1, minHeight + 4, Bitmap.Config.ARGB_8888);
+            mBitmaps.add(bitmap);
+            return bitmap;
+        }
+
+        @Override
+        public void releaseBitmap(Bitmap bitmap) {
+            if (!mBitmaps.contains(bitmap)) throw new IllegalStateException();
+            mBitmaps.remove(bitmap);
+            bitmap.recycle();
+        }
+
+        public boolean isEmpty() {
+            return mBitmaps.isEmpty();
+        }
+    }
+
+    final CheckingProvider mProvider = new CheckingProvider();
+
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
         setContentView(R.layout.basic_test_activity);
-        ImageView imageView = (ImageView) findViewById(R.id.imageview);
+        findViewById(R.id.start).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                mDrawable.start();
+            }
+        });
+        findViewById(R.id.stop).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                mDrawable.stop();
+            }
+        });
+        findViewById(R.id.vis).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                mDrawable.setVisible(true, true);
+            }
+        });
+        findViewById(R.id.invis).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                mDrawable.setVisible(false, true);
+            }
+        });
+    }
 
+    @Override
+    protected void onResume() {
+        super.onResume();
+
+        ImageView imageView = (ImageView) findViewById(R.id.imageview);
         InputStream is = getResources().openRawResource(R.raw.animated);
 
         FrameSequence fs = FrameSequence.decodeStream(is);
-        final FrameSequenceDrawable drawable = new FrameSequenceDrawable(fs);
-        drawable.setOnFinishedListener(new FrameSequenceDrawable.OnFinishedListener() {
+        mDrawable = new FrameSequenceDrawable(fs, mProvider);
+        mDrawable.setOnFinishedListener(new FrameSequenceDrawable.OnFinishedListener() {
             @Override
             public void onFinished(FrameSequenceDrawable drawable) {
                 Toast.makeText(getApplicationContext(),
                         "THE ANIMATION HAS FINISHED", Toast.LENGTH_SHORT).show();
             }
         });
-        imageView.setImageDrawable(drawable);
+        imageView.setImageDrawable(mDrawable);
+    }
 
-        findViewById(R.id.start).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                drawable.start();
-            }
-        });
-        findViewById(R.id.stop).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                drawable.stop();
-            }
-        });
-        findViewById(R.id.vis).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                drawable.setVisible(true, true);
-            }
-        });
-        findViewById(R.id.invis).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                drawable.setVisible(false, true);
-            }
-        });
+    @Override
+    protected void onPause() {
+        super.onPause();
+        ImageView imageView = (ImageView) findViewById(R.id.imageview);
+
+        mDrawable.destroy();
+        if (!mProvider.isEmpty()) throw new IllegalStateException("All bitmaps not recycled");
+
+        mDrawable = null;
+        imageView.setImageDrawable(null);
+
     }
 }
diff --git a/framesequence/src/android/support/rastermill/FrameSequence.java b/framesequence/src/android/support/rastermill/FrameSequence.java
index d6bde0f..d2bd128 100644
--- a/framesequence/src/android/support/rastermill/FrameSequence.java
+++ b/framesequence/src/android/support/rastermill/FrameSequence.java
@@ -103,7 +103,7 @@
      * information (in the case of gif, a recall buffer) that will be used to construct
      * frames based upon data recorded before previousFrameNr.
      *
-     * Note: {@link #recycle()} *must* be called before the object is GC'd to free native resources
+     * Note: {@link #destroy()} *must* be called before the object is GC'd to free native resources
      *
      * Note: State holds a native ref to its FrameSequence instance, so its FrameSequence should
      * remain ref'd while it is in use
@@ -115,7 +115,7 @@
             mNativeState = nativeState;
         }
 
-        public void recycle() {
+        public void destroy() {
             if (mNativeState != 0) {
                 nativeDestroyState(mNativeState);
                 mNativeState = 0;
@@ -128,11 +128,9 @@
                 throw new IllegalArgumentException("Bitmap passed must be non-null and ARGB_8888");
             }
             if (mNativeState == 0) {
-                throw new IllegalStateException("attempted to draw recycled FrameSequenceState");
+                throw new IllegalStateException("attempted to draw destroyed FrameSequenceState");
             }
             return nativeGetFrame(mNativeState, frameNr, output, previousFrameNr);
         }
     }
-
-    // TODO: add recycle() cleanup method
 }
diff --git a/framesequence/src/android/support/rastermill/FrameSequenceDrawable.java b/framesequence/src/android/support/rastermill/FrameSequenceDrawable.java
index f5f1f47..cda0cfe 100644
--- a/framesequence/src/android/support/rastermill/FrameSequenceDrawable.java
+++ b/framesequence/src/android/support/rastermill/FrameSequenceDrawable.java
@@ -26,6 +26,7 @@
 import android.graphics.drawable.Drawable;
 import android.os.Handler;
 import android.os.HandlerThread;
+import android.os.Process;
 import android.os.SystemClock;
 
 public class FrameSequenceDrawable extends Drawable implements Animatable, Runnable {
@@ -36,7 +37,8 @@
         synchronized (sLock) {
             if (sDecodingThread != null) return;
 
-            sDecodingThread = new HandlerThread("FrameSequence decoding thread");
+            sDecodingThread = new HandlerThread("FrameSequence decoding thread",
+                    Process.THREAD_PRIORITY_BACKGROUND);
             sDecodingThread.start();
             sDecodingThreadHandler = new Handler(sDecodingThread.getLooper());
         }
@@ -52,10 +54,37 @@
         public abstract void onFinished(FrameSequenceDrawable drawable);
     }
 
+    public static interface BitmapProvider {
+        /**
+         * Called by FrameSequenceDrawable to aquire an 8888 Bitmap with minimum dimensions.
+         */
+        public abstract Bitmap acquireBitmap(int minWidth, int minHeight);
+
+        /**
+         * Called by FrameSequenceDrawable to release a Bitmap it no longer needs. The Bitmap
+         * will no longer be used at all by the drawable, so it is safe to reuse elsewhere.
+         *
+         * This method may be called by FrameSequenceDrawable on any thread.
+         */
+        public abstract void releaseBitmap(Bitmap bitmap);
+    }
+
+    private static BitmapProvider sAllocatingBitmapProvider = new BitmapProvider() {
+        @Override
+        public Bitmap acquireBitmap(int minWidth, int minHeight) {
+            return Bitmap.createBitmap(minWidth, minHeight, Bitmap.Config.ARGB_8888);
+        }
+
+        @Override
+        public void releaseBitmap(Bitmap bitmap) {
+            bitmap.recycle();
+        }
+    };
+
     /**
      * Register a callback to be invoked when a FrameSequenceDrawable finishes looping.
      *
-     * @see setLoopBehavior()
+     * @see #setLoopBehavior(int)
      */
     public void setOnFinishedListener(OnFinishedListener onFinishedListener) {
         mOnFinishedListener = onFinishedListener;
@@ -94,6 +123,8 @@
     //Protects the fields below
     private final Object mLock = new Object();
 
+    private final BitmapProvider mBitmapProvider;
+    private boolean mDestroyed = false;
     private Bitmap mFrontBitmap;
     private Bitmap mBackBitmap;
 
@@ -107,6 +138,7 @@
     private int mLoopBehavior = LOOP_DEFAULT;
 
     private long mLastSwap;
+    private long mNextSwap;
     private int mNextFrameToDecode;
     private OnFinishedListener mOnFinishedListener;
 
@@ -119,6 +151,8 @@
             int nextFrame;
             Bitmap bitmap;
             synchronized (mLock) {
+                if (mDestroyed) return;
+
                 nextFrame = mNextFrameToDecode;
                 if (nextFrame < 0) {
                     return;
@@ -131,11 +165,11 @@
 
             synchronized (mLock) {
                 if (mNextFrameToDecode < 0 || mState != STATE_DECODING) return;
-                invalidateTimeMs += mLastSwap;
+                mNextSwap = invalidateTimeMs + mLastSwap;
 
                 mState = STATE_WAITING_TO_SWAP;
             }
-            scheduleSelf(FrameSequenceDrawable.this, invalidateTimeMs);
+            scheduleSelf(FrameSequenceDrawable.this, mNextSwap);
         }
     };
 
@@ -148,17 +182,34 @@
         }
     };
 
+    private static Bitmap acquireAndValidateBitmap(BitmapProvider bitmapProvider,
+            int minWidth, int minHeight) {
+        Bitmap bitmap = bitmapProvider.acquireBitmap(minWidth, minHeight);
+
+        if (bitmap.getWidth() < minWidth
+                || bitmap.getHeight() < minHeight
+                || bitmap.getConfig() != Bitmap.Config.ARGB_8888) {
+            throw new IllegalArgumentException("Invalid bitmap provided");
+        }
+
+        return bitmap;
+    }
+
     public FrameSequenceDrawable(FrameSequence frameSequence) {
-        if (frameSequence == null) throw new IllegalArgumentException();
+        this(frameSequence, sAllocatingBitmapProvider);
+    }
+
+    public FrameSequenceDrawable(FrameSequence frameSequence, BitmapProvider bitmapProvider) {
+        if (frameSequence == null || bitmapProvider == null) throw new IllegalArgumentException();
 
         mFrameSequence = frameSequence;
         mFrameSequenceState = frameSequence.createState();
-        // TODO: add callback for requesting bitmaps, to allow for reuse
         final int width = frameSequence.getWidth();
         final int height = frameSequence.getHeight();
 
-        mFrontBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
-        mBackBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
+        mBitmapProvider = bitmapProvider;
+        mFrontBitmap = acquireAndValidateBitmap(bitmapProvider, width, height);
+        mBackBitmap = acquireAndValidateBitmap(bitmapProvider, width, height);
         mSrcRect = new Rect(0, 0, width, height);
         mPaint = new Paint();
         mPaint.setFilterBitmap(true);
@@ -170,12 +221,58 @@
         initializeDecodingThread();
     }
 
+    private void checkDestroyedLocked() {
+        if (mDestroyed) {
+            throw new IllegalStateException("Cannot perform operation on recycled drawable");
+        }
+    }
+
+    public boolean isDestroyed() {
+        synchronized (mLock) {
+            return mDestroyed;
+        }
+    }
+
+    /**
+     * Marks the drawable as permanently recycled (and thus unusable), and releases any owned
+     * Bitmaps drawable to its BitmapProvider, if attached.
+     *
+     * If no BitmapProvider is attached to the drawable, recycle() is called on the Bitmaps.
+     */
+    public void destroy() {
+        destroy(mBitmapProvider);
+    }
+
+    private void destroy(BitmapProvider bitmapProvider) {
+        if (bitmapProvider == null) {
+            throw new IllegalStateException("BitmapProvider must be non-null");
+        }
+
+        Bitmap bitmapToReleaseA;
+        Bitmap bitmapToReleaseB;
+        synchronized (mLock) {
+            checkDestroyedLocked();
+
+            bitmapToReleaseA = mFrontBitmap;
+            bitmapToReleaseB = mBackBitmap;
+
+            mFrontBitmap = null;
+            mBackBitmap = null;
+            mDestroyed = true;
+        }
+
+        // For simplicity and safety, we don't destroy the state object here
+        bitmapProvider.releaseBitmap(bitmapToReleaseA);
+        bitmapProvider.releaseBitmap(bitmapToReleaseB);
+    }
+
     @Override
     protected void finalize() throws Throwable {
         try {
-            mFrontBitmap.recycle();
-            mBackBitmap.recycle();
-            mFrameSequenceState.recycle();
+            mFrameSequenceState.destroy();
+            if (!mDestroyed) {
+                destroy();
+            }
         } finally {
             super.finalize();
         }
@@ -184,6 +281,15 @@
     @Override
     public void draw(Canvas canvas) {
         synchronized (mLock) {
+            checkDestroyedLocked();
+            if (mState == STATE_WAITING_TO_SWAP) {
+                // may have failed to schedule mark ready runnable,
+                // so go ahead and swap if swapping is due
+                if (mNextSwap - SystemClock.uptimeMillis() <= 0) {
+                    mState = STATE_READY_TO_SWAP;
+                }
+            }
+
             if (isRunning() && mState == STATE_READY_TO_SWAP) {
                 // Because draw has occurred, the view system is guaranteed to no longer hold a
                 // reference to the old mFrontBitmap, so we now use it to produce the next frame
@@ -197,7 +303,7 @@
                 if (mNextFrameToDecode == mFrameSequence.getFrameCount() - 1) {
                     mCurrentLoop++;
                     if ((mLoopBehavior == LOOP_ONCE && mCurrentLoop == 1) ||
-                        (mLoopBehavior == LOOP_DEFAULT && mCurrentLoop == mFrameSequence.getDefaultLoopCount())) {
+                            (mLoopBehavior == LOOP_DEFAULT && mCurrentLoop == mFrameSequence.getDefaultLoopCount())) {
                         continueLooping = false;
                     }
                 }
@@ -233,6 +339,7 @@
     public void start() {
         if (!isRunning()) {
             synchronized (mLock) {
+                checkDestroyedLocked();
                 if (mState == STATE_SCHEDULED) return; // already scheduled
                 mCurrentLoop = 0;
                 scheduleDecodeLocked();
@@ -250,16 +357,11 @@
     @Override
     public boolean isRunning() {
         synchronized (mLock) {
-            return mNextFrameToDecode > -1;
+            return mNextFrameToDecode > -1 && !mDestroyed;
         }
     }
 
     @Override
-    public void scheduleSelf(Runnable what, long when) {
-        super.scheduleSelf(what, when);
-    }
-
-    @Override
     public void unscheduleSelf(Runnable what) {
         synchronized (mLock) {
             mNextFrameToDecode = -1;
diff --git a/variablespeed/jni/Android.mk b/variablespeed/jni/Android.mk
index 08de535..0a7818a 100644
--- a/variablespeed/jni/Android.mk
+++ b/variablespeed/jni/Android.mk
@@ -46,9 +46,4 @@
     libcutils \
     liblog \
 
-LOCAL_LDLIBS := \
-    -lOpenSLES \
-    -llog \
-    -landroid \
-
 include $(BUILD_SHARED_LIBRARY)
diff --git a/variablespeed/jni/jni_entry.cc b/variablespeed/jni/jni_entry.cc
index 368d230..93c12ba 100644
--- a/variablespeed/jni/jni_entry.cc
+++ b/variablespeed/jni/jni_entry.cc
@@ -39,7 +39,7 @@
 };
 
 extern "C" {
-JNI_METHOD(playFileDescriptor, void) (JNIEnv*, jclass, int fd, jlong offset,
+JNI_METHOD(playFileDescriptor, void) (JNIEnv*, jclass, jint fd, jlong offset,
     jlong length) {
   MethodLog _("playFileDescriptor");
   AudioEngine::GetEngine()->PlayFileDescriptor(fd, offset, length);
@@ -52,7 +52,7 @@
   AudioEngine::GetEngine()->PlayUri(utf8);
 }
 
-JNI_METHOD(setVariableSpeed, void) (JNIEnv*, jclass, float speed) {
+JNI_METHOD(setVariableSpeed, void) (JNIEnv*, jclass, jfloat speed) {
   MethodLog _("setVariableSpeed");
   AudioEngine::GetEngine()->SetVariableSpeed(speed);
 }
@@ -67,19 +67,19 @@
   AudioEngine::GetEngine()->RequestStop();
 }
 
-JNI_METHOD(getCurrentPosition, int) (JNIEnv*, jclass) {
+JNI_METHOD(getCurrentPosition, jint) (JNIEnv*, jclass) {
   return AudioEngine::GetEngine()->GetCurrentPosition();
 }
 
-JNI_METHOD(getTotalDuration, int) (JNIEnv*, jclass) {
+JNI_METHOD(getTotalDuration, jint) (JNIEnv*, jclass) {
   return AudioEngine::GetEngine()->GetTotalDuration();
 }
 
 JNI_METHOD(initializeEngine, void) (JNIEnv*, jclass,
-    int targetFrames, float windowDuration,
-    float windowOverlapDuration, size_t maxPlayBufferCount,
-    float initialRate, size_t decodeInitialSize, size_t decodeMaxSize,
-    size_t startPositionMillis, int audioStreamType) {
+    jint targetFrames, jfloat windowDuration,
+    jfloat windowOverlapDuration, jint maxPlayBufferCount,
+    jfloat initialRate, jint decodeInitialSize, jint decodeMaxSize,
+    jint startPositionMillis, jint audioStreamType) {
   MethodLog _("initializeEngine");
   AudioEngine::SetEngine(new AudioEngine(targetFrames,
       windowDuration, windowOverlapDuration, maxPlayBufferCount, initialRate,
diff --git a/variablespeed/jni/variablespeed.cc b/variablespeed/jni/variablespeed.cc
index 73ac609..b5d9067 100644
--- a/variablespeed/jni/variablespeed.cc
+++ b/variablespeed/jni/variablespeed.cc
@@ -564,7 +564,7 @@
 }
 
 static void CreateAndRealizeAudioPlayer(SLuint32 slSampleRate,
-    size_t channelCount, SLuint32 slChannels, SLint32 audioStreamType, SLObjectItf &outputMix,
+    SLuint32 channelCount, SLuint32 slChannels, SLint32 audioStreamType, SLObjectItf &outputMix,
     SLObjectItf &audioPlayer, SLEngineItf &engineInterface) {
   // Define the source and sink for the audio player: comes from a buffer queue
   // and goes to the output mix.
diff --git a/variablespeed/jni/variablespeed.h b/variablespeed/jni/variablespeed.h
index 07cba0f..cf856da 100644
--- a/variablespeed/jni/variablespeed.h
+++ b/variablespeed/jni/variablespeed.h
@@ -86,7 +86,7 @@
   bool HasSampleRateAndChannels();
   SLuint32 GetSLSampleRate();
   SLuint32 GetSLChannels();
-  size_t GetChannelCount();
+  SLuint32 GetChannelCount();
 
   // The single global audio engine instance.
   static AudioEngine* audioEngine_;