auto import from //depot/cupcake/@135843
diff --git a/Android.mk b/Android.mk
deleted file mode 100644
index 0dbc2bb..0000000
--- a/Android.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2007-2008 The Android Open Source Project
-
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE_TAGS := eng development
-
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
-
-LOCAL_PACKAGE_NAME := Mms
-
-include $(BUILD_PACKAGE)
-
-# This finds and builds the test apk as well, so a single make does both.
-include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
deleted file mode 100644
index dc37ece..0000000
--- a/AndroidManifest.xml
+++ /dev/null
@@ -1,246 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-        package="com.android.mms">
-
-    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
-    <uses-permission android:name="android.permission.CALL_PHONE" />
-    <uses-permission android:name="android.permission.READ_CONTACTS" />
-    <uses-permission android:name="android.permission.WRITE_CONTACTS" />
-    <uses-permission android:name="android.permission.RECEIVE_SMS" />
-    <uses-permission android:name="android.permission.RECEIVE_MMS" />
-    <uses-permission android:name="android.permission.SEND_SMS" />
-    <uses-permission android:name="android.permission.VIBRATE" />
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.READ_SMS"/>
-    <uses-permission android:name="android.permission.WRITE_SMS"/>
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-    <uses-permission android:name="android.permission.WAKE_LOCK" />
-
-    <application android:name="MmsApp"
-            android:label="@string/app_label"
-            android:icon="@drawable/ic_launcher_smsmms"
-            android:taskAffinity="android.task.mms"
-            android:allowTaskReparenting="true">
-
-        <service android:name=".transaction.TransactionService"
-                 android:exported="true" />
-
-        <service android:name=".transaction.SmsReceiverService" 
-                 android:exported="true" />
-
-        <activity android:name=".ui.ConversationList"
-                  android:label="@string/app_label"
-                  android:configChanges="orientation|keyboardHidden"
-                  android:launchMode="singleTop">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:mimeType="vnd.android.cursor.dir/mms" />
-            </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:mimeType="vnd.android-dir/mms-sms" />
-            </intent-filter>
-        </activity>
-
-        <activity android:name=".ui.SelectContactMethodActivity"
-            android:label="Select Contact Method"
-            android:theme="@android:style/Theme.Dialog">
-        </activity>
-
-        <activity android:name=".ui.ComposeMessageActivity"
-                  android:configChanges="orientation|keyboardHidden"
-                  android:windowSoftInputMode="stateHidden">
-            <intent-filter>
-                <action android:name="android.intent.action.VIEW" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <data android:mimeType="vnd.android-dir/mms-sms" />
-            </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.VIEW" />
-                <action android:name="android.intent.action.SENDTO" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.BROWSABLE" />
-                <data android:scheme="sms" />
-                <data android:scheme="smsto" />
-            </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.VIEW" />
-                <action android:name="android.intent.action.SENDTO" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.BROWSABLE" />
-                <data android:scheme="mms" />
-                <data android:scheme="mmsto" />
-            </intent-filter>
-           <intent-filter>
-               <action android:name="android.intent.action.SEND" />
-               <category android:name="android.intent.category.DEFAULT" />
-               <data android:mimeType="image/*" />
-           </intent-filter>
-           <intent-filter>
-               <action android:name="android.intent.action.SEND" />
-               <category android:name="android.intent.category.DEFAULT" />
-               <data android:mimeType="video/*" />
-           </intent-filter>
-           <intent-filter>
-               <action android:name="android.intent.action.SEND" />
-               <category android:name="android.intent.category.DEFAULT" />
-               <data android:mimeType="text/plain" />
-           </intent-filter>
-        </activity>
-
-        <activity android:name=".ui.DeliveryReportActivity"
-            android:label="Delivery report"
-            android:theme="@android:style/Theme.Dialog">
-        </activity>
-
-        <activity android:name=".ui.AddAttachmentActivity"
-            android:label="Add attachment:"
-            android:theme="@android:style/Theme.Dialog">
-        </activity>
-
-        <activity android:name=".ui.LayoutModeSelectorActivity"
-            android:label="Select layout"
-            android:theme="@android:style/Theme.Dialog">
-        </activity>
-
-        <activity android:name=".ui.EditSlideDurationActivity"
-            android:label="Change duration"
-            android:theme="@android:style/Theme.Dialog">
-        </activity>
-
-        <activity android:name=".ui.EditSlideTextActivity"
-            android:label="Edit text"
-            android:theme="@android:style/Theme.Dialog" />
-
-        <activity android:name=".ui.SlideshowEditActivity"
-            android:label="Edit slideshow" />
-
-        <activity android:name=".ui.SlideEditorActivity"
-            android:label="Edit slide" />
-
-        <activity android:name=".ui.RecipientsPicker"
-            android:label="Pick Numbers" />
-
-        <activity android:name=".ui.SlideshowActivity"
-            android:label="Slideshow">
-        </activity>
-
-        <activity android:name=".ui.ClassZeroActivity"
-            android:label="Class 0 Message"
-            android:theme="@android:style/Theme.Dialog">
-        </activity>
-
-        <activity android:name=".ui.MessagingPreferenceActivity"
-            android:label="@string/preferences_title" />
-
-        <receiver android:name=".transaction.PushReceiver"
-            android:permission="android.permission.BROADCAST_WAP_PUSH">
-            <intent-filter>
-                <action android:name="android.provider.Telephony.WAP_PUSH_RECEIVED" />
-                <data android:mimeType="application/vnd.wap.mms-message" />
-            </intent-filter>
-        </receiver>
-
-        <receiver android:name=".transaction.MmsSystemEventReceiver">
-            <intent-filter>
-                <action android:name="android.intent.action.CONTENT_CHANGED" />
-            </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.BOOT_COMPLETED" />
-            </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.ANY_DATA_STATE" />
-            </intent-filter>
-        </receiver>
-
-        <activity android:name="AttachImage"
-            android:label="Send using MMS\u2026"
-            android:taskAffinity="">
-            <intent-filter>
-                <action android:name="com.android.mms.action.ATTACH_IMAGE" />
-                <data android:mimeType="image/*" />
-                <category android:name="android.intent.category.DEFAULT" />
-                <category android:name="android.intent.category.ALTERNATIVE" />
-                <category android:name="android.intent.category.SELECTED_ALTERNATIVE" />
-            </intent-filter>
-        </activity>
-
-        <activity android:name=".ui.ManageSimMessages"
-                  android:launchMode="singleTop"
-                  android:label="@string/sim_manage_messages_title">
-            <intent-filter>
-                <action android:name="android.intent.action.VIEW" />
-            </intent-filter>
-        </activity>
-
-        <!-- Require sender permissions to prevent SMS spoofing -->
-        <receiver android:name=".transaction.PrivilegedSmsReceiver"
-            android:permission="android.permission.BROADCAST_SMS">
-            <intent-filter>
-                <action android:name="android.provider.Telephony.SMS_RECEIVED" />
-            </intent-filter>
-        </receiver>
-        
-        <!-- Catch-all receiver for broadcasts that don't have associated security -->
-        <receiver android:name=".transaction.SmsReceiver">
-            <intent-filter>
-                <action android:name="android.intent.action.BOOT_COMPLETED" />
-            </intent-filter>
-            <intent-filter>
-                <action android:name="android.intent.action.SERVICE_STATE" />
-            </intent-filter>
-            <intent-filter>                
-                <action android:name="com.android.mms.transaction.MESSAGE_SENT" />
-                <!-- TODO Do a better data match here. -->
-                <data android:scheme="content" />
-            </intent-filter>
-        </receiver>
-
-        <receiver android:name=".transaction.MessageStatusReceiver">
-            <intent-filter>
-                <action android:name="com.android.mms.transaction.MessageStatusReceiver.MESSAGE_STATUS_RECEIVED" />
-            </intent-filter>
-        </receiver>
-
-        <receiver android:name=".transaction.SimFullReceiver">
-            <intent-filter>
-                <action android:name="android.provider.Telephony.SIM_FULL" />
-            </intent-filter>
-        </receiver>
-
-        <activity android:name=".ui.ConfirmRateLimitActivity"
-                  android:theme="@android:style/Theme.Dialog">
-            <intent-filter>
-                <action android:name="com.android.mms.RATE_LIMIT_SURPASSED" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
-        </activity>
-    </application>
-</manifest>
diff --git a/MODULE_LICENSE_APACHE2 b/MODULE_LICENSE_APACHE2
deleted file mode 100644
index e69de29..0000000
--- a/MODULE_LICENSE_APACHE2
+++ /dev/null
diff --git a/NOTICE b/NOTICE
deleted file mode 100644
index c5b1efa..0000000
--- a/NOTICE
+++ /dev/null
@@ -1,190 +0,0 @@
-
-   Copyright (c) 2005-2008, 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.
-
-   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.
-
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
diff --git a/res/drawable/attachment_editor_bg.9.png b/res/drawable/attachment_editor_bg.9.png
deleted file mode 100644
index 876c72c..0000000
--- a/res/drawable/attachment_editor_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/bottombar_landscape_565.png b/res/drawable/bottombar_landscape_565.png
deleted file mode 100644
index 6121856..0000000
--- a/res/drawable/bottombar_landscape_565.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/chat_history_selector.xml b/res/drawable/chat_history_selector.xml
deleted file mode 100644
index 632da9b..0000000
--- a/res/drawable/chat_history_selector.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2008 Google Inc.
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item
-        android:state_focused="true"
-        android:state_pressed="false"
-        android:drawable="@drawable/textfield_im_user_selected_pad" />
-        
-    <item
-        android:state_focused="true"
-        android:state_pressed="true"
-        android:drawable="@drawable/textfield_im_user_pressed_pad" />
-</selector>
diff --git a/res/drawable/ic_dialog_attach.png b/res/drawable/ic_dialog_attach.png
deleted file mode 100755
index 7f69841..0000000
--- a/res/drawable/ic_dialog_attach.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_dialog_email_pending.png b/res/drawable/ic_dialog_email_pending.png
deleted file mode 100644
index 19228ce..0000000
--- a/res/drawable/ic_dialog_email_pending.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_email_pending.png b/res/drawable/ic_email_pending.png
deleted file mode 100644
index e0b64ad..0000000
--- a/res/drawable/ic_email_pending.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_gallery_video_overlay.png b/res/drawable/ic_gallery_video_overlay.png
deleted file mode 100644
index ae263a7..0000000
--- a/res/drawable/ic_gallery_video_overlay.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_launcher_camera.png b/res/drawable/ic_launcher_camera.png
deleted file mode 100755
index 9bb4c61..0000000
--- a/res/drawable/ic_launcher_camera.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_launcher_camera_record.png b/res/drawable/ic_launcher_camera_record.png
deleted file mode 100755
index 8f791ac..0000000
--- a/res/drawable/ic_launcher_camera_record.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_launcher_gallery.png b/res/drawable/ic_launcher_gallery.png
deleted file mode 100644
index 965fb71..0000000
--- a/res/drawable/ic_launcher_gallery.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_launcher_musicplayer_2.png b/res/drawable/ic_launcher_musicplayer_2.png
deleted file mode 100644
index 0353b91..0000000
--- a/res/drawable/ic_launcher_musicplayer_2.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_launcher_record_audio.png b/res/drawable/ic_launcher_record_audio.png
deleted file mode 100644
index b4cafff..0000000
--- a/res/drawable/ic_launcher_record_audio.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_launcher_slideshow_add_sms.png b/res/drawable/ic_launcher_slideshow_add_sms.png
deleted file mode 100644
index e2600c5..0000000
--- a/res/drawable/ic_launcher_slideshow_add_sms.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_launcher_slideshow_default_sms.png b/res/drawable/ic_launcher_slideshow_default_sms.png
deleted file mode 100755
index e0aa671..0000000
--- a/res/drawable/ic_launcher_slideshow_default_sms.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_launcher_smsmms.png b/res/drawable/ic_launcher_smsmms.png
deleted file mode 100644
index e2ac784..0000000
--- a/res/drawable/ic_launcher_smsmms.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_launcher_video_player.png b/res/drawable/ic_launcher_video_player.png
deleted file mode 100644
index a9177d6..0000000
--- a/res/drawable/ic_launcher_video_player.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_maps_back.png b/res/drawable/ic_maps_back.png
deleted file mode 100644
index 7bb68c0..0000000
--- a/res/drawable/ic_maps_back.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_maps_next.png b/res/drawable/ic_maps_next.png
deleted file mode 100644
index 8f56b4e..0000000
--- a/res/drawable/ic_maps_next.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_add_slide.png b/res/drawable/ic_menu_add_slide.png
deleted file mode 100644
index a89179b..0000000
--- a/res/drawable/ic_menu_add_slide.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_add_sound.png b/res/drawable/ic_menu_add_sound.png
deleted file mode 100644
index 5dd27e7..0000000
--- a/res/drawable/ic_menu_add_sound.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_delete_played.png b/res/drawable/ic_menu_delete_played.png
deleted file mode 100644
index 45c6459..0000000
--- a/res/drawable/ic_menu_delete_played.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_duration.png b/res/drawable/ic_menu_duration.png
deleted file mode 100644
index 9bdcb33..0000000
--- a/res/drawable/ic_menu_duration.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_move_down.png b/res/drawable/ic_menu_move_down.png
deleted file mode 100644
index 2fcb5ad..0000000
--- a/res/drawable/ic_menu_move_down.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_move_up.png b/res/drawable/ic_menu_move_up.png
deleted file mode 100644
index 006933b..0000000
--- a/res/drawable/ic_menu_move_up.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_movie.png b/res/drawable/ic_menu_movie.png
deleted file mode 100644
index 35d260b..0000000
--- a/res/drawable/ic_menu_movie.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_picture.png b/res/drawable/ic_menu_picture.png
deleted file mode 100644
index 27cb890..0000000
--- a/res/drawable/ic_menu_picture.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_remove_picture.png b/res/drawable/ic_menu_remove_picture.png
deleted file mode 100644
index e81bf30..0000000
--- a/res/drawable/ic_menu_remove_picture.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_remove_sound.png b/res/drawable/ic_menu_remove_sound.png
deleted file mode 100644
index 612edf6..0000000
--- a/res/drawable/ic_menu_remove_sound.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_remove_text.png b/res/drawable/ic_menu_remove_text.png
deleted file mode 100644
index 50449ff..0000000
--- a/res/drawable/ic_menu_remove_text.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_menu_undelivered.png b/res/drawable/ic_menu_undelivered.png
deleted file mode 100644
index d3d58a7..0000000
--- a/res/drawable/ic_menu_undelivered.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_mms_drm_protected.png b/res/drawable/ic_mms_drm_protected.png
deleted file mode 100755
index 53e23c6..0000000
--- a/res/drawable/ic_mms_drm_protected.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_mms_duration.png b/res/drawable/ic_mms_duration.png
deleted file mode 100644
index 749c920..0000000
--- a/res/drawable/ic_mms_duration.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_mms_layout.png b/res/drawable/ic_mms_layout.png
deleted file mode 100644
index 5d05d50..0000000
--- a/res/drawable/ic_mms_layout.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_mms_message_details.png b/res/drawable/ic_mms_message_details.png
deleted file mode 100644
index 53dd86b..0000000
--- a/res/drawable/ic_mms_message_details.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_mms_music.png b/res/drawable/ic_mms_music.png
deleted file mode 100644
index 269b697..0000000
--- a/res/drawable/ic_mms_music.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_mms_text_bottom.png b/res/drawable/ic_mms_text_bottom.png
deleted file mode 100644
index 2f15d90..0000000
--- a/res/drawable/ic_mms_text_bottom.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_mms_text_top.png b/res/drawable/ic_mms_text_top.png
deleted file mode 100644
index a650c3d..0000000
--- a/res/drawable/ic_mms_text_top.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_sms_mms_delivered.png b/res/drawable/ic_sms_mms_delivered.png
deleted file mode 100644
index 3e32ffe..0000000
--- a/res/drawable/ic_sms_mms_delivered.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_sms_mms_not_delivered.png b/res/drawable/ic_sms_mms_not_delivered.png
deleted file mode 100644
index 480b709..0000000
--- a/res/drawable/ic_sms_mms_not_delivered.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_sms_mms_pending.png b/res/drawable/ic_sms_mms_pending.png
deleted file mode 100644
index 1bb9867..0000000
--- a/res/drawable/ic_sms_mms_pending.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/ic_sms_unread_msg_indicator.png b/res/drawable/ic_sms_unread_msg_indicator.png
deleted file mode 100644
index 473948b..0000000
--- a/res/drawable/ic_sms_unread_msg_indicator.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/listitem_background.xml b/res/drawable/listitem_background.xml
deleted file mode 100644
index 7febe52..0000000
--- a/res/drawable/listitem_background.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_selected="true"
-        android:drawable="@android:color/transparent" />
-    <item android:state_pressed="true" android:state_selected="false"
-        android:drawable="@android:color/transparent" />
-    <item android:state_selected="false"
-          android:drawable="@android:color/white" />
-</selector>
diff --git a/res/drawable/listitem_background_lightblue.xml b/res/drawable/listitem_background_lightblue.xml
deleted file mode 100644
index 3e753fb..0000000
--- a/res/drawable/listitem_background_lightblue.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 The Android Open Source Project
-
-     Licensed under the Apache License, Version 2.0 (the "License");
-     you may not use this file except in compliance with the License.
-     You may obtain a copy of the License at
-  
-          http://www.apache.org/licenses/LICENSE-2.0
-  
-     Unless required by applicable law or agreed to in writing, software
-     distributed under the License is distributed on an "AS IS" BASIS,
-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     See the License for the specific language governing permissions and
-     limitations under the License.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_selected="true"
-        android:drawable="@android:color/transparent" />
-    <item android:state_pressed="true" android:state_selected="false"
-        android:drawable="@android:color/transparent" />
-    <item android:state_selected="false"
-          android:drawable="@drawable/light_blue_background" />
-</selector>
diff --git a/res/drawable/mms_play_btn.png b/res/drawable/mms_play_btn.png
deleted file mode 100644
index b4d1538..0000000
--- a/res/drawable/mms_play_btn.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/movie.png b/res/drawable/movie.png
deleted file mode 100644
index b3bb57b..0000000
--- a/res/drawable/movie.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/stat_notify_mms.png b/res/drawable/stat_notify_mms.png
deleted file mode 100644
index b437d5b..0000000
--- a/res/drawable/stat_notify_mms.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/stat_notify_mms_failed.png b/res/drawable/stat_notify_mms_failed.png
deleted file mode 100644
index 84f365e..0000000
--- a/res/drawable/stat_notify_mms_failed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/stat_notify_sms.png b/res/drawable/stat_notify_sms.png
deleted file mode 100644
index b437d5b..0000000
--- a/res/drawable/stat_notify_sms.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/stat_notify_sms_failed.png b/res/drawable/stat_notify_sms_failed.png
deleted file mode 100644
index 84f365e..0000000
--- a/res/drawable/stat_notify_sms_failed.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/stat_sys_no_sim.png b/res/drawable/stat_sys_no_sim.png
deleted file mode 100644
index 2134d49..0000000
--- a/res/drawable/stat_sys_no_sim.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/textfield_im_user_pressed_pad.9.png b/res/drawable/textfield_im_user_pressed_pad.9.png
deleted file mode 100644
index d694685..0000000
--- a/res/drawable/textfield_im_user_pressed_pad.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/textfield_im_user_selected_pad.9.png b/res/drawable/textfield_im_user_selected_pad.9.png
deleted file mode 100644
index 991a4c7..0000000
--- a/res/drawable/textfield_im_user_selected_pad.9.png
+++ /dev/null
Binary files differ
diff --git a/res/layout-finger/recipient_filter_item.xml b/res/layout-finger/recipient_filter_item.xml
deleted file mode 100644
index 3faa506..0000000
--- a/res/layout-finger/recipient_filter_item.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    style="?android:attr/dropDownItemStyle"
-    android:orientation="vertical"
-    android:layout_width="fill_parent"
-    android:layout_height="?android:attr/listPreferredItemHeight">
-
-    <LinearLayout android:id="@+id/name_and_label"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal">
-
-        <TextView android:id="@+id/name"
-            style="?android:attr/dropDownItemStyle"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:singleLine="true"
-        />
-
-        <TextView android:id="@+id/label"
-            style="?android:attr/dropDownItemStyle"
-            android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:layout_marginLeft="10dip"
-            android:textColor="?android:attr/textColorSecondary"
-            android:singleLine="true"
-        />
-    </LinearLayout>
-
-    <TextView android:id="@+id/number"
-        style="?android:attr/dropDownItemStyle"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:singleLine="true"
-    />
-
-</LinearLayout>
diff --git a/res/layout/audio_attachment_view.xml b/res/layout/audio_attachment_view.xml
deleted file mode 100644
index 01e8f8c..0000000
--- a/res/layout/audio_attachment_view.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
- * Copyright (C) 2006-2008 Esmertec AG.
- * Copyright (C) 2006-2008 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.
- */
--->
-
-<com.android.mms.ui.AudioAttachmentView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/audio_attachment_view"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:gravity="center_vertical"
-    android:paddingRight="5dip"
-    android:background="@drawable/attachment_editor_bg">
-
-    <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        android:gravity="center_horizontal"
-        android:layout_weight="1">
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:paddingBottom="10dip"
-            android:src="@drawable/ic_launcher_record_audio" />
-
-        <TextView
-            android:id="@+id/audio_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content" />
-
-        <TextView
-            android:id="@+id/album_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content" />
-
-        <TextView
-            android:id="@+id/artist_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content" />
-
-        <TextView
-            android:id="@+id/audio_error_msg"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textColor="@drawable/text_color_red"
-            android:visibility="gone" />
-
-    </LinearLayout>
-
-    <LinearLayout
-        android:orientation="vertical"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content">
-
-        <Button
-            android:id="@+id/play_audio_button"
-            style="?android:attr/buttonStyleSmall"
-            android:layout_width="100dip"
-            android:layout_height="50dip"
-            android:text="@string/play" />
-
-        <Button
-            android:id="@+id/replace_audio_button"
-            style="?android:attr/buttonStyleSmall"
-            android:layout_width="100dip"
-            android:layout_height="50dip"
-            android:text="@string/replace" />
-
-        <Button
-            android:id="@+id/remove_audio_button"
-            style="?android:attr/buttonStyleSmall"
-            android:layout_width="100dip"
-            android:layout_height="50dip"
-            android:text="@string/remove" />
-
-    </LinearLayout>
-</com.android.mms.ui.AudioAttachmentView>
diff --git a/res/layout/compose_message_activity.xml b/res/layout/compose_message_activity.xml
deleted file mode 100644
index 06e85ae..0000000
--- a/res/layout/compose_message_activity.xml
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:orientation="vertical">
-
-    <LinearLayout
-        android:id="@+id/recipients_subject_linear"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:paddingTop="5dip"
-        android:paddingBottom="5dip"
-        android:paddingLeft="5dip"
-        android:paddingRight="5dip"
-        android:background="@drawable/white_background"
-        android:orientation="vertical"
-        android:visibility="gone">
-
-        <ViewStub android:id="@+id/recipients_editor_stub"
-            android:layout="@layout/recipients_editor"
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-        />
-
-        <EditText android:id="@+id/subject"
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:capitalize="sentences"
-            android:autoText="true"
-            android:singleLine="true"
-            android:hint="@string/subject_hint"
-            android:visibility="gone"/>
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
-        android:orientation="vertical"
-        android:background="@drawable/white_background"
-        android:gravity="bottom">
-
-        <view class="com.android.mms.ui.MessageListView"
-            android:id="@+id/history"
-            android:layout_width="fill_parent"
-            android:layout_height="fill_parent"
-            android:layout_weight="1.0"
-            android:listSelector="@drawable/chat_history_selector"
-            android:divider="@android:drawable/divider_horizontal_bright"
-            android:drawSelectorOnTop="true"
-            android:transcriptMode="alwaysScroll"
-            android:scrollbarAlwaysDrawVerticalTrack="true"
-            android:scrollbarStyle="insideInset"
-            android:stackFromBottom="true"
-            android:visibility="gone"
-            android:fadingEdge="none"
-            android:layout_marginBottom="1dip"
-            android:cacheColorHint="@android:color/white"
-        />
-    
-        <ScrollView
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content">
-
-            <LinearLayout
-                android:layout_width="fill_parent"
-                android:layout_height="fill_parent"
-                android:orientation="vertical">
-
-                <LinearLayout
-                    android:id="@+id/attachment_editor"
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:orientation="vertical">
-
-                    <ViewStub android:id="@+id/image_attachment_view_stub"
-                        android:layout="@layout/image_attachment_view"
-                        android:layout_width="fill_parent"
-                        android:layout_height="wrap_content"/>
-    
-                    <ViewStub android:id="@+id/video_attachment_view_stub"
-                        android:layout="@layout/video_attachment_view"
-                        android:layout_width="fill_parent"
-                        android:layout_height="wrap_content"/>
-  
-                    <ViewStub android:id="@+id/audio_attachment_view_stub"
-                        android:layout="@layout/audio_attachment_view"
-                        android:layout_width="fill_parent"
-                        android:layout_height="wrap_content"/>
-  
-                    <ViewStub android:id="@+id/slideshow_attachment_view_stub"
-                        android:layout="@layout/slideshow_attachment_view"
-                        android:layout_width="fill_parent"
-                        android:layout_height="wrap_content"/>
-                </LinearLayout>
-  
-                <LinearLayout
-                    android:id="@+id/bottom_panel"
-                    android:orientation="horizontal"
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:paddingTop="5dip"
-                    android:paddingBottom="5dip"
-                    android:paddingLeft="5dip"
-                    android:paddingRight="5dip"
-                    android:background="@drawable/bottombar_landscape_565">
-
-                    <RelativeLayout
-                        android:id="@+id/editor_with_counter"
-                        android:layout_width="0dip"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="1.0"
-                        android:addStatesFromChildren="true"
-                        android:background="@android:drawable/edit_text">
-
-                        <EditText
-                            android:id="@+id/embedded_text_editor"
-                            android:layout_width="fill_parent"
-                            android:layout_height="wrap_content"
-                            android:autoText="true"
-                            android:capitalize="sentences"
-                            android:nextFocusRight="@+id/send_button"
-                            android:hint="@string/type_to_compose_text_enter_to_send"
-                            android:maxLines="4"
-                            android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
-                            android:background="@null"
-                        />
-    
-                        <TextView
-                            android:id="@+id/text_counter"
-                            android:layout_width="wrap_content"
-                            android:layout_height="wrap_content"
-                            android:background="#88000000"
-                            android:textColor="#ffffffff"
-                            android:textSize="11sp"
-                            android:textStyle="bold"
-                            android:paddingLeft="3dip"
-                            android:paddingRight="3dip"
-                            android:layout_alignParentRight="true"
-                            android:layout_alignParentTop="true"
-                            android:visibility="gone"
-                        />
-                    </RelativeLayout>
-
-                    <Button android:id="@+id/send_button"
-                        android:layout_marginLeft="5dip"
-                        android:layout_width="wrap_content"
-                        android:layout_height="fill_parent"
-                        style="?android:attr/buttonStyleSmall"
-                        android:layout_gravity="center_vertical"
-                        android:nextFocusLeft="@+id/embedded_text_editor"
-                        android:text="@string/send"
-                    />
-                </LinearLayout>
-            </LinearLayout>
-        </ScrollView>
-    </LinearLayout>
-</LinearLayout>
diff --git a/res/layout/confirm_rate_limit_activity.xml b/res/layout/confirm_rate_limit_activity.xml
deleted file mode 100644
index 38f499e..0000000
--- a/res/layout/confirm_rate_limit_activity.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:orientation="vertical">
-
-    <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:orientation="vertical"
-        android:layout_marginLeft="14dip"
-        android:layout_marginRight="14dip">
-        <LinearLayout
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal"
-            android:gravity="center_vertical"
-            android:layout_marginTop="2dip"
-            android:layout_marginBottom="5dip"
-            android:layout_marginLeft="2dip"
-            android:layout_marginRight="5dip">
-            <ImageView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:paddingLeft="10dip"
-                android:src="@android:drawable/ic_dialog_alert"/>
-            <TextView
-                style="?android:attr/textAppearanceLarge"
-                android:paddingLeft="10dip"
-                android:paddingTop="10dip"
-                android:paddingBottom="10dip"
-                android:layout_width="fill_parent" 
-                android:layout_height="wrap_content"
-                android:gravity="center_vertical"
-                android:text="@string/rate_limit_surpassed" />
-        </LinearLayout>
-        <ImageView
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:src="@android:drawable/divider_horizontal_dark"/>
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:orientation="vertical"
-        android:layout_marginLeft="14dip"
-        android:layout_marginRight="14dip">
-        <TextView
-            style="?android:attr/textAppearanceMedium"
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:padding="5dip"
-            android:text="@string/confirm_rate_limit" />
-    </LinearLayout>
-
-    <LinearLayout android:id="@+id/buttonPanel"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="14dip"
-        android:layout_marginRight="14dip"
-        android:orientation="vertical" >
-
-        <LinearLayout
-            android:layout_width="fill_parent"
-            android:layout_height="1dip"
-            android:layout_marginBottom="2dip"
-            android:background="@android:drawable/divider_horizontal_bright"
-            android:orientation="vertical" />        
-        <LinearLayout 
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal" >
-            <LinearLayout
-                android:layout_weight="0.25"
-                android:layout_width="0dip"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:visibility="gone" />
-            <Button android:id="@+id/btn_yes"
-                android:layout_width="0dip"
-                android:layout_gravity="left"
-                android:layout_weight="1"
-                android:maxLines="2"
-                android:layout_height="wrap_content"
-                android:text="@android:string/yes" />
-            <Button android:id="@+id/btn_no"
-                android:layout_width="0dip"
-                android:layout_gravity="right"
-                android:layout_weight="1"
-                android:maxLines="2"
-                android:layout_height="wrap_content"
-                android:text="@android:string/no">
-            </Button>
-            <LinearLayout
-                android:layout_width="0dip"
-                android:layout_weight="0.25"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal"
-                android:visibility="gone" />
-        </LinearLayout>
-     </LinearLayout>
-</LinearLayout>
diff --git a/res/layout/conversation_header.xml b/res/layout/conversation_header.xml
deleted file mode 100644
index f3a19a2..0000000
--- a/res/layout/conversation_header.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<com.android.mms.ui.ConversationHeaderView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="?android:attr/listPreferredItemHeight"
-    android:paddingRight="10dip" >
-
-    <ImageView android:id="@+id/unread_indicator"
-        android:layout_width="wrap_content"
-        android:layout_height="fill_parent"
-        android:layout_alignParentLeft="true"
-        android:visibility="invisible"
-        android:src="@drawable/ic_sms_unread_msg_indicator" />
-
-    <ImageView android:id="@+id/error"
-        android:layout_marginLeft="3dip"
-        android:layout_width="32dip"
-        android:layout_height="32dip"
-        android:visibility="gone"
-        android:layout_alignParentRight="true"
-        android:layout_alignParentTop="true"
-        android:src="@drawable/ic_sms_mms_not_delivered" />
-
-    <ImageView android:id="@+id/attachment"
-        android:layout_marginLeft="3dip"
-        android:layout_width="32dip"
-        android:layout_height="32dip"
-        android:visibility="gone"
-        android:layout_toLeftOf="@id/error"
-        android:layout_alignParentTop="true"
-        android:src="@drawable/ic_dialog_attach"
-        android:layout_alignWithParentIfMissing="true" />
-
-    <TextView android:id="@+id/from"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:singleLine="true"
-        android:layout_marginTop="5dip"
-        android:layout_marginLeft="5dip"
-        android:layout_marginRight="5dip"
-        android:layout_alignTop="@id/unread_indicator"
-        android:layout_toRightOf="@id/unread_indicator"
-        android:layout_toLeftOf="@id/attachment"
-        android:layout_alignWithParentIfMissing="true" 
-        android:ellipsize="marquee"  />
-    
-    <TextView android:id="@+id/date"
-        android:layout_marginTop="2dip"
-        android:layout_marginBottom="4dip"
-        android:layout_marginLeft="5dip"
-        android:layout_height="wrap_content"
-        android:layout_width="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceSmall"
-        android:textColor="@drawable/text_color"
-        android:singleLine="true"
-        android:layout_alignParentRight="true"
-        android:layout_alignParentBottom="true" />
-
-    <TextView android:id="@+id/subject"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:textAppearance="?android:attr/textAppearanceSmall"
-        android:singleLine="true" 
-        android:layout_marginLeft="5dip"
-        android:layout_marginBottom="5dip"
-        android:layout_alignBottom="@id/unread_indicator"
-        android:layout_toRightOf="@id/unread_indicator"
-        android:layout_toLeftOf="@id/date"
-        android:ellipsize="end" />
-
-</com.android.mms.ui.ConversationHeaderView>
diff --git a/res/layout/conversation_list_screen.xml b/res/layout/conversation_list_screen.xml
deleted file mode 100644
index 527b8ca..0000000
--- a/res/layout/conversation_list_screen.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<ListView android:id="@android:id/list" xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:drawSelectorOnTop="false"
-    android:scrollbarStyle="insideOverlay"
-    android:fadingEdgeLength="16dip" />
diff --git a/res/layout/delivery_report_activity.xml b/res/layout/delivery_report_activity.xml
deleted file mode 100644
index 6f0df24..0000000
--- a/res/layout/delivery_report_activity.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:layout_gravity="center">
-
-    <ListView android:id="@android:id/list"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
-        android:drawSelectorOnTop="false"
-        android:divider="@android:drawable/divider_horizontal_bright"
-        android:fadingEdgeLength="16dip"/>
-</LinearLayout>
diff --git a/res/layout/delivery_report_header.xml b/res/layout/delivery_report_header.xml
deleted file mode 100644
index 1e2f625..0000000
--- a/res/layout/delivery_report_header.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="horizontal"
-    android:layout_width="fill_parent"
-    android:background="#ff888888"
-    android:layout_height="?android:attr/listPreferredItemHeight">
-
-    <ImageView android:id="@+id/icon"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="5dip"
-        android:layout_gravity="center_vertical"
-        android:src="@drawable/ic_mms_message_details" />
-
-    <TextView android:id="@+id/title"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="5dip"
-        android:layout_gravity="center_vertical"
-        android:textColor="#ffffffff"
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:singleLine="true"
-        android:text="@string/delivery_header_title" />
-</LinearLayout>
diff --git a/res/layout/delivery_report_list_item.xml b/res/layout/delivery_report_list_item.xml
deleted file mode 100644
index 2a44c36..0000000
--- a/res/layout/delivery_report_list_item.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<com.android.mms.ui.DeliveryReportListItem xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="horizontal"
-    android:layout_width="fill_parent"
-    android:background="#ffffffff"
-    android:layout_height="?android:attr/listPreferredItemHeight">
-
-    <LinearLayout
-        android:orientation="vertical"
-        android:layout_width="wrap_content"
-        android:layout_height="fill_parent"
-        android:layout_marginLeft="5dip"
-        android:layout_gravity="center_vertical">
-
-        <TextView android:id="@+id/recipient"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textColor="#ff000000"
-            android:textAppearance="?android:attr/textAppearanceLarge"
-            android:singleLine="true" />
-
-        <TextView android:id="@+id/status"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:textColor="#ff000000"
-            android:textAppearance="?android:attr/textAppearanceLarge"
-            android:singleLine="true" />
-    </LinearLayout>
-
-    <LinearLayout
-        android:orientation="vertical"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
-        android:background="#ffffffff">
-
-        <LinearLayout
-        android:orientation="horizontal"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:background="#ffffffff"
-        android:layout_weight="1"
-        android:layout_gravity="right">
-
-            <ImageView android:id="@+id/icon"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginRight="5dip"
-                android:layout_gravity="center_vertical"/>
-        </LinearLayout>
-    </LinearLayout>
-
-</com.android.mms.ui.DeliveryReportListItem>
diff --git a/res/layout/edit_slide_activity.xml b/res/layout/edit_slide_activity.xml
deleted file mode 100644
index ba179fe..0000000
--- a/res/layout/edit_slide_activity.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<com.android.mms.ui.BasicSlideEditorView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/slide_editor_view"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:orientation="vertical">
-
-    <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:orientation="horizontal"
-        android:background="@android:drawable/editbox_background" >
-
-        <LinearLayout
-            android:layout_width="wrap_content"
-            android:layout_height="fill_parent"
-            android:layout_weight="1"
-            android:layout_marginTop="10dip"
-            android:layout_marginBottom="10dip"
-            android:layout_marginLeft="20dip"
-            android:layout_marginRight="20dip"
-            android:orientation="vertical" >
-
-            <ImageView android:id="@+id/image"
-                android:layout_width="fill_parent"
-                android:layout_height="fill_parent"
-                android:layout_weight="1"
-                android:background="@android:drawable/picture_frame" />
-
-            <LinearLayout  android:id="@+id/audio"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:visibility="gone"
-                android:orientation="horizontal" >
-
-                <ImageView
-                    android:src="@drawable/ic_mms_music"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content" />
-                    
-                <TextView android:id="@+id/audio_name"
-                    android:singleLine="true"
-                    android:layout_gravity="center_vertical"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content" /> 
-            </LinearLayout>
-        </LinearLayout>
-
-        <LinearLayout android:id="@+id/controler"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_vertical"
-            android:orientation="vertical">
-
-            <LinearLayout
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal">
-
-                <ImageButton  android:id="@+id/pre_slide_button"
-                    style="?android:attr/buttonStyleSmall"
-                    android:layout_width="wrap_content"
-                    android:layout_height="50dip"
-                    android:src="@drawable/ic_maps_back" />
-
-                <ImageButton  android:id="@+id/next_slide_button"
-                    style="?android:attr/buttonStyleSmall"
-                    android:layout_width="wrap_content"
-                    android:layout_height="50dip"
-                    android:paddingLeft="12dip"
-                    android:src="@drawable/ic_maps_next" />
-            </LinearLayout>
-
-            <Button android:id="@+id/preview_button"
-                style="?android:attr/buttonStyleSmall"
-                android:layout_width="fill_parent"
-                android:layout_height="50dip"
-                android:text="@string/preview" />
-
-            <Button android:id="@+id/replace_image_button"
-                style="?android:attr/buttonStyleSmall"
-                android:layout_width="fill_parent"
-                android:layout_height="50dip"
-                android:text="@string/replace_image" />
-
-            <Button android:id="@+id/remove_slide_button"
-                style="?android:attr/buttonStyleSmall"
-                android:layout_width="fill_parent"
-                android:layout_height="50dip"
-                android:text="@string/remove_slide" />
-        </LinearLayout>
-    </LinearLayout>
-
-    <LinearLayout
-        android:orientation="horizontal"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:paddingBottom="2dip"
-        android:gravity="bottom"
-        android:baselineAligned="false">
-
-        <EditText android:id="@+id/text_message"
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:nextFocusRight="@+id/done_button"
-            android:textSize="15sp"
-            android:capitalize="sentences"
-            android:autoText="true"
-            android:paddingLeft="5dip"
-            android:paddingTop="5dip"
-            android:paddingRight="5dip"
-            android:paddingBottom="5dip"
-            android:hint="@string/type_to_compose_text_or_leave_blank"
-            android:maxLines="1" >
-            <requestFocus/>
-        </EditText>
-
-        <Button android:id="@+id/done_button"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:nextFocusLeft="@+id/text_message"
-            android:text="@string/done"
-        />
-    </LinearLayout>
-</com.android.mms.ui.BasicSlideEditorView>
diff --git a/res/layout/edit_slide_duration.xml b/res/layout/edit_slide_duration.xml
deleted file mode 100644
index 8bda235..0000000
--- a/res/layout/edit_slide_duration.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<LinearLayout  xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:orientation="vertical"
-    android:gravity="center_horizontal">
-
-
-    <TextView android:id="@+id/label"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:paddingTop="5dip"
-        android:paddingBottom="10dip"
-        android:paddingLeft="5dip"
-        android:paddingRight="5dip"
-        android:singleLine="true"
-        android:layout_gravity="center_horizontal"/>
-
-    <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:gravity="center_horizontal">
-
-        <EditText android:id="@+id/text"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:numeric="integer"
-            android:maxLength="4"
-            android:singleLine="true" />
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:paddingLeft="10dip"
-            android:text="@string/secs" />
-    </LinearLayout>
-
-    <Button android:id="@+id/done"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="@string/done"
-        android:layout_gravity="center_horizontal"/>
-</LinearLayout>
diff --git a/res/layout/edit_slide_text.xml b/res/layout/edit_slide_text.xml
deleted file mode 100644
index 578354a..0000000
--- a/res/layout/edit_slide_text.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>

-<!--

-/*

- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.

- */

--->

-

-<LinearLayout  xmlns:android="http://schemas.android.com/apk/res/android"

-    android:layout_width="fill_parent"

-    android:layout_height="fill_parent"

-    android:orientation="vertical">

-

-    <TextView android:id="@+id/label"

-        android:layout_width="wrap_content"

-        android:layout_height="wrap_content"

-        android:textAppearance="?android:attr/textAppearanceMedium"

-        android:layout_gravity="center"

-        android:paddingTop="10dip"

-        android:paddingBottom="6dip"

-        android:paddingLeft="5dip" />

-

-    <RelativeLayout

-        android:layout_width="fill_parent"

-        android:layout_height="wrap_content"

-        android:layout_marginBottom="4dip"

-        android:layout_weight="1">

-

-        <EditText android:id="@+id/text"

-            android:layout_width="fill_parent"

-            android:layout_height="wrap_content"

-            android:layout_marginLeft="5dip"

-            android:layout_marginRight="5dip"

-            android:maxLines="4"

-            android:capitalize="sentences"

-            android:autoText="true"/>

-    </RelativeLayout>

-

-    <LinearLayout

-        android:background="#fff"

-        android:gravity="right"

-        android:layout_width="fill_parent"

-        android:layout_height="wrap_content">

-    

-        <Button android:id="@+id/done"

-            android:layout_width="100dip"

-            android:layout_height="wrap_content"

-            android:layout_marginTop="4dip"

-            android:text="@string/done" />

-    </LinearLayout>

-</LinearLayout>

diff --git a/res/layout/icon_list_item.xml b/res/layout/icon_list_item.xml
deleted file mode 100644
index 4ea4b9c..0000000
--- a/res/layout/icon_list_item.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:minHeight="?android:attr/listPreferredItemHeight"
-    android:paddingTop="1dip"
-    android:paddingBottom="1dip"
-    android:paddingLeft="9dip"
-    android:paddingRight="9dip">
-
-    <ImageView android:id="@+id/icon"
-        android:paddingRight="9dip"
-        android:layout_gravity="center_vertical"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"/>
-
-    <TextView android:id="@+id/text1"
-        android:layout_width="wrap_content"
-        android:layout_height="fill_parent"
-        android:textColor="@drawable/text_color_black"
-        android:gravity="center_vertical"
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:layout_gravity="center_horizontal|center_vertical" />
-</LinearLayout>
-
diff --git a/res/layout/image_attachment_view.xml b/res/layout/image_attachment_view.xml
deleted file mode 100644
index 5a2c321..0000000
--- a/res/layout/image_attachment_view.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
- * Copyright (C) 2006-2008 Esmertec AG.
- * Copyright (C) 2006-2008 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.
- */
--->
-
-<com.android.mms.ui.ImageAttachmentView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/image_attachment_view"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:gravity="center_vertical"
-    android:paddingRight="5dip"
-    android:background="@drawable/attachment_editor_bg">
-
-    <ImageView
-        android:id="@+id/image_content"
-        android:layout_width="fill_parent"
-        android:layout_height="150dip"
-        android:layout_weight="1" />
-
-    <LinearLayout
-        android:orientation="vertical"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content">
-
-        <Button
-            android:id="@+id/view_image_button"
-            style="?android:attr/buttonStyleSmall"
-            android:layout_width="100dip"
-            android:layout_height="50dip"
-            android:text="@string/view" />
-
-        <Button
-            android:id="@+id/replace_image_button"
-            style="?android:attr/buttonStyleSmall"
-            android:layout_width="100dip"
-            android:layout_height="50dip"
-            android:text="@string/replace" />
-
-        <Button
-            android:id="@+id/remove_image_button"
-            style="?android:attr/buttonStyleSmall"
-            android:layout_width="100dip"
-            android:layout_height="50dip"
-            android:text="@string/remove" />
-
-    </LinearLayout>
-</com.android.mms.ui.ImageAttachmentView>
diff --git a/res/layout/message_list_item.xml b/res/layout/message_list_item.xml
deleted file mode 100644
index 2120535..0000000
--- a/res/layout/message_list_item.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<com.android.mms.ui.MessageListItem
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/msg_list_item"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:background="@drawable/listitem_background"
-    android:orientation="horizontal">
-
-    <LinearLayout android:id="@+id/mms_layout_view_parent"
-        android:paddingLeft="5dip"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:orientation="vertical" >
-
-        <ViewStub android:id="@+id/mms_layout_view_stub"
-            android:layout="@layout/mms_layout_view"
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"/>
-    
-        <TextView android:id="@+id/text_view"
-            android:autoLink="all"
-            android:layout_width="fill_parent"
-            android:layout_height="wrap_content"
-            android:linksClickable="false"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:textColor="#ff000000"
-            android:textSize="18sp" />
-    </LinearLayout>
-
-    <ImageView
-        android:id="@+id/right_status_indicator"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center_vertical"
-        android:visibility="gone" />
-
-    <ViewStub android:id="@+id/mms_downloading_view_stub"
-        android:layout="@layout/mms_downloading_view"
-        android:layout_gravity="center_vertical"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"/>
-
-</com.android.mms.ui.MessageListItem>
diff --git a/res/layout/mms_downloading_view.xml b/res/layout/mms_downloading_view.xml
deleted file mode 100644
index 00e2a07..0000000
--- a/res/layout/mms_downloading_view.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
- * Copyright (C) 2008 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.
- */
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/mms_download_controls"
-    android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:orientation="horizontal">
-
-    <Button android:id="@+id/btn_download_msg"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center_vertical"
-        android:text="@string/download"
-        android:visibility="gone" />
-
-    <TextView android:id="@+id/label_downloading"
-        android:layout_width="wrap_content"
-        android:layout_height="fill_parent"
-        android:layout_marginLeft="5dp"
-        android:layout_marginRight="5dp"
-        android:gravity="center"
-        android:text="@string/downloading" 
-        android:visibility="gone" />
-
-</LinearLayout>
-
diff --git a/res/layout/mms_layout_view.xml b/res/layout/mms_layout_view.xml
deleted file mode 100644
index 1f057e5..0000000
--- a/res/layout/mms_layout_view.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/mms_view"
-    android:layout_width="wrap_content"
-    android:layout_height="fill_parent"
-    android:paddingTop="7dip"
-    android:paddingBottom="7dip">
-
-    <ImageView
-        android:id="@+id/image_view"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        android:maxWidth="178dip"
-        android:maxHeight="178dip"
-        android:adjustViewBounds="true"
-        android:background="@android:drawable/picture_frame"
-        android:visibility="gone" />
-
-    <ImageButton
-        android:id="@+id/play_slideshow_button"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:src="@drawable/mms_play_btn"
-        android:layout_gravity="center"
-        android:visibility="gone" />
-
-</FrameLayout>
-
diff --git a/res/layout/playing_audio_info.xml b/res/layout/playing_audio_info.xml
deleted file mode 100644
index ee5380a..0000000
--- a/res/layout/playing_audio_info.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/playing_audio"
-    android:layout_width="fill_parent"
-    android:layout_height="82dip"
-    android:orientation="horizontal"
-    android:gravity="center"
-    android:visibility="gone">
-
-    <ImageView
-        android:id="@+id/audio_icon"
-        android:layout_width="wrap_content"
-        android:layout_height="fill_parent"
-        android:src="@drawable/ic_launcher_record_audio" />
-
-     <TextView android:id="@+id/name"
-         android:layout_width="wrap_content"
-         android:layout_height="fill_parent"
-         android:singleLine="true"
-         android:textStyle="bold"
-         android:textColor="@drawable/text_color_offwhite" />
-
-</LinearLayout>
diff --git a/res/layout/recipients_editor.xml b/res/layout/recipients_editor.xml
deleted file mode 100644
index a544889..0000000
--- a/res/layout/recipients_editor.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<com.android.mms.ui.RecipientsEditor
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/recipients_editor"
-    android:hint="@string/to_hint"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:singleLine="true"
-    />
diff --git a/res/layout/retry_sending_dialog.xml b/res/layout/retry_sending_dialog.xml
deleted file mode 100644
index 92fc2e1..0000000
--- a/res/layout/retry_sending_dialog.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:gravity="center_horizontal"
-    android:background="@android:drawable/dialog_frame"
-    android:orientation="vertical" >
-
-    <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:padding="5dip"
-        android:gravity="center_vertical"
-        android:orientation="horizontal">
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:src="@drawable/ic_sms_mms_not_delivered" />
-
-        <TextView android:id="@+id/title_text_view"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="@string/undelivered_msg_dialog_title" />
-    </LinearLayout>
-
-    <ImageView
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:src="@android:drawable/divider_horizontal_bright" />
-
-    <TextView android:id="@+id/body_text_view"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:padding="10dip"
-        android:gravity="center"
-        android:textAppearance="?android:attr/textAppearanceSmall" />
-</LinearLayout>
-
-
diff --git a/res/layout/sim_list.xml b/res/layout/sim_list.xml
deleted file mode 100644
index 5084b58..0000000
--- a/res/layout/sim_list.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent"
-    android:background="#ffffffff"
-    android:layout_gravity="center">
-
-    <ListView
-        android:id="@+id/messages"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
-        android:cacheColorHint="#ffffffff"
-        android:listSelector="@android:drawable/list_selector_background"
-        android:divider="@android:drawable/divider_horizontal_bright"
-        android:focusable="true"
-        android:drawSelectorOnTop="false"
-        android:stackFromBottom="true" />
-    <TextView
-        android:id="@+id/empty_message"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"   
-        android:text="@string/sim_empty"
-        android:layout_gravity="center" 
-        android:visibility="gone" />
-</FrameLayout>
diff --git a/res/layout/slideshow.xml b/res/layout/slideshow.xml
deleted file mode 100644
index 35f749b..0000000
--- a/res/layout/slideshow.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent">
-
-    <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent"
-        android:gravity="center"
-        android:orientation="horizontal">
-
-        <com.android.mms.ui.SlideView android:id="@+id/slide_view"
-            android:layout_width="fill_parent"
-            android:layout_height="fill_parent" />
-
-     </LinearLayout>
-
-</FrameLayout>
diff --git a/res/layout/slideshow_attachment_view.xml b/res/layout/slideshow_attachment_view.xml
deleted file mode 100644
index 932a6f4..0000000
--- a/res/layout/slideshow_attachment_view.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
- * Copyright (C) 2006-2008 Esmertec AG.
- * Copyright (C) 2006-2008 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.
- */
--->
-
-<com.android.mms.ui.SlideshowAttachmentView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/slideshow_attachment_view"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:paddingRight="5dip"
-    android:background="@drawable/attachment_editor_bg">
-
-    <LinearLayout
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:gravity="center">
-
-        <FrameLayout
-            android:layout_width="240dip"
-            android:layout_height="180dip"
-            android:layout_gravity="center"
-            android:background="@android:drawable/picture_frame" >
-
-            <LinearLayout
-                android:orientation="vertical"
-                android:layout_width="fill_parent"
-                android:layout_height="fill_parent">
-
-                <ImageView
-                    android:id="@+id/slideshow_image"
-                    android:layout_width="fill_parent"
-                    android:layout_height="fill_parent"
-                    android:layout_weight="1" />
-
-                <TextView
-                    android:id="@+id/slideshow_text"
-                    android:layout_width="fill_parent"
-                    android:layout_height="wrap_content"
-                    android:textColor="@drawable/text_color_black" />
-
-            </LinearLayout>
-
-            <LinearLayout
-                android:layout_width="fill_parent"
-                android:layout_height="fill_parent"
-                android:gravity="center">
-
-                <ImageButton
-                    android:id="@+id/play_slideshow_button"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:src="@drawable/mms_play_btn" />
-
-            </LinearLayout>
-        </FrameLayout>
-    </LinearLayout>
-
-    <LinearLayout
-        android:orientation="vertical"
-        android:gravity="center_vertical"
-        android:layout_width="wrap_content"
-        android:layout_height="fill_parent">
-
-        <Button
-            android:id="@+id/edit_slideshow_button"
-            style="?android:attr/buttonStyleSmall"
-            android:layout_width="80dip"
-            android:layout_height="50dip"
-            android:text="@string/edit" />
-
-        <Button
-            android:id="@+id/send_slideshow_button"
-            style="?android:attr/buttonStyleSmall"
-            android:layout_width="80dip"
-            android:layout_height="50dip"
-            android:text="@string/send" />
-
-    </LinearLayout>
-</com.android.mms.ui.SlideshowAttachmentView>
diff --git a/res/layout/slideshow_edit_item.xml b/res/layout/slideshow_edit_item.xml
deleted file mode 100644
index fc6efb4..0000000
--- a/res/layout/slideshow_edit_item.xml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
--->
-
-<com.android.mms.ui.SlideListItemView
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="fill_parent"
-    android:layout_height="?android:attr/listPreferredItemHeight"
-    android:orientation="horizontal">
-
-    <ImageView android:id="@+id/image_preview"
-        android:layout_width="60dip"
-        android:layout_height="60dip"
-        android:paddingLeft="2dip"
-        android:scaleType="fitCenter"
-        android:src="@drawable/ic_launcher_slideshow_default_sms" />
-
-    <LinearLayout
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center_vertical"
-        android:orientation="vertical" >
-
-        <RelativeLayout
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content">
-
-            <TextView android:id="@+id/slide_number_text"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceLarge"
-                android:paddingLeft="5dip"/>
-
-            <LinearLayout
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_alignParentRight="true" >
-
-                <TextView android:id="@+id/attachment_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="center_vertical"
-                    android:paddingLeft="5dip"
-                    android:textAppearance="?android:attr/textAppearanceSmall"
-                    android:maxLines="1" />
-
-                <ImageView android:id="@+id/attachment_icon"
-                    android:layout_gravity="center_vertical"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content" />
-            </LinearLayout>
-        </RelativeLayout>
-
-        <RelativeLayout
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content">
-
-            <TextView android:id="@+id/text_preview"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:paddingLeft="5dip"
-                android:paddingRight="40dip"
-                android:textAppearance="?android:attr/textAppearanceSmall"
-                android:maxLines="1" />
-
-            <TextView android:id="@+id/duration_text"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_alignParentRight="true"
-                android:paddingLeft="5dip"
-                android:textAppearance="?android:attr/textAppearanceSmall"
-                android:maxLines="1" />
-        </RelativeLayout>
-    </LinearLayout>
-</com.android.mms.ui.SlideListItemView>
diff --git a/res/layout/smiley_menu_item.xml b/res/layout/smiley_menu_item.xml
deleted file mode 100644
index 6032e96..0000000
--- a/res/layout/smiley_menu_item.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="horizontal"
-    android:layout_width="fill_parent"
-    android:layout_height="?android:attr/listPreferredItemHeight">
-
-    <ImageView android:id="@+id/smiley_icon"
-        android:layout_gravity="center_vertical"
-        android:layout_marginLeft="18dip"
-        android:layout_width="20dip"
-        android:layout_height="20dip" />
-
-    <TextView android:id="@+id/smiley_name"
-        android:singleLine="true"
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:textColor="?android:attr/textColorPrimaryInverse"
-        android:layout_marginLeft="15dip"
-        android:layout_gravity="center_vertical"
-        android:layout_weight="1"
-        android:layout_width="0dip"
-        android:layout_height="wrap_content" />
-
-    <TextView android:id="@+id/smiley_text"
-        android:singleLine="true"
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:textColor="?android:attr/textColorPrimaryInverse"
-        android:layout_marginRight="10dip"
-        android:layout_gravity="center_vertical"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content" />
-
-</LinearLayout>
diff --git a/res/layout/video_attachment_view.xml b/res/layout/video_attachment_view.xml
deleted file mode 100644
index 89f38ca..0000000
--- a/res/layout/video_attachment_view.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*
- * Copyright (C) 2006-2008 Esmertec AG.
- * Copyright (C) 2006-2008 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.
- */
--->
-
-<com.android.mms.ui.VideoAttachmentView xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/video_attachment_view"
-    android:layout_width="fill_parent"
-    android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:gravity="center_vertical"
-    android:paddingRight="5dip"
-    android:background="@drawable/attachment_editor_bg">
-
-    <RelativeLayout
-        android:layout_weight="1"
-        android:gravity="center"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent">
-
-        <ImageView
-            android:id="@+id/video_thumbnail"
-            android:scaleType="centerCrop"
-            android:layout_width="fill_parent"
-            android:layout_height="fill_parent" />
-
-        <ImageView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerInParent="true"
-            android:src="@drawable/ic_gallery_video_overlay" />
-    </RelativeLayout>
-
-    <LinearLayout
-        android:orientation="vertical"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content">
-
-        <Button
-            android:id="@+id/view_video_button"
-            style="?android:attr/buttonStyleSmall"
-            android:layout_width="100dip"
-            android:layout_height="50dip"
-            android:text="@string/view" />
-
-        <Button
-            android:id="@+id/replace_video_button"
-            style="?android:attr/buttonStyleSmall"
-            android:layout_width="100dip"
-            android:layout_height="50dip"
-            android:text="@string/replace" />
-
-        <Button
-            android:id="@+id/remove_video_button"
-            style="?android:attr/buttonStyleSmall"
-            android:layout_width="100dip"
-            android:layout_height="50dip"
-            android:text="@string/remove" />
-
-    </LinearLayout>
-</com.android.mms.ui.VideoAttachmentView>
diff --git a/res/values-cs/arrays.xml b/res/values-cs/arrays.xml
deleted file mode 100644
index 77dce09..0000000
--- a/res/values-cs/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"Happy"</item>
-    <item>"Smutný"</item>
-    <item>"Mrkající"</item>
-    <item>"Vypláznutý jazyk"</item>
-    <item>"Překvapený"</item>
-    <item>"Pusa"</item>
-    <item>"Hej!"</item>
-    <item>"Cool"</item>
-    <item>"Cinkání zlaťáků"</item>
-    <item>"Šlápota v úsměvu"</item>
-    <item>"V rozpacích"</item>
-    <item>"Andílek"</item>
-    <item>"Nerozhodný"</item>
-    <item>"Rozplakaný"</item>
-    <item>"Ani muk"</item>
-    <item>"Smějící se"</item>
-    <item>"Zmatený"</item>
-  </string-array>
-</resources>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
deleted file mode 100644
index af07258..0000000
--- a/res/values-cs/strings.xml
+++ /dev/null
@@ -1,243 +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="app_label">"SMS a MMS"</string>
-    <string name="new_message">"Nová zpráva"</string>
-    <string name="create_new_message">"Napsat novou zprávu"</string>
-    <string name="menu_call_back">"Volat odesílatele <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_send_email">"Odeslat e-mail adresátovi <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_compose_new">"Napsat"</string>
-    <string name="menu_preferences">"Nastavení"</string>
-    <string name="menu_add_address_to_contacts">"Přidat <xliff:g id="NAME">%s</xliff:g> mezi Kontakty"</string>
-    <string name="menu_call">"Volat"</string>
-    <string name="menu_delete_all">"Smazat konverzace"</string>
-    <string name="menu_delete">"Smazat"</string>
-    <string name="menu_undelivered_messages">"Nedoručené zprávy"</string>
-    <string name="menu_view">"Zobrazit"</string>
-    <string name="refreshing">"Obnovování..."</string>
-    <string name="has_draft">"Koncept"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"Anonymní"</string>
-    <string name="no_subject_view">"(Předmět neuveden)"</string>
-    <string name="messagelist_sender_self">"Já"</string>
-    <string name="view_picture">"Zobrazit fotografii"</string>
-    <string name="view_slideshow">"Zobrazit prezentaci"</string>
-    <string name="view_message_details">"Zobrazit podrobnosti zprávy"</string>
-    <string name="view_delivery_report">"Zobrazit potvrzení"</string>
-    <string name="delete_message">"Smazat zprávu"</string>
-    <string name="sent_on">"Odesláno: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"Platnost vyprší: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"kB"</string>
-    <string name="undelivered_msg_dialog_title">"Nedoručená zpráva"</string>
-    <string name="undelivered_msg_dialog_body">"Zprávu se nepodařilo odeslat."\n"Poslední pokus: <xliff:g id="MESSAGE">%s</xliff:g>."</string>
-    <string name="undelivered_sms_dialog_body">"Zprávu se nepodařilo odeslat."</string>
-    <string name="delete_thread">"Smazat konverzaci"</string>
-    <string name="menu_forward">"Předat dál"</string>
-    <string name="download">"Stáhnout"</string>
-    <string name="downloading">"Stahování"</string>
-    <string name="inline_subject">"&lt;Předmět: <xliff:g id="SUBJECT">%s</xliff:g>&gt;"</string>
-    <string name="drm_protected_text">"* Text je chráněn DRM *"</string>
-    <string name="insufficient_drm_rights">"Nemáte dostatečná práva DRM."</string>
-    <string name="copy_message_text">"Kopírovat text zprávy"</string>
-    <string name="message_options">"Možnosti zprávy"</string>
-    <string name="done">"Hotovo"</string>
-    <string name="move_up">"Přesunout nahoru"</string>
-    <string name="move_down">"Přesunout dolů"</string>
-    <string name="remove_slide">"Odstranit snímek"</string>
-    <string name="add_slide">"Přidat snímek"</string>
-    <string name="add_slide_hint">"Umožňuje vytvořit nový snímek."</string>
-    <string name="discard_slideshow">"Zahodit prezentaci"</string>
-    <string name="remove_text">"Odstranit text"</string>
-    <string name="add_picture">"Přidat fotografii"</string>
-    <string name="remove_picture">"Odstranit fotografii"</string>
-    <string name="add_music">"Přidat hudbu"</string>
-    <string name="remove_music">"Odstranit hudbu"</string>
-    <string name="add_video">"Přidat video"</string>
-    <string name="remove_video">"Odstranit video"</string>
-    <string name="compose_title">"Napsat"</string>
-    <string name="to_hint">"Komu:"</string>
-    <string name="subject_hint">"Předmět"</string>
-    <string name="add_attachment">"Připojit přílohu"</string>
-    <string name="add_subject">"Přidat předmět"</string>
-    <string name="discard">"Zahodit"</string>
-    <string name="view">"Zobrazit"</string>
-    <string name="replace">"Nahradit"</string>
-    <string name="remove">"Odstranit"</string>
-    <string name="send">"Odeslat"</string>
-    <string name="all_threads">"Všechny konverzace"</string>
-    <string name="type_to_compose_text_enter_to_send">"Napište zprávu a odešlete ji stiskem tlačítka Enter."</string>
-    <string name="open_keyboard_to_compose_message">"Otevřete klávesnici a napište zprávu."</string>
-    <string name="image_too_large">"Fotografie je příliš velká"</string>
-    <string name="ask_for_automatically_resize">"Přizpůsobit velikost fotografie před odesláním?"</string>
-    <string name="compressing">"Probíhá komprese..."</string>
-    <string name="unsupported_media_format">"<xliff:g id="NAME">%1$s</xliff:g> je v nepodporovaném formátu."</string>
-    <string name="select_different_media">"Zvolte jinou položku <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <string name="exceed_message_size_limitation">"Byl dosažen limit velikosti zprávy."</string>
-    <string name="failed_to_add_media">"Tuto položku (<xliff:g id="NAME">%1$s</xliff:g>) nelze do zprávy přidat."</string>
-    <string name="failed_to_resize_image">"Velikost fotografie se nepodařilo přizpůsobit."</string>
-    <string name="resize_image_error_information">"Velikost fotografie byla přizpůsobena. Přesto je příliš velká a nelze ji odeslat."</string>
-    <string name="forward_prefix">"Fwd:"</string>
-    <string name="discard_message">"Zahodit"</string>
-    <string name="discard_message_reason">"Zpráva bude zrušena, protože neobsahuje žádné platné příjemce."</string>
-    <string name="has_invalid_recipient">"Neplatní příjemci: &lt;<xliff:g id="NAME">%1$s</xliff:g>&gt;"</string>
-    <string name="invalid_recipient_message">"Zprávu nelze doručit, opravte zadané údaje příjemců."</string>
-    <string name="cannot_send_message">"Zprávu nelze odeslat"</string>
-    <string name="cannot_send_message_reason">"Zpráva nemá žádné platné příjemce."</string>
-    <string name="cannot_forward_drm_obj">"Objekt DRM obsažený ve zprávě nelze přeposlat."</string>
-    <string name="converting_to_picture_message">"Převádění na zprávu MMS..."</string>
-    <string name="converting_to_text_message">"Převádění na zprávu SMS..."</string>
-    <string name="cannot_add_slide_anymore">"Další snímky nelze přidat."</string>
-    <string name="cannot_save_message">"Zprávu se nepodařilo uložit."</string>
-    <string name="cannot_load_message">"Zprávu nelze načíst."</string>
-    <string name="message_saved_as_draft">"Zpráva byla uložena jako koncept."</string>
-    <string name="cannot_play_audio">"Zvuk nelze přehrát."</string>
-    <string name="preview">"Náhled"</string>
-    <string name="preview_slideshow">"Náhled"</string>
-    <string name="replace_image">"Nahradit fotografii"</string>
-    <string name="duration_sec">"Trvání (<xliff:g id="DURATION">%s</xliff:g> s)"</string>
-    <string name="duration_selector_title">"Doba trvání snímku"</string>
-    <string name="layout_selector_title">"Rozložení prezentace"</string>
-    <string name="layout_top">"Rozložení (nahoře)"</string>
-    <string name="layout_bottom">"Rozložení (dole)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"Zadejte text nebo nechte prázdné."</string>
-    <string name="secs">"s"</string>
-  <string-array name="select_dialog_items">
-    <item>"1 sekunda"</item>
-    <item>"2 sekundy"</item>
-    <item>"3 sekundy"</item>
-    <item>"4 sekundy"</item>
-    <item>"5 sekund"</item>
-    <item>"6 sekund"</item>
-    <item>"7 sekund"</item>
-    <item>"8 sekund"</item>
-    <item>"9 sekund"</item>
-    <item>"10 sekund"</item>
-    <item>"Jiná..."</item>
-  </string-array>
-    <string name="menu_view_contact">"Zobrazit kontakt"</string>
-    <string name="menu_add_to_contacts">"Přidat mezi Kontakty"</string>
-    <string name="hidden_sender_address">"Adresa skrytého odesílatele"</string>
-    <string name="yes">"OK"</string>
-    <string name="no">"Zrušit"</string>
-    <string name="play">"Přehrát"</string>
-    <string name="edit">"Upravit"</string>
-    <string name="resize">"Přizpůsobit velikost"</string>
-    <string name="try_to_send">"Pokusit se odeslat"</string>
-    <string name="preferences_title">"Nastavení"</string>
-    <string name="restore_default">"Obnovit výchozí nastavení"</string>
-    <string name="pref_notification_settings_title">"Nastavení oznámení"</string>
-    <string name="pref_mms_settings_title">"Nastavení MMS"</string>
-    <string name="pref_sms_settings_title">"Nastavení SMS"</string>
-    <string name="pref_summary_manage_sim_messages">"Umožňuje spravovat zprávy uložené na kartě SIM"</string>
-    <string name="pref_summary_mms_delivery_reports">"Potvrzení o doručení je vyžadováno pro každou odeslanou zprávu"</string>
-    <string name="pref_summary_mms_read_reports">"Potvrzení o přečtení je vyžadováno pro každou odeslanou zprávu"</string>
-    <string name="pref_summary_sms_delivery_reports">"Potvrzení o doručení je vyžadováno pro každou odeslanou zprávu"</string>
-    <string name="pref_title_manage_sim_messages">"Správa zpráv na kartě SIM"</string>
-    <string name="pref_title_mms_delivery_reports">"Potvrzení o doručení"</string>
-    <string name="pref_title_mms_read_reports">"Potvrzení o přečtení"</string>
-    <string name="pref_title_sms_delivery_reports">"Potvrzení o doručení"</string>
-    <string name="pref_title_notification_enabled">"Oznámení"</string>
-    <string name="pref_summary_notification_enabled">"Zobrazuje oznámení o zprávě na stavovém řádku"</string>
-    <string name="pref_title_notification_vibrate">"Vibrace"</string>
-    <string name="pref_summary_notification_vibrate">"Oznámení je provázeno vibracemi"</string>
-    <string name="pref_title_notification_ringtone">"Vybrat vyzváněcí tón"</string>
-    <string name="pref_title_mms_auto_retrieval">"Automatické načítání"</string>
-    <string name="pref_summary_mms_auto_retrieval">"Automaticky načítat zprávy"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"Automatické načítání při roamingu"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"Zprávy jsou automaticky načítány i při roamingu"</string>
-    <string name="to_label">"Komu:"</string>
-    <string name="confirm_dialog_title">"Smazat"</string>
-    <string name="confirm_delete_conversation">"Celá konverzace bude smazána."</string>
-    <string name="confirm_delete_all_conversations">"Všechny konverzace budou smazány."</string>
-    <string name="confirm_delete_message">"Zpráva bude smazána."</string>
-    <string name="confirm_delete_all_messages">"Celá konverzace bude smazána."</string>
-    <string name="confirm_delete_all_SIM_messages">"Všechny zprávy na kartě SIM budou smazány."</string>
-    <string name="cannot_get_details">"Podrobnosti se nepodařilo zobrazit."</string>
-    <string name="message_details_title">"Podrobnosti zprávy"</string>
-    <string name="message_type_label">"Typ:"</string>
-    <string name="text_message">"Zpráva SMS"</string>
-    <string name="multimedia_message">"Zpráva MMS"</string>
-    <string name="multimedia_notification">"Oznamování MMS"</string>
-    <string name="from_label">"Od:"</string>
-    <string name="to_address_label">"Komu:"</string>
-    <string name="bcc_label">"Skrytá kopie:"</string>
-    <string name="sent_label">"Odesláno:"</string>
-    <string name="received_label">"Přijato:"</string>
-    <string name="saved_label">"Uloženo:"</string>
-    <string name="subject_label">"Předmět:"</string>
-    <string name="message_size_label">"Velikost zprávy:"</string>
-    <string name="priority_label">"Priorita:"</string>
-    <string name="priority_high">"Vysoká"</string>
-    <string name="priority_normal">"Běžná"</string>
-    <string name="priority_low">"Nízká"</string>
-    <string name="message_class_label">"Třída zprávy:"</string>
-    <string name="menu_edit">"Upravit"</string>
-    <string name="menu_retry_sending">"Odeslat znovu"</string>
-    <string name="menu_retry_sending_all">"Odeslat znovu všechny"</string>
-    <string name="menu_delete_messages">"Smazat zprávy"</string>
-    <string name="retrying_dialog_body">"Zprávu <xliff:g id="MESSAGE">%s</xliff:g> se nepodařilo odeslat kvůli potížím s připojením."\n"Další pokus..."</string>
-    <string name="sim_copy_to_phone_memory">"Kopírovat do paměti telefonu"</string>
-    <string name="sim_delete">"Smazat"</string>
-    <string name="sim_manage_messages_title">"Zprávy SMS na kartě SIM"</string>
-    <string name="sim_view">"Zobrazit"</string>
-    <string name="sim_empty">"Na kartě SIM nejsou žádné zprávy."</string>
-    <string name="delivery_header_title">"Potvrzení"</string>
-    <string name="status_none">"(Není)"</string>
-    <string name="status_pending">"Čeká na vyřízení"</string>
-    <string name="status_read">"Přečtena"</string>
-    <string name="status_received">"Přijato"</string>
-    <string name="status_failed">"Nedoručeno"</string>
-    <string name="status_unread">"Nepřečtena"</string>
-    <string name="status_rejected">"Odmítnuta"</string>
-    <string name="recipient_label">"Příjemce:"</string>
-    <string name="status_label">"Stav:"</string>
-    <string name="attach_image">"Fotografie"</string>
-    <string name="attach_take_photo">"Fotografovat"</string>
-    <string name="attach_video">"Videa"</string>
-    <string name="attach_record_video">"Natočit video"</string>
-    <string name="attach_sound">"Zvuk"</string>
-    <string name="attach_record_sound">"Nahrát zvuk"</string>
-    <string name="attach_slideshow">"Prezentace"</string>
-    <string name="select_bottom_text">"Dolní text"</string>
-    <string name="select_top_text">"Horní text"</string>
-    <string name="notification_multiple">"Nepřečtené zprávy: <xliff:g id="COUNT">%s</xliff:g>."</string>
-    <string name="notification_multiple_title">"Nové zprávy"</string>
-    <string name="sim_full_title">"Paměť karty SIM je plná"</string>
-    <string name="sim_full_body">"Smažte některé zprávy a vytvořte tak místo pro nové."</string>
-    <string name="type_audio">"zvuk"</string>
-    <string name="type_picture">"fotografie"</string>
-    <string name="type_video">"video"</string>
-    <string name="confirm">"Potvrdit"</string>
-    <string name="message_send_read_report">"Bude odesláno potvrzení o přečtení."</string>
-    <string name="message_queued">"Momentálně nelze zprávu odeslat. Zpráva bude odeslána, jakmile bude služba dostupná."</string>
-    <string name="no_subject">"(Předmět neuveden)"</string>
-    <string name="unknown_sender">"Neznámý odesílatel"</string>
-    <string name="dl_failure_notification">"Stažení zprávy <xliff:g id="SUBJECT">%s</xliff:g> od uživatele <xliff:g id="FROM">%s</xliff:g> se nezdařilo."</string>
-    <string name="rate_limit_surpassed">"Potvrdit"</string>
-    <string name="confirm_rate_limit">"Odesílá se velký počet zpráv MMS. Je to v pořádku?"</string>
-    <string name="message_download_failed_title">"Zprávu se nepodařilo stáhnout"</string>
-    <string name="message_send_failed_title">"Zprávu se nepodařilo odeslat"</string>
-    <string name="message_failed_body">"Zvolte možnost zkontrolovat zprávu a pokuste se ji odeslat znovu."</string>
-    <string name="download_later">"Zprávy momentálně nelze stáhnout. Zkuste to prosím znovu později."</string>
-    <string name="select_audio">"Vybrat zvuk"</string>
-    <string name="copy_to_sdcard">"Kopírovat přílohu na kartu SD"</string>
-    <string name="copy_to_sdcard_success">"Příloha byla zkopírována na kartu SD"</string>
-    <string name="copy_to_sdcard_fail">"Přílohu se na kartu SD nepodařilo zkopírovat"</string>
-    <string name="menu_insert_smiley">"Vložit smajlík"</string>
-    <string name="select_link_title">"Výběr akce"</string>
-</resources>
diff --git a/res/values-de/arrays.xml b/res/values-de/arrays.xml
deleted file mode 100644
index 3d1141b..0000000
--- a/res/values-de/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"Glücklich"</item>
-    <item>"Traurig"</item>
-    <item>"Zwinkern"</item>
-    <item>"Herausgestreckte Zunge"</item>
-    <item>"Überrascht"</item>
-    <item>"Kuss"</item>
-    <item>"Schreien"</item>
-    <item>"Cool"</item>
-    <item>"Worten sollen Taten folgen"</item>
-    <item>"Ins Fettnäpfchen getreten"</item>
-    <item>"Peinlich berührt"</item>
-    <item>"Engel"</item>
-    <item>"Unentschlossen"</item>
-    <item>"Weinen"</item>
-    <item>"Versiegelte Lippen"</item>
-    <item>"Lachen"</item>
-    <item>"Verwirrt"</item>
-  </string-array>
-</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
deleted file mode 100644
index eafda0e..0000000
--- a/res/values-de/strings.xml
+++ /dev/null
@@ -1,243 +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="app_label">"SMS/MMS"</string>
-    <string name="new_message">"Neue Nachricht"</string>
-    <string name="create_new_message">"Neue Nachricht schreiben"</string>
-    <string name="menu_call_back">"<xliff:g id="NAME">%s</xliff:g> anrufen"</string>
-    <string name="menu_send_email">"E-Mail an <xliff:g id="NAME">%s</xliff:g> senden"</string>
-    <string name="menu_compose_new">"Schreiben"</string>
-    <string name="menu_preferences">"Einstellungen"</string>
-    <string name="menu_add_address_to_contacts">"<xliff:g id="NAME">%s</xliff:g> zu Kontakten hinzufügen"</string>
-    <string name="menu_call">"Anrufen"</string>
-    <string name="menu_delete_all">"Threads löschen"</string>
-    <string name="menu_delete">"Löschen"</string>
-    <string name="menu_undelivered_messages">"Nicht gelieferte Nachrichten"</string>
-    <string name="menu_view">"Anzeigen"</string>
-    <string name="refreshing">"Aktualisierung wird ausgeführt..."</string>
-    <string name="has_draft">"Entwurf"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"Anonym"</string>
-    <string name="no_subject_view">"(Kein Betreff)"</string>
-    <string name="messagelist_sender_self">"Ich"</string>
-    <string name="view_picture">"Bild anzeigen"</string>
-    <string name="view_slideshow">"Diashow anzeigen"</string>
-    <string name="view_message_details">"Nachrichtendetails anzeigen"</string>
-    <string name="view_delivery_report">"Bericht anzeigen"</string>
-    <string name="delete_message">"Nachricht löschen"</string>
-    <string name="sent_on">"Gesendet: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"Ablaufdatum: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"KB"</string>
-    <string name="undelivered_msg_dialog_title">"Nicht gelieferte Nachricht"</string>
-    <string name="undelivered_msg_dialog_body">"Senden der Nachricht nicht möglich."\n"Anzahl bisheriger Versuche: <xliff:g id="MESSAGE">%s</xliff:g>."</string>
-    <string name="undelivered_sms_dialog_body">"Nachricht kann nicht gesendet werden."</string>
-    <string name="delete_thread">"Thread löschen"</string>
-    <string name="menu_forward">"Senden"</string>
-    <string name="download">"Herunterladen"</string>
-    <string name="downloading">"Ladevorgang wird ausgeführt"</string>
-    <string name="inline_subject">"&lt;Betreff: <xliff:g id="SUBJECT">%s</xliff:g>&gt;"</string>
-    <string name="drm_protected_text">"* DRM-geschützter Text *"</string>
-    <string name="insufficient_drm_rights">"Nicht ausreichende DRM-Rechte ermittelt."</string>
-    <string name="copy_message_text">"Nachrichtentext kopieren"</string>
-    <string name="message_options">"Nachrichtenoptionen"</string>
-    <string name="done">"Fertig"</string>
-    <string name="move_up">"Nach oben verschieben"</string>
-    <string name="move_down">"Nach unten verschieben"</string>
-    <string name="remove_slide">"Dia entfernen"</string>
-    <string name="add_slide">"Dia hinzufügen"</string>
-    <string name="add_slide_hint">"Wählen Sie diese Option, um ein neues Dia zu erstellen."</string>
-    <string name="discard_slideshow">"Diashow verwerfen"</string>
-    <string name="remove_text">"Text entfernen"</string>
-    <string name="add_picture">"Bild hinzufügen"</string>
-    <string name="remove_picture">"Bild entfernen"</string>
-    <string name="add_music">"Musik hinzufügen"</string>
-    <string name="remove_music">"Musik entfernen"</string>
-    <string name="add_video">"Video hinzufügen"</string>
-    <string name="remove_video">"Video entfernen"</string>
-    <string name="compose_title">"Schreiben"</string>
-    <string name="to_hint">"An"</string>
-    <string name="subject_hint">"Betreff"</string>
-    <string name="add_attachment">"Anhängen"</string>
-    <string name="add_subject">"Betreff hinzufügen"</string>
-    <string name="discard">"Verwerfen"</string>
-    <string name="view">"Anzeigen"</string>
-    <string name="replace">"Ersetzen"</string>
-    <string name="remove">"Entfernen"</string>
-    <string name="send">"Senden"</string>
-    <string name="all_threads">"Alle Threads"</string>
-    <string name="type_to_compose_text_enter_to_send">"Geben Sie den gewünschten Text ein und drücken Sie zum Senden die Eingabetaste."</string>
-    <string name="open_keyboard_to_compose_message">"Tastatur herausziehen, um Nachricht zu schreiben"</string>
-    <string name="image_too_large">"Bild zu groß"</string>
-    <string name="ask_for_automatically_resize">"Bildgröße vor dem Senden automatisch anpassen?"</string>
-    <string name="compressing">"Komprimierung wird ausgeführt..."</string>
-    <string name="unsupported_media_format">"Format von <xliff:g id="NAME">%1$s</xliff:g> wird nicht unterstützt."</string>
-    <string name="select_different_media">"Wählen Sie ein anderes Element als <xliff:g id="NAME">%1$s</xliff:g> aus."</string>
-    <string name="exceed_message_size_limitation">"Maximale Nachrichtengröße erreicht"</string>
-    <string name="failed_to_add_media">"<xliff:g id="NAME">%1$s</xliff:g> kann nicht zur Nachricht hinzugefügt werden."</string>
-    <string name="failed_to_resize_image">"Bildgröße nicht angepasst."</string>
-    <string name="resize_image_error_information">"Das Bild ist trotz Größenanpassung zu groß zum Senden."</string>
-    <string name="forward_prefix">"WG:"</string>
-    <string name="discard_message">"Verwerfen"</string>
-    <string name="discard_message_reason">"Die Nachricht wird verworfen, da keine gültigen Empfänger für sie vorhanden sind."</string>
-    <string name="has_invalid_recipient">"Ungültige Empfänger: &lt;<xliff:g id="NAME">%1$s</xliff:g>&gt;"</string>
-    <string name="invalid_recipient_message">"Korrigieren Sie die Empfänger, da sie die Nachricht sonst nicht empfangen können."</string>
-    <string name="cannot_send_message">"Nachricht kann nicht gesendet werden."</string>
-    <string name="cannot_send_message_reason">"Für die Nachricht sind keine gültigen Empfänger vorhanden."</string>
-    <string name="cannot_forward_drm_obj">"Das in der Nachricht enthaltene DRM-Objekt kann nicht weitergeleitet werden."</string>
-    <string name="converting_to_picture_message">"Konvertierung in MMS-Nachricht wird ausgeführt..."</string>
-    <string name="converting_to_text_message">"Konvertierung in SMS-Nachricht wird ausgeführt..."</string>
-    <string name="cannot_add_slide_anymore">"Es können keine weiteren Dias hinzugefügt werden."</string>
-    <string name="cannot_save_message">"Nachricht kann nicht gespeichert werden."</string>
-    <string name="cannot_load_message">"Nachricht kann nicht geladen werden."</string>
-    <string name="message_saved_as_draft">"Nachricht als Entwurf gespeichert"</string>
-    <string name="cannot_play_audio">"Audio kann nicht wiedergegeben werden."</string>
-    <string name="preview">"Vorschau"</string>
-    <string name="preview_slideshow">"Vorschau"</string>
-    <string name="replace_image">"Bild ersetzen"</string>
-    <string name="duration_sec">"Dauer (<xliff:g id="DURATION">%s</xliff:g> s)"</string>
-    <string name="duration_selector_title">"Dauer für Dia"</string>
-    <string name="layout_selector_title">"Layout der Diashow"</string>
-    <string name="layout_top">"Layout (oben)"</string>
-    <string name="layout_bottom">"Layout (unten)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"Geben Sie einen Text ein oder lassen Sie das Feld leer."</string>
-    <string name="secs">"s"</string>
-  <string-array name="select_dialog_items">
-    <item>"1 Sekunde"</item>
-    <item>"2 Sekunden"</item>
-    <item>"3 Sekunden"</item>
-    <item>"4 Sekunden"</item>
-    <item>"5 Sekunden"</item>
-    <item>"6 Sekunden"</item>
-    <item>"7 Sekunden"</item>
-    <item>"8 Sekunden"</item>
-    <item>"9 Sekunden"</item>
-    <item>"10 Sekunden"</item>
-    <item>"Weitere..."</item>
-  </string-array>
-    <string name="menu_view_contact">"Kontakt anzeigen"</string>
-    <string name="menu_add_to_contacts">"Zu Kontakten hinzufügen"</string>
-    <string name="hidden_sender_address">"Ausgeblendete Senderadresse"</string>
-    <string name="yes">"OK"</string>
-    <string name="no">"Abbrechen"</string>
-    <string name="play">"Wiedergeben"</string>
-    <string name="edit">"Bearbeiten"</string>
-    <string name="resize">"Größe anpassen"</string>
-    <string name="try_to_send">"Sendeversuch starten"</string>
-    <string name="preferences_title">"Einstellungen"</string>
-    <string name="restore_default">"Standardeinstellungen wiederherstellen"</string>
-    <string name="pref_notification_settings_title">"Benachrichtigungseinstellungen"</string>
-    <string name="pref_mms_settings_title">"MMS-Einstellungen"</string>
-    <string name="pref_sms_settings_title">"SMS-Einstellungen"</string>
-    <string name="pref_summary_manage_sim_messages">"Auf der SIM-Karte gespeicherte Nachrichten verwalten"</string>
-    <string name="pref_summary_mms_delivery_reports">"Zustellbestätigung für jede gesendete Nachricht anfordern"</string>
-    <string name="pref_summary_mms_read_reports">"Lesebestätigung für jede gesendete Nachricht anfordern"</string>
-    <string name="pref_summary_sms_delivery_reports">"Zustellbestätigung für jede gesendete Nachricht anfordern"</string>
-    <string name="pref_title_manage_sim_messages">"Nachrichten auf SIM-Karte"</string>
-    <string name="pref_title_mms_delivery_reports">"Zustellberichte"</string>
-    <string name="pref_title_mms_read_reports">"Berichte lesen"</string>
-    <string name="pref_title_sms_delivery_reports">"Zustellberichte"</string>
-    <string name="pref_title_notification_enabled">"Benachrichtigungen"</string>
-    <string name="pref_summary_notification_enabled">"Bei Nachrichteneingang Benachrichtigung in Statuszeile anzeigen"</string>
-    <string name="pref_title_notification_vibrate">"Vibrieren"</string>
-    <string name="pref_summary_notification_vibrate">"Bei Benachrichtigung vibrieren"</string>
-    <string name="pref_title_notification_ringtone">"Klingelton auswählen"</string>
-    <string name="pref_title_mms_auto_retrieval">"Automatisch abrufen"</string>
-    <string name="pref_summary_mms_auto_retrieval">"Nachrichten automatisch empfangen"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"Autom. Roaming-Abruf"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"Bei Roaming Nachrichten automatisch abrufen"</string>
-    <string name="to_label">"An"</string>
-    <string name="confirm_dialog_title">"Löschen"</string>
-    <string name="confirm_delete_conversation">"Der gesamte Thread wird gelöscht."</string>
-    <string name="confirm_delete_all_conversations">"Alle Threads werden gelöscht."</string>
-    <string name="confirm_delete_message">"Die Nachricht wird gelöscht."</string>
-    <string name="confirm_delete_all_messages">"Der gesamte Thread wird gelöscht."</string>
-    <string name="confirm_delete_all_SIM_messages">"Alle Nachrichten auf der SIM werden gelöscht."</string>
-    <string name="cannot_get_details">"Details nicht abrufbar"</string>
-    <string name="message_details_title">"Nachrichtendetails"</string>
-    <string name="message_type_label">"Typ:"</string>
-    <string name="text_message">"SMS-Nachricht"</string>
-    <string name="multimedia_message">"MMS-Nachricht"</string>
-    <string name="multimedia_notification">"MMS-Benachrichtigung"</string>
-    <string name="from_label">"Von:"</string>
-    <string name="to_address_label">"An:"</string>
-    <string name="bcc_label">"Bcc:"</string>
-    <string name="sent_label">"Gesendet:"</string>
-    <string name="received_label">"Empfangen:"</string>
-    <string name="saved_label">"Gespeichert:"</string>
-    <string name="subject_label">"Betreff:"</string>
-    <string name="message_size_label">"Nachrichtengröße:"</string>
-    <string name="priority_label">"Priorität:"</string>
-    <string name="priority_high">"Hoch"</string>
-    <string name="priority_normal">"Normal"</string>
-    <string name="priority_low">"Niedrig"</string>
-    <string name="message_class_label">"Nachrichtenklasse:"</string>
-    <string name="menu_edit">"Bearbeiten"</string>
-    <string name="menu_retry_sending">"Senden erneut versuchen"</string>
-    <string name="menu_retry_sending_all">"Erneut versuchen, alle zu senden"</string>
-    <string name="menu_delete_messages">"Nachrichten löschen"</string>
-    <string name="retrying_dialog_body">"Nachricht <xliff:g id="MESSAGE">%s</xliff:g> wurde aufgrund eines Verbindungsproblems nicht gesendet. "\n"Erneuter Sendeversuch wird ausgeführt..."</string>
-    <string name="sim_copy_to_phone_memory">"In Telefonspeicher kopieren"</string>
-    <string name="sim_delete">"Löschen"</string>
-    <string name="sim_manage_messages_title">"Auf SIM-Karte gespeicherte SMS-Nachrichten"</string>
-    <string name="sim_view">"Anzeigen"</string>
-    <string name="sim_empty">"Keine Nachrichten auf der SIM-Karte"</string>
-    <string name="delivery_header_title">"Bericht"</string>
-    <string name="status_none">"(Keine)"</string>
-    <string name="status_pending">"Ausstehend"</string>
-    <string name="status_read">"Lesen"</string>
-    <string name="status_received">"Empfangen"</string>
-    <string name="status_failed">"Nicht erfolgreich"</string>
-    <string name="status_unread">"Ungelesen"</string>
-    <string name="status_rejected">"Zurückgewiesen"</string>
-    <string name="recipient_label">"Empfänger:"</string>
-    <string name="status_label">"Status:"</string>
-    <string name="attach_image">"Bilder"</string>
-    <string name="attach_take_photo">"Bild aufnehmen"</string>
-    <string name="attach_video">"Videos"</string>
-    <string name="attach_record_video">"Video aufnehmen"</string>
-    <string name="attach_sound">"Audio"</string>
-    <string name="attach_record_sound">"Audio aufnehmen"</string>
-    <string name="attach_slideshow">"Diashow"</string>
-    <string name="select_bottom_text">"Text unten"</string>
-    <string name="select_top_text">"Text oben"</string>
-    <string name="notification_multiple">"<xliff:g id="COUNT">%s</xliff:g> ungelesene Nachrichten"</string>
-    <string name="notification_multiple_title">"Neue Nachrichten"</string>
-    <string name="sim_full_title">"SIM-Karte ist voll."</string>
-    <string name="sim_full_body">"Löschen Sie einige Nachrichten, um Platz für weitere Nachrichten zu schaffen."</string>
-    <string name="type_audio">"Audio"</string>
-    <string name="type_picture">"Bild"</string>
-    <string name="type_video">"Video"</string>
-    <string name="confirm">"Bestätigen"</string>
-    <string name="message_send_read_report">"Eine Lesebestätigung wird gesendet."</string>
-    <string name="message_queued">"Senden der Nachricht derzeit nicht möglich. Sie wird gesendet, sobald der Service verfügbar ist."</string>
-    <string name="no_subject">"(Kein Betreff)"</string>
-    <string name="unknown_sender">"Unbekannter Sender"</string>
-    <string name="dl_failure_notification">"Nachricht <xliff:g id="SUBJECT">%s</xliff:g> von <xliff:g id="FROM">%s</xliff:g> konnte nicht heruntergeladen werden."</string>
-    <string name="rate_limit_surpassed">"Bestätigen"</string>
-    <string name="confirm_rate_limit">"Es werden mehrere Multimedia-Nachrichten gesendet. Möchten Sie fortfahren?"</string>
-    <string name="message_download_failed_title">"Nachricht nicht heruntergeladen"</string>
-    <string name="message_send_failed_title">"Nachricht nicht gesendet"</string>
-    <string name="message_failed_body">"Überprüfen Sie die Nachricht und versuchen Sie es erneut."</string>
-    <string name="download_later">"Herunterladen derzeit nicht möglich. Bitte versuchen Sie es später erneut."</string>
-    <string name="select_audio">"Audio auswählen"</string>
-    <string name="copy_to_sdcard">"Anhang auf SD-Karte kopieren"</string>
-    <string name="copy_to_sdcard_success">"Anhang auf SD-Karte kopiert"</string>
-    <string name="copy_to_sdcard_fail">"Kopieren von Anhang auf SD-Karte fehlgeschlagen"</string>
-    <string name="menu_insert_smiley">"Smiley einfügen"</string>
-    <string name="select_link_title">"Aktion auswählen"</string>
-</resources>
diff --git a/res/values-es/arrays.xml b/res/values-es/arrays.xml
deleted file mode 100644
index f07a0d0..0000000
--- a/res/values-es/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"Feliz"</item>
-    <item>"Triste"</item>
-    <item>"Guiñando"</item>
-    <item>"Sacando la lengua"</item>
-    <item>"Sorprendido"</item>
-    <item>"Besando"</item>
-    <item>"Gritando"</item>
-    <item>"Atractivo"</item>
-    <item>"Dinero en la boca"</item>
-    <item>"Metedura de pata"</item>
-    <item>"Avergonzado"</item>
-    <item>"Ángel"</item>
-    <item>"Indeciso"</item>
-    <item>"Llorando"</item>
-    <item>"Labios sellados"</item>
-    <item>"Riendo"</item>
-    <item>"Confuso"</item>
-  </string-array>
-</resources>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
deleted file mode 100644
index 519528f..0000000
--- a/res/values-es/strings.xml
+++ /dev/null
@@ -1,243 +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="app_label">"Mensajes"</string>
-    <string name="new_message">"Mensaje nuevo"</string>
-    <string name="create_new_message">"Redactar mensaje nuevo"</string>
-    <string name="menu_call_back">"Llamar a <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_send_email">"Enviar mensaje a <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_compose_new">"Redactar"</string>
-    <string name="menu_preferences">"Ajustes"</string>
-    <string name="menu_add_address_to_contacts">"Añadir <xliff:g id="NAME">%s</xliff:g> a contactos"</string>
-    <string name="menu_call">"Llamar"</string>
-    <string name="menu_delete_all">"Eliminar cadenas"</string>
-    <string name="menu_delete">"Suprimir"</string>
-    <string name="menu_undelivered_messages">"Mensajes no entregados"</string>
-    <string name="menu_view">"Ver"</string>
-    <string name="refreshing">"Actualizando..."</string>
-    <string name="has_draft">"Borrador"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"Anónimo"</string>
-    <string name="no_subject_view">"(Sin asunto)"</string>
-    <string name="messagelist_sender_self">"Yo"</string>
-    <string name="view_picture">"Ver imagen"</string>
-    <string name="view_slideshow">"Ver presentación"</string>
-    <string name="view_message_details">"Ver detalles de mensaje"</string>
-    <string name="view_delivery_report">"Ver informe"</string>
-    <string name="delete_message">"Eliminar mensaje"</string>
-    <string name="sent_on">"Enviado: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"Caducidad: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"KB"</string>
-    <string name="undelivered_msg_dialog_title">"Mensaje no entregado"</string>
-    <string name="undelivered_msg_dialog_body">"No ha sido posible enviar el mensaje."\n"Último intento: <xliff:g id="MESSAGE">%s</xliff:g>."</string>
-    <string name="undelivered_sms_dialog_body">"No ha sido posible enviar el mensaje."</string>
-    <string name="delete_thread">"Eliminar cadena"</string>
-    <string name="menu_forward">"Reenviar"</string>
-    <string name="download">"Descargar"</string>
-    <string name="downloading">"Descargando..."</string>
-    <string name="inline_subject">"&lt;Asunto: <xliff:g id="SUBJECT">%s</xliff:g>&gt;"</string>
-    <string name="drm_protected_text">"* texto protegido por DRM *"</string>
-    <string name="insufficient_drm_rights">"Derechos DRM insuficientes"</string>
-    <string name="copy_message_text">"Copiar texto del mensaje"</string>
-    <string name="message_options">"Opciones del mensaje"</string>
-    <string name="done">"Hecho"</string>
-    <string name="move_up">"Mover arriba"</string>
-    <string name="move_down">"Mover abajo"</string>
-    <string name="remove_slide">"Eliminar diapositiva"</string>
-    <string name="add_slide">"Añadir diapositiva"</string>
-    <string name="add_slide_hint">"Selecciona esta opción para crear una diapositiva nueva."</string>
-    <string name="discard_slideshow">"Descartar presentación"</string>
-    <string name="remove_text">"Eliminar texto"</string>
-    <string name="add_picture">"Añadir imagen"</string>
-    <string name="remove_picture">"Eliminar imagen"</string>
-    <string name="add_music">"Añadir música"</string>
-    <string name="remove_music">"Eliminar música"</string>
-    <string name="add_video">"Añadir vídeo"</string>
-    <string name="remove_video">"Eliminar vídeo"</string>
-    <string name="compose_title">"Redactar"</string>
-    <string name="to_hint">"Para"</string>
-    <string name="subject_hint">"Asunto"</string>
-    <string name="add_attachment">"Adjuntar"</string>
-    <string name="add_subject">"Añadir asunto"</string>
-    <string name="discard">"Descartar"</string>
-    <string name="view">"Ver"</string>
-    <string name="replace">"Sustituir"</string>
-    <string name="remove">"Eliminar"</string>
-    <string name="send">"Enviar"</string>
-    <string name="all_threads">"Todas las cadenas"</string>
-    <string name="type_to_compose_text_enter_to_send">"Escribe el texto del mensaje y pulsa Intro para enviarlo."</string>
-    <string name="open_keyboard_to_compose_message">"Abre el teclado para redactar el mensaje."</string>
-    <string name="image_too_large">"Imagen demasiado grande"</string>
-    <string name="ask_for_automatically_resize">"¿Quieres ajustar el tamaño de la imagen antes de enviarla?"</string>
-    <string name="compressing">"Comprimiendo..."</string>
-    <string name="unsupported_media_format">"Formato de <xliff:g id="NAME">%1$s</xliff:g> no admitido"</string>
-    <string name="select_different_media">"Selecciona un/a <xliff:g id="NAME">%1$s</xliff:g> diferente."</string>
-    <string name="exceed_message_size_limitation">"Se ha alcanzado el límite de tamaño del mensaje."</string>
-    <string name="failed_to_add_media">"No puedes añadir <xliff:g id="NAME">%1$s</xliff:g> al mensaje."</string>
-    <string name="failed_to_resize_image">"No se ha podido ajustar el tamaño de la imagen."</string>
-    <string name="resize_image_error_information">"Esta imagen es demasiado grande para enviarla aunque se ajuste su tamaño."</string>
-    <string name="forward_prefix">"Fwd:"</string>
-    <string name="discard_message">"Descartar"</string>
-    <string name="discard_message_reason">"El mensaje se descartará porque los destinatarios no son válidos."</string>
-    <string name="has_invalid_recipient">"Destinatarios no válidos: &lt;<xliff:g id="NAME">%1$s</xliff:g>&gt;"</string>
-    <string name="invalid_recipient_message">"Corrige la información de destinatarios para que se pueda enviar el mensaje."</string>
-    <string name="cannot_send_message">"No se puede enviar el mensaje."</string>
-    <string name="cannot_send_message_reason">"Los destinatarios del mensaje no son válidos."</string>
-    <string name="cannot_forward_drm_obj">"El objeto DRM incluido en el mensaje no se puede reenviar."</string>
-    <string name="converting_to_picture_message">"Convirtiendo en mensaje MMS..."</string>
-    <string name="converting_to_text_message">"Convirtiendo en mensaje SMS..."</string>
-    <string name="cannot_add_slide_anymore">"No se pueden añadir más diapositivas."</string>
-    <string name="cannot_save_message">"No se puede guardar el mensaje."</string>
-    <string name="cannot_load_message">"No se puede cargar el mensaje."</string>
-    <string name="message_saved_as_draft">"Mensaje guardado como borrador"</string>
-    <string name="cannot_play_audio">"No se puede reproducir el audio."</string>
-    <string name="preview">"Vista previa"</string>
-    <string name="preview_slideshow">"Vista previa"</string>
-    <string name="replace_image">"Sustituir imagen"</string>
-    <string name="duration_sec">"Duración (<xliff:g id="DURATION">%s</xliff:g> segundos)"</string>
-    <string name="duration_selector_title">"Duración de la diapositiva"</string>
-    <string name="layout_selector_title">"Diseño de presentación"</string>
-    <string name="layout_top">"Diseño (arriba)"</string>
-    <string name="layout_bottom">"Diseño (abajo)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"Introduce algún texto o deja el campo vacío."</string>
-    <string name="secs">"s"</string>
-  <string-array name="select_dialog_items">
-    <item>"1 segundo"</item>
-    <item>"2 segundos"</item>
-    <item>"3 segundos"</item>
-    <item>"4 segundos"</item>
-    <item>"5 segundos"</item>
-    <item>"6 segundos"</item>
-    <item>"7 segundos"</item>
-    <item>"8 segundos"</item>
-    <item>"9 segundos"</item>
-    <item>"10 segundos"</item>
-    <item>"Otra..."</item>
-  </string-array>
-    <string name="menu_view_contact">"Ver contacto"</string>
-    <string name="menu_add_to_contacts">"Añadir a contactos"</string>
-    <string name="hidden_sender_address">"Dirección de remitente oculta"</string>
-    <string name="yes">"Aceptar"</string>
-    <string name="no">"Cancelar"</string>
-    <string name="play">"Reproducir"</string>
-    <string name="edit">"Editar"</string>
-    <string name="resize">"Ajustar tamaño"</string>
-    <string name="try_to_send">"Intentar envío"</string>
-    <string name="preferences_title">"Ajustes"</string>
-    <string name="restore_default">"Restaurar configuración predeterminada"</string>
-    <string name="pref_notification_settings_title">"Configuración de notificaciones"</string>
-    <string name="pref_mms_settings_title">"Configuración de MMS"</string>
-    <string name="pref_sms_settings_title">"Configuración de SMS"</string>
-    <string name="pref_summary_manage_sim_messages">"Administrar mensajes almacenados en la tarjeta SIM"</string>
-    <string name="pref_summary_mms_delivery_reports">"Solicitar un informe de entrega cada vez que se envíe un mensaje"</string>
-    <string name="pref_summary_mms_read_reports">"Solicitar un informe de mensaje leído cada vez que se envíe un mensaje"</string>
-    <string name="pref_summary_sms_delivery_reports">"Solicitar un informe de entrega cada vez que se envíe un mensaje"</string>
-    <string name="pref_title_manage_sim_messages">"Administrar mensajes de tarjeta SIM"</string>
-    <string name="pref_title_mms_delivery_reports">"Informes de entrega"</string>
-    <string name="pref_title_mms_read_reports">"Informes de mensajes leídos"</string>
-    <string name="pref_title_sms_delivery_reports">"Informes de entrega"</string>
-    <string name="pref_title_notification_enabled">"Notificaciones"</string>
-    <string name="pref_summary_notification_enabled">"Mostrar notificación de mensajes en la barra de estado"</string>
-    <string name="pref_title_notification_vibrate">"Vibración"</string>
-    <string name="pref_summary_notification_vibrate">"Vibrar también al notificar"</string>
-    <string name="pref_title_notification_ringtone">"Seleccionar tono"</string>
-    <string name="pref_title_mms_auto_retrieval">"Recuperar automáticamente"</string>
-    <string name="pref_summary_mms_auto_retrieval">"Recuperar mensajes automáticamente"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"Recuperación automática en itinerancia"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"Recuperar automáticamente mensajes en itinerancia"</string>
-    <string name="to_label">"Para"</string>
-    <string name="confirm_dialog_title">"Suprimir"</string>
-    <string name="confirm_delete_conversation">"Se eliminará toda la cadena."</string>
-    <string name="confirm_delete_all_conversations">"Se eliminarán todas las cadenas."</string>
-    <string name="confirm_delete_message">"Se eliminará el mensaje."</string>
-    <string name="confirm_delete_all_messages">"Se eliminará toda la cadena."</string>
-    <string name="confirm_delete_all_SIM_messages">"Todos los mensajes se eliminarán de la tarjeta SIM."</string>
-    <string name="cannot_get_details">"No se pueden obtener detalles."</string>
-    <string name="message_details_title">"Detalles del mensaje"</string>
-    <string name="message_type_label">"Tipo:"</string>
-    <string name="text_message">"Mensaje SMS"</string>
-    <string name="multimedia_message">"Mensaje MMS"</string>
-    <string name="multimedia_notification">"Notificación MMS"</string>
-    <string name="from_label">"De:"</string>
-    <string name="to_address_label">"Para:"</string>
-    <string name="bcc_label">"CCO:"</string>
-    <string name="sent_label">"Enviado:"</string>
-    <string name="received_label">"Recibido:"</string>
-    <string name="saved_label">"Guardado"</string>
-    <string name="subject_label">"Asunto:"</string>
-    <string name="message_size_label">"Tamaño del mensaje:"</string>
-    <string name="priority_label">"Prioridad:"</string>
-    <string name="priority_high">"Alta"</string>
-    <string name="priority_normal">"Normal"</string>
-    <string name="priority_low">"Baja"</string>
-    <string name="message_class_label">"Clase de mensaje:"</string>
-    <string name="menu_edit">"Editar"</string>
-    <string name="menu_retry_sending">"Reintentar envío"</string>
-    <string name="menu_retry_sending_all">"Reintentar envío de todos"</string>
-    <string name="menu_delete_messages">"Eliminar mensajes"</string>
-    <string name="retrying_dialog_body">"El mensaje \"<xliff:g id="MESSAGE">%s</xliff:g>\" no se ha enviado debido a un problema de conexión."\n"Reintentando envío…"</string>
-    <string name="sim_copy_to_phone_memory">"Copiar a memoria del teléfono"</string>
-    <string name="sim_delete">"Suprimir"</string>
-    <string name="sim_manage_messages_title">"Mensajes SMS de tarjeta SIM"</string>
-    <string name="sim_view">"Ver"</string>
-    <string name="sim_empty">"No hay mensajes en la tarjeta SIM."</string>
-    <string name="delivery_header_title">"Informe"</string>
-    <string name="status_none">"(Ninguno)"</string>
-    <string name="status_pending">"Pendientes"</string>
-    <string name="status_read">"Leídos"</string>
-    <string name="status_received">"Recibido"</string>
-    <string name="status_failed">"Con error"</string>
-    <string name="status_unread">"No leídos"</string>
-    <string name="status_rejected">"Rechazados:"</string>
-    <string name="recipient_label">"Destinatario:"</string>
-    <string name="status_label">"Estado:"</string>
-    <string name="attach_image">"Fotografías"</string>
-    <string name="attach_take_photo">"Capturar imagen"</string>
-    <string name="attach_video">"Vídeos"</string>
-    <string name="attach_record_video">"Capturar vídeo"</string>
-    <string name="attach_sound">"Audio"</string>
-    <string name="attach_record_sound">"Grabar audio"</string>
-    <string name="attach_slideshow">"Presentación"</string>
-    <string name="select_bottom_text">"Texto abajo"</string>
-    <string name="select_top_text">"Texto arriba"</string>
-    <string name="notification_multiple">"<xliff:g id="COUNT">%s</xliff:g> mensajes no leídos"</string>
-    <string name="notification_multiple_title">"Mensajes nuevos"</string>
-    <string name="sim_full_title">"Tarjeta SIM llena"</string>
-    <string name="sim_full_body">"Elimina algunos mensajes para dejar espacio para otros."</string>
-    <string name="type_audio">"audio"</string>
-    <string name="type_picture">"imagen"</string>
-    <string name="type_video">"vídeo"</string>
-    <string name="confirm">"Confirmar"</string>
-    <string name="message_send_read_report">"Se enviará un informe de mensaje leído."</string>
-    <string name="message_queued">"El mensaje no se puede enviar en este momento; se enviará cuando el servicio esté disponible."</string>
-    <string name="no_subject">"(Sin asunto)"</string>
-    <string name="unknown_sender">"Destinatario desconocido"</string>
-    <string name="dl_failure_notification">"El mensaje <xliff:g id="SUBJECT">%s</xliff:g> de <xliff:g id="FROM">%s</xliff:g> no se ha podido descargar correctamente."</string>
-    <string name="rate_limit_surpassed">"Confirmar"</string>
-    <string name="confirm_rate_limit">"Se va a enviar un gran número de mensajes multimedia, ¿estás seguro de que quieres enviarlos?"</string>
-    <string name="message_download_failed_title">"Mensaje no descargado"</string>
-    <string name="message_send_failed_title">"Mensaje no enviado"</string>
-    <string name="message_failed_body">"Selecciona esta opción para revisar el mensaje e intenta enviarlo de nuevo."</string>
-    <string name="download_later">"No es posible descargar los mensajes en este momento. Inténtalo de nuevo más tarde."</string>
-    <string name="select_audio">"Seleccionar audio"</string>
-    <string name="copy_to_sdcard">"Copiar archivo adjunto en tarjeta SD"</string>
-    <string name="copy_to_sdcard_success">"Archivo adjunto copiado en tarjeta SD"</string>
-    <string name="copy_to_sdcard_fail">"Error al copiar archivo adjunto en tarjeta SD"</string>
-    <string name="menu_insert_smiley">"Insertar emoticono"</string>
-    <string name="select_link_title">"Seleccionar acción"</string>
-</resources>
diff --git a/res/values-fr/arrays.xml b/res/values-fr/arrays.xml
deleted file mode 100644
index 2e786bc..0000000
--- a/res/values-fr/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"Content"</item>
-    <item>"Triste"</item>
-    <item>"Clin d\'œil"</item>
-    <item>"Tire la langue"</item>
-    <item>"Surpris"</item>
-    <item>"Bisous"</item>
-    <item>"Crier"</item>
-    <item>"Cool"</item>
-    <item>"Argent"</item>
-    <item>"Embarrassé"</item>
-    <item>"Gêné"</item>
-    <item>"Ange"</item>
-    <item>"Indécis"</item>
-    <item>"Pleure"</item>
-    <item>"Motus et bouche cousue"</item>
-    <item>"Rire"</item>
-    <item>"Confus"</item>
-  </string-array>
-</resources>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
deleted file mode 100644
index aa9a913..0000000
--- a/res/values-fr/strings.xml
+++ /dev/null
@@ -1,243 +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="app_label">"Messages"</string>
-    <string name="new_message">"Nouveau message"</string>
-    <string name="create_new_message">"Composer un nouveau message"</string>
-    <string name="menu_call_back">"Appeler <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_send_email">"Envoyer un e-mail à <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_compose_new">"Composer"</string>
-    <string name="menu_preferences">"Paramètres"</string>
-    <string name="menu_add_address_to_contacts">"Ajouter <xliff:g id="NAME">%s</xliff:g> à mes contacts"</string>
-    <string name="menu_call">"Appeler"</string>
-    <string name="menu_delete_all">"Supprimer les fils de discussion"</string>
-    <string name="menu_delete">"Supprimer"</string>
-    <string name="menu_undelivered_messages">"Messages non transmis"</string>
-    <string name="menu_view">"Afficher"</string>
-    <string name="refreshing">"Actualisation…"</string>
-    <string name="has_draft">"Brouillon"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"Anonyme"</string>
-    <string name="no_subject_view">"(Aucun objet)"</string>
-    <string name="messagelist_sender_self">"Moi"</string>
-    <string name="view_picture">"Afficher l\'image"</string>
-    <string name="view_slideshow">"Voir le diaporama"</string>
-    <string name="view_message_details">"Afficher les détails du message"</string>
-    <string name="view_delivery_report">"Afficher le rapport"</string>
-    <string name="delete_message">"Supprimer le message"</string>
-    <string name="sent_on">"Date d\'envoi : <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"Date d\'expiration : <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"Ko"</string>
-    <string name="undelivered_msg_dialog_title">"Message non transmis"</string>
-    <string name="undelivered_msg_dialog_body">"Impossible d\'envoyer ce message."\n"Dernière tentative :<xliff:g id="MESSAGE">%s</xliff:g>"</string>
-    <string name="undelivered_sms_dialog_body">"Impossible d\'envoyer ce message."</string>
-    <string name="delete_thread">"Supprimer le fil de discussion"</string>
-    <string name="menu_forward">"Transférer"</string>
-    <string name="download">"Télécharger"</string>
-    <string name="downloading">"Téléchargement…"</string>
-    <string name="inline_subject">"&lt;Objet : <xliff:g id="SUBJECT">%s</xliff:g>&gt;"</string>
-    <string name="drm_protected_text">"* Texte protégé par GDN *"</string>
-    <string name="insufficient_drm_rights">"Privilèges GDN insuffisants détectés."</string>
-    <string name="copy_message_text">"Copier le texte du message"</string>
-    <string name="message_options">"Options du message"</string>
-    <string name="done">"OK"</string>
-    <string name="move_up">"Déplacer vers le haut"</string>
-    <string name="move_down">"Déplacer vers le bas"</string>
-    <string name="remove_slide">"Supprimer la diapositive"</string>
-    <string name="add_slide">"Ajouter une diapositive"</string>
-    <string name="add_slide_hint">"Sélectionner cet élément pour créer une nouvelle diapositive."</string>
-    <string name="discard_slideshow">"Supprimer le diaporama"</string>
-    <string name="remove_text">"Supprimer le texte"</string>
-    <string name="add_picture">"Ajouter une image"</string>
-    <string name="remove_picture">"Supprimer l\'image"</string>
-    <string name="add_music">"Ajouter de la musique"</string>
-    <string name="remove_music">"Supprimer la musique"</string>
-    <string name="add_video">"Ajouter une vidéo"</string>
-    <string name="remove_video">"Supprimer la vidéo"</string>
-    <string name="compose_title">"Composer"</string>
-    <string name="to_hint">"À"</string>
-    <string name="subject_hint">"Objet"</string>
-    <string name="add_attachment">"Joindre"</string>
-    <string name="add_subject">"Ajouter un objet"</string>
-    <string name="discard">"Supprimer"</string>
-    <string name="view">"Afficher"</string>
-    <string name="replace">"Remplacer"</string>
-    <string name="remove">"Supprimer"</string>
-    <string name="send">"Envoyer"</string>
-    <string name="all_threads">"Tous les fils de discussion"</string>
-    <string name="type_to_compose_text_enter_to_send">"Saisissez votre texte, puis appuyez sur Entrée pour envoyer le message."</string>
-    <string name="open_keyboard_to_compose_message">"Ouvrez le clavier pour composer un message."</string>
-    <string name="image_too_large">"Image trop lourde"</string>
-    <string name="ask_for_automatically_resize">"Redimensionner automatiquement l\'image avant de l\'envoyer ?"</string>
-    <string name="compressing">"Compression…"</string>
-    <string name="unsupported_media_format">"Format <xliff:g id="NAME">%1$s</xliff:g> non pris en charge"</string>
-    <string name="select_different_media">"Sélectionnez un autre <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <string name="exceed_message_size_limitation">"Taille maximale atteinte pour ce message."</string>
-    <string name="failed_to_add_media">"Désolé, vous ne pouvez pas ajouter cet élément à votre message : <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <string name="failed_to_resize_image">"L\'image n\'a pas été redimensionnée."</string>
-    <string name="resize_image_error_information">"Désolé, l\'image redimensionnée est toujours trop lourde."</string>
-    <string name="forward_prefix">"TR :"</string>
-    <string name="discard_message">"Supprimer"</string>
-    <string name="discard_message_reason">"Votre message va être supprimé car aucun destinataire valide n\'a été spécifié."</string>
-    <string name="has_invalid_recipient">"Destinataire(s) non valide(s) : &lt;<xliff:g id="NAME">%1$s</xliff:g>&gt;"</string>
-    <string name="invalid_recipient_message">"Corrigez le ou les noms des destinataires, faute de quoi ils ne recevront pas le message."</string>
-    <string name="cannot_send_message">"Impossible d\'envoyer ce message"</string>
-    <string name="cannot_send_message_reason">"Aucun destinataire valide n\'a été spécifié pour votre message."</string>
-    <string name="cannot_forward_drm_obj">"Impossible de transférer l\'objet GDN inclus dans le message."</string>
-    <string name="converting_to_picture_message">"Conversion en message MMS…"</string>
-    <string name="converting_to_text_message">"Conversion en message SMS…"</string>
-    <string name="cannot_add_slide_anymore">"Impossible d\'ajouter d\'autres diapositives."</string>
-    <string name="cannot_save_message">"Impossible de sauvegarder le message."</string>
-    <string name="cannot_load_message">"Impossible de charger le message."</string>
-    <string name="message_saved_as_draft">"Brouillon enregistré"</string>
-    <string name="cannot_play_audio">"Impossible de lire le fichier audio."</string>
-    <string name="preview">"Aperçu"</string>
-    <string name="preview_slideshow">"Aperçu"</string>
-    <string name="replace_image">"Remplacer l\'image"</string>
-    <string name="duration_sec">"Durée (<xliff:g id="DURATION">%s</xliff:g> s.)"</string>
-    <string name="duration_selector_title">"Durée de la diapositive"</string>
-    <string name="layout_selector_title">"Mise en page du diaporama"</string>
-    <string name="layout_top">"Mise en page (haut)"</string>
-    <string name="layout_bottom">"Mise en page (bas)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"Saisissez votre texte ou laissez le champ vide."</string>
-    <string name="secs">"s"</string>
-  <string-array name="select_dialog_items">
-    <item>"1 seconde"</item>
-    <item>"2 secondes"</item>
-    <item>"3 secondes"</item>
-    <item>"4 secondes"</item>
-    <item>"5 secondes"</item>
-    <item>"6 secondes"</item>
-    <item>"7 secondes"</item>
-    <item>"8 secondes"</item>
-    <item>"9 secondes"</item>
-    <item>"10 secondes"</item>
-    <item>"Plus..."</item>
-  </string-array>
-    <string name="menu_view_contact">"Afficher le contact"</string>
-    <string name="menu_add_to_contacts">"Ajouter aux contacts"</string>
-    <string name="hidden_sender_address">"Adresse d\'expéditeur masquée"</string>
-    <string name="yes">"OK"</string>
-    <string name="no">"Annuler"</string>
-    <string name="play">"Lire"</string>
-    <string name="edit">"Modifier"</string>
-    <string name="resize">"Redimensionner"</string>
-    <string name="try_to_send">"Essayer d\'envoyer"</string>
-    <string name="preferences_title">"Paramètres"</string>
-    <string name="restore_default">"Rétablir les paramètres par défaut"</string>
-    <string name="pref_notification_settings_title">"Paramètres de notification"</string>
-    <string name="pref_mms_settings_title">"Paramètres MMS"</string>
-    <string name="pref_sms_settings_title">"Paramètres SMS"</string>
-    <string name="pref_summary_manage_sim_messages">"Gérer les messages enregistrés sur votre carte SIM"</string>
-    <string name="pref_summary_mms_delivery_reports">"Demander un accusé de réception pour chaque message envoyé"</string>
-    <string name="pref_summary_mms_read_reports">"Demander une confirmation de lecture pour chaque message envoyé"</string>
-    <string name="pref_summary_sms_delivery_reports">"Demander un accusé de réception pour chaque message envoyé"</string>
-    <string name="pref_title_manage_sim_messages">"Gérer les messages sur la carte SIM"</string>
-    <string name="pref_title_mms_delivery_reports">"Accusés de réception"</string>
-    <string name="pref_title_mms_read_reports">"Confirmations de lecture"</string>
-    <string name="pref_title_sms_delivery_reports">"Accusés de réception"</string>
-    <string name="pref_title_notification_enabled">"Notifications"</string>
-    <string name="pref_summary_notification_enabled">"Afficher les notifications de message dans la barre d\'état"</string>
-    <string name="pref_title_notification_vibrate">"Vibrations"</string>
-    <string name="pref_summary_notification_vibrate">"Vibrer également lors de la réception d\'une notification"</string>
-    <string name="pref_title_notification_ringtone">"Sélectionner une sonnerie"</string>
-    <string name="pref_title_mms_auto_retrieval">"Récupération automatique"</string>
-    <string name="pref_summary_mms_auto_retrieval">"Récupérer les messages automatiquement"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"Récupération automatique en itinérance"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"Récupérer automatiquement les messages en itinérance"</string>
-    <string name="to_label">"À"</string>
-    <string name="confirm_dialog_title">"Supprimer"</string>
-    <string name="confirm_delete_conversation">"L\'intégralité du fil de discussion va être supprimée."</string>
-    <string name="confirm_delete_all_conversations">"Tous les fils de discussion vont être supprimés."</string>
-    <string name="confirm_delete_message">"Le message va être supprimé."</string>
-    <string name="confirm_delete_all_messages">"L\'intégralité du fil de discussion va être supprimée."</string>
-    <string name="confirm_delete_all_SIM_messages">"Tous les messages de la carte SIM seront effacés."</string>
-    <string name="cannot_get_details">"Impossible de récupérer les détails"</string>
-    <string name="message_details_title">"Détails du message"</string>
-    <string name="message_type_label">"Type :"</string>
-    <string name="text_message">"Message SMS"</string>
-    <string name="multimedia_message">"Message MMS"</string>
-    <string name="multimedia_notification">"Notification MMS"</string>
-    <string name="from_label">"De :"</string>
-    <string name="to_address_label">"À :"</string>
-    <string name="bcc_label">"Cci :"</string>
-    <string name="sent_label">"Date d\'envoi :"</string>
-    <string name="received_label">"Date de réception :"</string>
-    <string name="saved_label">"Sauvegardé :"</string>
-    <string name="subject_label">"Objet :"</string>
-    <string name="message_size_label">"Taille du message :"</string>
-    <string name="priority_label">"Priorité :"</string>
-    <string name="priority_high">"Élevée"</string>
-    <string name="priority_normal">"Normale"</string>
-    <string name="priority_low">"Faible"</string>
-    <string name="message_class_label">"Catégorie du message :"</string>
-    <string name="menu_edit">"Modifier"</string>
-    <string name="menu_retry_sending">"Essayer de renvoyer"</string>
-    <string name="menu_retry_sending_all">"Essayer de tout renvoyer"</string>
-    <string name="menu_delete_messages">"Supprimer les messages"</string>
-    <string name="retrying_dialog_body">"Ce message <xliff:g id="MESSAGE">%s</xliff:g> n\'a pas été envoyé suite à un problème de connexion."\n"Nouvelle tentative d\'envoi…"</string>
-    <string name="sim_copy_to_phone_memory">"Copier vers la mémoire du téléphone"</string>
-    <string name="sim_delete">"Supprimer"</string>
-    <string name="sim_manage_messages_title">"Messages SMS sur la carte SIM"</string>
-    <string name="sim_view">"Afficher"</string>
-    <string name="sim_empty">"Aucun message sur la carte SIM."</string>
-    <string name="delivery_header_title">"Rapport"</string>
-    <string name="status_none">"(Aucun)"</string>
-    <string name="status_pending">"En attente"</string>
-    <string name="status_read">"Lire"</string>
-    <string name="status_received">"Reçus"</string>
-    <string name="status_failed">"Échec"</string>
-    <string name="status_unread">"Non lu(s)"</string>
-    <string name="status_rejected">"Rejeté"</string>
-    <string name="recipient_label">"Destinataire :"</string>
-    <string name="status_label">"État :"</string>
-    <string name="attach_image">"Images"</string>
-    <string name="attach_take_photo">"Prendre une photo"</string>
-    <string name="attach_video">"Vidéos"</string>
-    <string name="attach_record_video">"Faire une vidéo"</string>
-    <string name="attach_sound">"Audio"</string>
-    <string name="attach_record_sound">"Enregistrement audio"</string>
-    <string name="attach_slideshow">"Diaporama"</string>
-    <string name="select_bottom_text">"Texte en bas de l\'écran"</string>
-    <string name="select_top_text">"Texte en haut de l\'écran"</string>
-    <string name="notification_multiple">"<xliff:g id="COUNT">%s</xliff:g> messages non lus."</string>
-    <string name="notification_multiple_title">"Nouveaux messages"</string>
-    <string name="sim_full_title">"La carte SIM est pleine."</string>
-    <string name="sim_full_body">"Supprimez des messages pour libérer de l\'espace."</string>
-    <string name="type_audio">"audio"</string>
-    <string name="type_picture">"image"</string>
-    <string name="type_video">"vidéo"</string>
-    <string name="confirm">"Confirmer"</string>
-    <string name="message_send_read_report">"Une confirmation de lecture sera envoyée."</string>
-    <string name="message_queued">"Votre message ne peut pas être envoyé pour l\'instant. Il sera transmis lorsque le service sera à nouveau disponible."</string>
-    <string name="no_subject">"(Aucun objet)"</string>
-    <string name="unknown_sender">"Expéditeur inconnu"</string>
-    <string name="dl_failure_notification">"Le téléchargement du message <xliff:g id="SUBJECT">%s</xliff:g> de <xliff:g id="FROM">%s</xliff:g> a échoué."</string>
-    <string name="rate_limit_surpassed">"Confirmer"</string>
-    <string name="confirm_rate_limit">"Un grand nombre de messages multimédia est en cours d\'envoi. Voulez-vous continuer ?"</string>
-    <string name="message_download_failed_title">"Message non téléchargé"</string>
-    <string name="message_send_failed_title">"Le message n\'a pas été envoyé."</string>
-    <string name="message_failed_body">"Sélectionnez le message pour le relire, puis réessayez."</string>
-    <string name="download_later">"Téléchargement impossible pour l\'instant. Merci de réessayer ultérieurement."</string>
-    <string name="select_audio">"Sélectionner un fichier audio"</string>
-    <string name="copy_to_sdcard">"Copier la pièce jointe sur la carte SD"</string>
-    <string name="copy_to_sdcard_success">"Pièce jointe copiée sur la carte SD"</string>
-    <string name="copy_to_sdcard_fail">"Échec de la copie de la pièce jointe sur la carte SD"</string>
-    <string name="menu_insert_smiley">"Insérer une émoticône"</string>
-    <string name="select_link_title">"Sélectionner un élément"</string>
-</resources>
diff --git a/res/values-it/arrays.xml b/res/values-it/arrays.xml
deleted file mode 100644
index a2bd0a0..0000000
--- a/res/values-it/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"Felice"</item>
-    <item>"Triste"</item>
-    <item>"Fare l\'occhiolino"</item>
-    <item>"Lingua fuori"</item>
-    <item>"Sorpreso"</item>
-    <item>"Baciare"</item>
-    <item>"Urlare"</item>
-    <item>"Favoloso"</item>
-    <item>"Bocca a forma di dollaro"</item>
-    <item>"Gaffe"</item>
-    <item>"Imbarazzato"</item>
-    <item>"Angelo"</item>
-    <item>"Indeciso"</item>
-    <item>"Piangere"</item>
-    <item>"Labbra cucite"</item>
-    <item>"Sorridere"</item>
-    <item>"Confuso"</item>
-  </string-array>
-</resources>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
deleted file mode 100644
index 2842e96..0000000
--- a/res/values-it/strings.xml
+++ /dev/null
@@ -1,243 +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="app_label">"Messaggi"</string>
-    <string name="new_message">"Nuovo messaggio"</string>
-    <string name="create_new_message">"Componi nuovo messaggio"</string>
-    <string name="menu_call_back">"Chiama <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_send_email">"Invia email a <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_compose_new">"Componi"</string>
-    <string name="menu_preferences">"Impostazioni"</string>
-    <string name="menu_add_address_to_contacts">"Aggiungi <xliff:g id="NAME">%s</xliff:g> a Contatti"</string>
-    <string name="menu_call">"Chiama"</string>
-    <string name="menu_delete_all">"Elimina conversazioni"</string>
-    <string name="menu_delete">"Elimina"</string>
-    <string name="menu_undelivered_messages">"Messaggi non consegnati"</string>
-    <string name="menu_view">"Visualizza"</string>
-    <string name="refreshing">"Aggiornamento..."</string>
-    <string name="has_draft">"Bozza"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"Anonimo"</string>
-    <string name="no_subject_view">"(Nessun oggetto)"</string>
-    <string name="messagelist_sender_self">"Io"</string>
-    <string name="view_picture">"Visualizza immagine"</string>
-    <string name="view_slideshow">"Visualizza presentazione"</string>
-    <string name="view_message_details">"Visualizza dettagli messaggio"</string>
-    <string name="view_delivery_report">"Visualizza rapporto"</string>
-    <string name="delete_message">"Elimina messaggio"</string>
-    <string name="sent_on">"Inviato: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"Scadenza: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"KB"</string>
-    <string name="undelivered_msg_dialog_title">"Messaggio non consegnato"</string>
-    <string name="undelivered_msg_dialog_body">"Impossibile inviare il messaggio."\n"Tentativo eseguito: <xliff:g id="MESSAGE">%s</xliff:g>."</string>
-    <string name="undelivered_sms_dialog_body">"Impossibile inviare il messaggio."</string>
-    <string name="delete_thread">"Elimina conversazione"</string>
-    <string name="menu_forward">"Inoltra"</string>
-    <string name="download">"Scarica"</string>
-    <string name="downloading">"Download in corso"</string>
-    <string name="inline_subject">"&lt;Oggetto: <xliff:g id="SUBJECT">%s</xliff:g>&gt;"</string>
-    <string name="drm_protected_text">"* Testo protetto con DRM *"</string>
-    <string name="insufficient_drm_rights">"Diritti DRM insufficienti."</string>
-    <string name="copy_message_text">"Copia testo messaggio"</string>
-    <string name="message_options">"Opzioni messaggio"</string>
-    <string name="done">"Fine"</string>
-    <string name="move_up">"Sposta su"</string>
-    <string name="move_down">"Sposta giù"</string>
-    <string name="remove_slide">"Rimuovi diapositiva"</string>
-    <string name="add_slide">"Aggiungi diapositiva"</string>
-    <string name="add_slide_hint">"Seleziona per creare nuova diapositiva."</string>
-    <string name="discard_slideshow">"Ignora presentazione"</string>
-    <string name="remove_text">"Rimuovi testo"</string>
-    <string name="add_picture">"Aggiungi immagine"</string>
-    <string name="remove_picture">"Rimuovi immagine"</string>
-    <string name="add_music">"Aggiungi musica"</string>
-    <string name="remove_music">"Rimuovi musica"</string>
-    <string name="add_video">"Aggiungi video"</string>
-    <string name="remove_video">"Rimuovi video"</string>
-    <string name="compose_title">"Componi"</string>
-    <string name="to_hint">"A"</string>
-    <string name="subject_hint">"Oggetto"</string>
-    <string name="add_attachment">"Allega"</string>
-    <string name="add_subject">"Aggiungi oggetto"</string>
-    <string name="discard">"Ignora"</string>
-    <string name="view">"Visualizza"</string>
-    <string name="replace">"Sostituisci"</string>
-    <string name="remove">"Rimuovi"</string>
-    <string name="send">"Invia"</string>
-    <string name="all_threads">"Tutte le conversazioni"</string>
-    <string name="type_to_compose_text_enter_to_send">"Digita per comporre. Premi Invio per inviare"</string>
-    <string name="open_keyboard_to_compose_message">"Apri tastiera per comporre il messaggio"</string>
-    <string name="image_too_large">"Immagine troppo grande"</string>
-    <string name="ask_for_automatically_resize">"Ridimensionare automaticamente l\'immagine prima di inviarla?"</string>
-    <string name="compressing">"Compressione..."</string>
-    <string name="unsupported_media_format">"Formato di <xliff:g id="NAME">%1$s</xliff:g> non supportato"</string>
-    <string name="select_different_media">"Seleziona un altro elemento <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <string name="exceed_message_size_limitation">"Limite di dimensione del messaggio raggiunto."</string>
-    <string name="failed_to_add_media">"Spiacenti. Impossibile aggiungere questo <xliff:g id="NAME">%1$s</xliff:g> al messaggio."</string>
-    <string name="failed_to_resize_image">"Immagine non ridimensionata."</string>
-    <string name="resize_image_error_information">"Anche ridimensionata, l\'immagine è troppo grande per essere inviata."</string>
-    <string name="forward_prefix">"I:"</string>
-    <string name="discard_message">"Ignora"</string>
-    <string name="discard_message_reason">"Il messaggio verrà ignorato. I destinatari non sono validi."</string>
-    <string name="has_invalid_recipient">"Destinatari non validi: &lt;<xliff:g id="NAME">%1$s</xliff:g>&gt;"</string>
-    <string name="invalid_recipient_message">"Correggi i destinatari o il messaggio non sarà recapitato."</string>
-    <string name="cannot_send_message">"Impossibile inviare il messaggio"</string>
-    <string name="cannot_send_message_reason">"Il messaggio non ha destinatari validi."</string>
-    <string name="cannot_forward_drm_obj">"Impossibile inoltrare l\'oggetto DRM incluso nel messaggio."</string>
-    <string name="converting_to_picture_message">"Conversione in MMS..."</string>
-    <string name="converting_to_text_message">"Conversione in SMS..."</string>
-    <string name="cannot_add_slide_anymore">"Impossibile aggiungere altre diapositive."</string>
-    <string name="cannot_save_message">"Impossibile salvare il messaggio."</string>
-    <string name="cannot_load_message">"Impossibile caricare il messaggio."</string>
-    <string name="message_saved_as_draft">"Messaggio salvato come bozza."</string>
-    <string name="cannot_play_audio">"Impossibile riprodurre l\'audio."</string>
-    <string name="preview">"Anteprima"</string>
-    <string name="preview_slideshow">"Anteprima"</string>
-    <string name="replace_image">"Sostituisci immagine"</string>
-    <string name="duration_sec">"Durata (<xliff:g id="DURATION">%s</xliff:g> sec)"</string>
-    <string name="duration_selector_title">"Durata diapositiva"</string>
-    <string name="layout_selector_title">"Layout presentazione"</string>
-    <string name="layout_top">"Layout (superiore)"</string>
-    <string name="layout_bottom">"Layout (inferiore)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"Digita per comporre il testo o lascia vuoto"</string>
-    <string name="secs">"sec"</string>
-  <string-array name="select_dialog_items">
-    <item>"1 secondo"</item>
-    <item>"2 secondi"</item>
-    <item>"3 secondi"</item>
-    <item>"4 secondi"</item>
-    <item>"5 secondi"</item>
-    <item>"6 secondi"</item>
-    <item>"7 secondi"</item>
-    <item>"8 secondi"</item>
-    <item>"9 secondi"</item>
-    <item>"10 secondi"</item>
-    <item>"Altro..."</item>
-  </string-array>
-    <string name="menu_view_contact">"Visualizza contatto"</string>
-    <string name="menu_add_to_contacts">"Aggiungi a contatti"</string>
-    <string name="hidden_sender_address">"Indirizzo mittente nascosto"</string>
-    <string name="yes">"OK"</string>
-    <string name="no">"Annulla"</string>
-    <string name="play">"Riproduci"</string>
-    <string name="edit">"Modifica"</string>
-    <string name="resize">"Ridimensiona"</string>
-    <string name="try_to_send">"Prova a inviare"</string>
-    <string name="preferences_title">"Impostazioni"</string>
-    <string name="restore_default">"Ripristina impostazioni predefinite"</string>
-    <string name="pref_notification_settings_title">"Impostazioni notifiche"</string>
-    <string name="pref_mms_settings_title">"Impostazioni MMS"</string>
-    <string name="pref_sms_settings_title">"Impostazioni SMS"</string>
-    <string name="pref_summary_manage_sim_messages">"Gestisci i messaggi memorizzati nella SIM"</string>
-    <string name="pref_summary_mms_delivery_reports">"Richiedi un rapporto di consegna per ogni messaggio inviato"</string>
-    <string name="pref_summary_mms_read_reports">"Richiedi un rapporto di lettura per ogni messaggio inviato"</string>
-    <string name="pref_summary_sms_delivery_reports">"Richiedi un rapporto di consegna per ogni messaggio inviato"</string>
-    <string name="pref_title_manage_sim_messages">"Gestisci messaggi della SIM"</string>
-    <string name="pref_title_mms_delivery_reports">"Rapporti consegna"</string>
-    <string name="pref_title_mms_read_reports">"Rapporti lettura"</string>
-    <string name="pref_title_sms_delivery_reports">"Rapporti consegna"</string>
-    <string name="pref_title_notification_enabled">"Notifiche"</string>
-    <string name="pref_summary_notification_enabled">"Visualizza notifiche messaggi nella barra di stato"</string>
-    <string name="pref_title_notification_vibrate">"Vibrazione"</string>
-    <string name="pref_summary_notification_vibrate">"Anche vibrazione alla notifica"</string>
-    <string name="pref_title_notification_ringtone">"Seleziona suoneria"</string>
-    <string name="pref_title_mms_auto_retrieval">"Recupero automatico"</string>
-    <string name="pref_summary_mms_auto_retrieval">"Recupera messaggi automaticamente"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"Recupero automatico in roaming"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"Recupera automaticamente i messaggi durante il roaming"</string>
-    <string name="to_label">"A"</string>
-    <string name="confirm_dialog_title">"Elimina"</string>
-    <string name="confirm_delete_conversation">"Verrà eliminata l\'intera conversazione."</string>
-    <string name="confirm_delete_all_conversations">"Verranno eliminate tutte le conversazioni."</string>
-    <string name="confirm_delete_message">"Il messaggio verrà eliminato."</string>
-    <string name="confirm_delete_all_messages">"Verrà eliminata l\'intera conversazione."</string>
-    <string name="confirm_delete_all_SIM_messages">"Verranno eliminati tutti i messaggi nella SIM."</string>
-    <string name="cannot_get_details">"Impossibile ottenere i dettagli"</string>
-    <string name="message_details_title">"Dettagli messaggio"</string>
-    <string name="message_type_label">"Tipo:"</string>
-    <string name="text_message">"SMS"</string>
-    <string name="multimedia_message">"MMS"</string>
-    <string name="multimedia_notification">"Notifica MMS"</string>
-    <string name="from_label">"Da:"</string>
-    <string name="to_address_label">"A:"</string>
-    <string name="bcc_label">"Ccn:"</string>
-    <string name="sent_label">"Inviato:"</string>
-    <string name="received_label">"Ricevuto:"</string>
-    <string name="saved_label">"Salvato:"</string>
-    <string name="subject_label">"Oggetto:"</string>
-    <string name="message_size_label">"Dimensione messaggio:"</string>
-    <string name="priority_label">"Priorità:"</string>
-    <string name="priority_high">"Elevata"</string>
-    <string name="priority_normal">"Normale"</string>
-    <string name="priority_low">"Bassa"</string>
-    <string name="message_class_label">"Classe messaggio:"</string>
-    <string name="menu_edit">"Modifica"</string>
-    <string name="menu_retry_sending">"Riprova invio"</string>
-    <string name="menu_retry_sending_all">"Riprova a inviare tutti"</string>
-    <string name="menu_delete_messages">"Elimina messaggi"</string>
-    <string name="retrying_dialog_body">"Il messaggio <xliff:g id="MESSAGE">%s</xliff:g> non è stato inviato a causa di un problema di connessione."\n"Nuovo tentativo di invio…"</string>
-    <string name="sim_copy_to_phone_memory">"Copia in memoria telefono"</string>
-    <string name="sim_delete">"Elimina"</string>
-    <string name="sim_manage_messages_title">"SMS sulla SIM"</string>
-    <string name="sim_view">"Visualizza"</string>
-    <string name="sim_empty">"Nessun messaggio nella SIM."</string>
-    <string name="delivery_header_title">"Rapporto"</string>
-    <string name="status_none">"(Nessuno)"</string>
-    <string name="status_pending">"In sospeso"</string>
-    <string name="status_read">"Letto"</string>
-    <string name="status_received">"Ricevuto"</string>
-    <string name="status_failed">"Non riuscito"</string>
-    <string name="status_unread">"Da leggere"</string>
-    <string name="status_rejected">"Rifiutato"</string>
-    <string name="recipient_label">"Destinatario:"</string>
-    <string name="status_label">"Stato:"</string>
-    <string name="attach_image">"Immagini"</string>
-    <string name="attach_take_photo">"Scatta foto"</string>
-    <string name="attach_video">"Video"</string>
-    <string name="attach_record_video">"Registra video"</string>
-    <string name="attach_sound">"Audio"</string>
-    <string name="attach_record_sound">"Registra audio"</string>
-    <string name="attach_slideshow">"Presentazione"</string>
-    <string name="select_bottom_text">"Testo in basso"</string>
-    <string name="select_top_text">"Testo in alto"</string>
-    <string name="notification_multiple">"<xliff:g id="COUNT">%s</xliff:g> messaggi da leggere."</string>
-    <string name="notification_multiple_title">"Nuovi messaggi"</string>
-    <string name="sim_full_title">"SIM piena"</string>
-    <string name="sim_full_body">"Elimina alcuni messaggi per liberare spazio."</string>
-    <string name="type_audio">"audio"</string>
-    <string name="type_picture">"immagine"</string>
-    <string name="type_video">"video"</string>
-    <string name="confirm">"Conferma"</string>
-    <string name="message_send_read_report">"Verrà inviato un rapporto di lettura."</string>
-    <string name="message_queued">"Al momento è impossibile inviare il messaggio. Il messaggio verrà inviato non appena il servizio diventa disponibile."</string>
-    <string name="no_subject">"(Nessun oggetto)"</string>
-    <string name="unknown_sender">"Mittente sconosciuto"</string>
-    <string name="dl_failure_notification">"Download del messaggio <xliff:g id="SUBJECT">%s</xliff:g> di <xliff:g id="FROM">%s</xliff:g> non riuscito."</string>
-    <string name="rate_limit_surpassed">"Conferma"</string>
-    <string name="confirm_rate_limit">"Stai per inviare numerosi MMS. Confermi?"</string>
-    <string name="message_download_failed_title">"Messaggio non scaricato"</string>
-    <string name="message_send_failed_title">"Messaggio non inviato"</string>
-    <string name="message_failed_body">"Seleziona per controllare il messaggio e riprovare."</string>
-    <string name="download_later">"Download attualmente non disponibile. Riprova più tardi."</string>
-    <string name="select_audio">"Seleziona audio"</string>
-    <string name="copy_to_sdcard">"Copia allegato in scheda SD"</string>
-    <string name="copy_to_sdcard_success">"Allegato copiato in scheda SD"</string>
-    <string name="copy_to_sdcard_fail">"Copia dell\'allegato nella scheda SD non riuscita"</string>
-    <string name="menu_insert_smiley">"Inserisci smile"</string>
-    <string name="select_link_title">"Seleziona azione"</string>
-</resources>
diff --git a/res/values-ja/arrays.xml b/res/values-ja/arrays.xml
deleted file mode 100644
index d21751a..0000000
--- a/res/values-ja/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"ハッピー"</item>
-    <item>"悲しい"</item>
-    <item>"ウィンク"</item>
-    <item>"アッカンベー"</item>
-    <item>"びっくり"</item>
-    <item>"キス"</item>
-    <item>"激怒"</item>
-    <item>"クール"</item>
-    <item>"気持ち悪い"</item>
-    <item>"しまった"</item>
-    <item>"恥ずかしい"</item>
-    <item>"天使"</item>
-    <item>"迷う"</item>
-    <item>"泣く"</item>
-    <item>"お口にチャック"</item>
-    <item>"笑顔"</item>
-    <item>"混乱"</item>
-  </string-array>
-</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
deleted file mode 100644
index 5bbc18e..0000000
--- a/res/values-ja/strings.xml
+++ /dev/null
@@ -1,243 +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="app_label">"メッセージ"</string>
-    <string name="new_message">"新しいメッセージ"</string>
-    <string name="create_new_message">"新しいメッセージを作成する"</string>
-    <string name="menu_call_back">"<xliff:g id="NAME">%s</xliff:g>さんに発信"</string>
-    <string name="menu_send_email">"<xliff:g id="NAME">%s</xliff:g>さんにメールを送信"</string>
-    <string name="menu_compose_new">"作成"</string>
-    <string name="menu_preferences">"設定"</string>
-    <string name="menu_add_address_to_contacts">"連絡先に<xliff:g id="NAME">%s</xliff:g>さんを追加"</string>
-    <string name="menu_call">"発信"</string>
-    <string name="menu_delete_all">"スレッドを削除"</string>
-    <string name="menu_delete">"削除"</string>
-    <string name="menu_undelivered_messages">"未配信メッセージ"</string>
-    <string name="menu_view">"表示"</string>
-    <string name="refreshing">"更新中..."</string>
-    <string name="has_draft">"下書き"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"差出人不明"</string>
-    <string name="no_subject_view">"(件名なし)"</string>
-    <string name="messagelist_sender_self">"自分"</string>
-    <string name="view_picture">"画像を表示"</string>
-    <string name="view_slideshow">"スライドショーを表示"</string>
-    <string name="view_message_details">"メッセージの詳細を表示"</string>
-    <string name="view_delivery_report">"レポートを表示"</string>
-    <string name="delete_message">"メッセージを削除"</string>
-    <string name="sent_on">"送信: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"有効期限:<xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"KB"</string>
-    <string name="undelivered_msg_dialog_title">"未配信メッセージ"</string>
-    <string name="undelivered_msg_dialog_body">"このメッセージは送信できません。"\n"最終試行時間:<xliff:g id="MESSAGE">%s</xliff:g>"</string>
-    <string name="undelivered_sms_dialog_body">"このメッセージは送信できません。"</string>
-    <string name="delete_thread">"スレッドを削除"</string>
-    <string name="menu_forward">"転送"</string>
-    <string name="download">"ダウンロード"</string>
-    <string name="downloading">"ダウンロード中"</string>
-    <string name="inline_subject">"&lt;件名:<xliff:g id="SUBJECT">%s</xliff:g>&gt;"</string>
-    <string name="drm_protected_text">"*DRM保護対象テキスト*"</string>
-    <string name="insufficient_drm_rights">"DRM権限が十分ではありません。"</string>
-    <string name="copy_message_text">"メッセージテキストをコピー"</string>
-    <string name="message_options">"メッセージオプション"</string>
-    <string name="done">"完了"</string>
-    <string name="move_up">"上に移動"</string>
-    <string name="move_down">"下に移動"</string>
-    <string name="remove_slide">"スライドを削除"</string>
-    <string name="add_slide">"スライドを追加"</string>
-    <string name="add_slide_hint">"新しいスライドを作成します。"</string>
-    <string name="discard_slideshow">"スライドショーを破棄"</string>
-    <string name="remove_text">"テキストを削除"</string>
-    <string name="add_picture">"画像を追加"</string>
-    <string name="remove_picture">"画像を削除"</string>
-    <string name="add_music">"音楽を追加"</string>
-    <string name="remove_music">"音楽を削除"</string>
-    <string name="add_video">"動画を追加"</string>
-    <string name="remove_video">"動画を削除"</string>
-    <string name="compose_title">"作成"</string>
-    <string name="to_hint">"宛先"</string>
-    <string name="subject_hint">"件名"</string>
-    <string name="add_attachment">"添付"</string>
-    <string name="add_subject">"件名を追加"</string>
-    <string name="discard">"破棄"</string>
-    <string name="view">"表示"</string>
-    <string name="replace">"変更"</string>
-    <string name="remove">"削除"</string>
-    <string name="send">"送信"</string>
-    <string name="all_threads">"スレッド一覧"</string>
-    <string name="type_to_compose_text_enter_to_send">"メッセージを入力してEnterキーを押すと送信されます"</string>
-    <string name="open_keyboard_to_compose_message">"キーボードを表示してメッセージを入力してください"</string>
-    <string name="image_too_large">"画像が大きすぎます"</string>
-    <string name="ask_for_automatically_resize">"画像のサイズを送信用に自動調整しますか?"</string>
-    <string name="compressing">"圧縮中..."</string>
-    <string name="unsupported_media_format">"対応していない<xliff:g id="NAME">%1$s</xliff:g>形式です"</string>
-    <string name="select_different_media">"別の<xliff:g id="NAME">%1$s</xliff:g>を選択してください。"</string>
-    <string name="exceed_message_size_limitation">"メッセージサイズの上限に達しました。"</string>
-    <string name="failed_to_add_media">"この<xliff:g id="NAME">%1$s</xliff:g>はメッセージに追加できません。"</string>
-    <string name="failed_to_resize_image">"画像のサイズを変更できません。"</string>
-    <string name="resize_image_error_information">"この画像は大きすぎるため、サイズを変更しても送信できません。"</string>
-    <string name="forward_prefix">"Fwd:"</string>
-    <string name="discard_message">"破棄"</string>
-    <string name="discard_message_reason">"有効な宛先が指定されていないので、メッセージは破棄されます。"</string>
-    <string name="has_invalid_recipient">"無効な受信者:&lt;<xliff:g id="NAME">%1$s</xliff:g>&gt;"</string>
-    <string name="invalid_recipient_message">"受信者にメッセージが届くように、宛先を修正してください。"</string>
-    <string name="cannot_send_message">"メッセージを送信できません"</string>
-    <string name="cannot_send_message_reason">"メッセージに有効な宛先が指定されていません。"</string>
-    <string name="cannot_forward_drm_obj">"メッセージ内のDRM対象は転送できません。"</string>
-    <string name="converting_to_picture_message">"MMSメッセージに変換中..."</string>
-    <string name="converting_to_text_message">"SMSメッセージに変換中..."</string>
-    <string name="cannot_add_slide_anymore">"スライドを追加できません。"</string>
-    <string name="cannot_save_message">"メッセージを保存できません。"</string>
-    <string name="cannot_load_message">"メッセージを読み込めません。"</string>
-    <string name="message_saved_as_draft">"メッセージが下書きとして保存されました。"</string>
-    <string name="cannot_play_audio">"オーディオを再生できません。"</string>
-    <string name="preview">"プレビュー"</string>
-    <string name="preview_slideshow">"プレビュー"</string>
-    <string name="replace_image">"画像を変更"</string>
-    <string name="duration_sec">"時間 (<xliff:g id="DURATION">%s</xliff:g>秒)"</string>
-    <string name="duration_selector_title">"スライドの表示時間"</string>
-    <string name="layout_selector_title">"スライドショーのレイアウト"</string>
-    <string name="layout_top">"レイアウト (上部)"</string>
-    <string name="layout_bottom">"レイアウト (下部)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"文字を入力するか空白のまま完了を押します"</string>
-    <string name="secs">"秒"</string>
-  <string-array name="select_dialog_items">
-    <item>"1秒"</item>
-    <item>"2秒"</item>
-    <item>"3秒"</item>
-    <item>"4秒"</item>
-    <item>"5秒"</item>
-    <item>"6秒"</item>
-    <item>"7秒"</item>
-    <item>"8秒"</item>
-    <item>"9秒"</item>
-    <item>"10秒"</item>
-    <item>"その他..."</item>
-  </string-array>
-    <string name="menu_view_contact">"連絡先を表示"</string>
-    <string name="menu_add_to_contacts">"連絡先に追加"</string>
-    <string name="hidden_sender_address">"差出人アドレス非表示"</string>
-    <string name="yes">"OK"</string>
-    <string name="no">"キャンセル"</string>
-    <string name="play">"再生"</string>
-    <string name="edit">"編集"</string>
-    <string name="resize">"サイズを変更"</string>
-    <string name="try_to_send">"送信を試行"</string>
-    <string name="preferences_title">"設定"</string>
-    <string name="restore_default">"初期設定に戻す"</string>
-    <string name="pref_notification_settings_title">"通知設定"</string>
-    <string name="pref_mms_settings_title">"MMS設定"</string>
-    <string name="pref_sms_settings_title">"SMS設定"</string>
-    <string name="pref_summary_manage_sim_messages">"SIMカードに保存したメッセージを管理"</string>
-    <string name="pref_summary_mms_delivery_reports">"送信する各メッセージの配信レポートを要求する"</string>
-    <string name="pref_summary_mms_read_reports">"送信する各メッセージの既読レポートを要求する"</string>
-    <string name="pref_summary_sms_delivery_reports">"送信する各メッセージの配信レポートを要求する"</string>
-    <string name="pref_title_manage_sim_messages">"SIMカードのメッセージを管理"</string>
-    <string name="pref_title_mms_delivery_reports">"配信レポート"</string>
-    <string name="pref_title_mms_read_reports">"既読レポート"</string>
-    <string name="pref_title_sms_delivery_reports">"配信レポート"</string>
-    <string name="pref_title_notification_enabled">"通知"</string>
-    <string name="pref_summary_notification_enabled">"メール受信をステータスバーで通知する"</string>
-    <string name="pref_title_notification_vibrate">"バイブレーション"</string>
-    <string name="pref_summary_notification_vibrate">"通知: バイブレーションもON"</string>
-    <string name="pref_title_notification_ringtone">"着信音を選択"</string>
-    <string name="pref_title_mms_auto_retrieval">"自動で取得"</string>
-    <string name="pref_summary_mms_auto_retrieval">"メッセージを自動的に取得"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"ローミングを自動的に取得"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"ローミング中にメッセージを自動的に取得する"</string>
-    <string name="to_label">"宛先"</string>
-    <string name="confirm_dialog_title">"削除"</string>
-    <string name="confirm_delete_conversation">"スレッド全体が削除されます。"</string>
-    <string name="confirm_delete_all_conversations">"スレッドはすべて削除されます。"</string>
-    <string name="confirm_delete_message">"メッセージを削除します。"</string>
-    <string name="confirm_delete_all_messages">"スレッド全体が削除されます。"</string>
-    <string name="confirm_delete_all_SIM_messages">"SIMカードのすべてのメッセージが削除されます。"</string>
-    <string name="cannot_get_details">"詳細を表示できません"</string>
-    <string name="message_details_title">"メッセージの詳細"</string>
-    <string name="message_type_label">"タイプ:"</string>
-    <string name="text_message">"SMSメッセージ"</string>
-    <string name="multimedia_message">"MMSメッセージ"</string>
-    <string name="multimedia_notification">"MMS通知"</string>
-    <string name="from_label">"差出人:"</string>
-    <string name="to_address_label">"宛先:"</string>
-    <string name="bcc_label">"Bcc:"</string>
-    <string name="sent_label">"送信:"</string>
-    <string name="received_label">"受信:"</string>
-    <string name="saved_label">"保存:"</string>
-    <string name="subject_label">"件名:"</string>
-    <string name="message_size_label">"メッセージサイズ:"</string>
-    <string name="priority_label">"優先度:"</string>
-    <string name="priority_high">"高"</string>
-    <string name="priority_normal">"中"</string>
-    <string name="priority_low">"低"</string>
-    <string name="message_class_label">"メッセージクラス:"</string>
-    <string name="menu_edit">"編集"</string>
-    <string name="menu_retry_sending">"送信を再試行"</string>
-    <string name="menu_retry_sending_all">"すべて再送信する"</string>
-    <string name="menu_delete_messages">"メッセージを削除"</string>
-    <string name="retrying_dialog_body">"接続エラーのためメッセージ「<xliff:g id="MESSAGE">%s</xliff:g>」を送信できませんでした。"\n"再送信しています..."</string>
-    <string name="sim_copy_to_phone_memory">"携帯電話のメモリにコピー"</string>
-    <string name="sim_delete">"削除"</string>
-    <string name="sim_manage_messages_title">"SIMカード内のSMSメッセージ"</string>
-    <string name="sim_view">"表示"</string>
-    <string name="sim_empty">"SIMカードにメッセージがありません。"</string>
-    <string name="delivery_header_title">"レポート"</string>
-    <string name="status_none">"(なし)"</string>
-    <string name="status_pending">"保留"</string>
-    <string name="status_read">"既読"</string>
-    <string name="status_received">"受信済み"</string>
-    <string name="status_failed">"失敗"</string>
-    <string name="status_unread">"未読"</string>
-    <string name="status_rejected">"拒否"</string>
-    <string name="recipient_label">"受信者:"</string>
-    <string name="status_label">"ステータス:"</string>
-    <string name="attach_image">"画像"</string>
-    <string name="attach_take_photo">"写真をキャプチャ"</string>
-    <string name="attach_video">"動画"</string>
-    <string name="attach_record_video">"動画をキャプチャ"</string>
-    <string name="attach_sound">"オーディオ"</string>
-    <string name="attach_record_sound">"音声録音"</string>
-    <string name="attach_slideshow">"スライドショー"</string>
-    <string name="select_bottom_text">"テキストを下に表示"</string>
-    <string name="select_top_text">"テキストを上に表示"</string>
-    <string name="notification_multiple">"未読メッセージ<xliff:g id="COUNT">%s</xliff:g>通"</string>
-    <string name="notification_multiple_title">"新しいメッセージ"</string>
-    <string name="sim_full_title">"SIMカード空き領域なし"</string>
-    <string name="sim_full_body">"空き容量を増やすにはメッセージを削除します。"</string>
-    <string name="type_audio">"オーディオ"</string>
-    <string name="type_picture">"画像"</string>
-    <string name="type_video">"動画"</string>
-    <string name="confirm">"確認"</string>
-    <string name="message_send_read_report">"既読レポートが送信されます。"</string>
-    <string name="message_queued">"現在メッセージを送信できません。サービスが利用できる状態になり次第送信されます。"</string>
-    <string name="no_subject">"(件名なし)"</string>
-    <string name="unknown_sender">"送信者不明"</string>
-    <string name="dl_failure_notification">"<xliff:g id="FROM">%s</xliff:g>さんからのメッセージ「<xliff:g id="SUBJECT">%s</xliff:g>」をダウンロードできませんでした。"</string>
-    <string name="rate_limit_surpassed">"確認"</string>
-    <string name="confirm_rate_limit">"大量のマルチメディアメッセージを送信してもよろしいですか?"</string>
-    <string name="message_download_failed_title">"メッセージのダウンロード失敗"</string>
-    <string name="message_send_failed_title">"メッセージの送信失敗"</string>
-    <string name="message_failed_body">"メッセージを確認してもう一度送信します。"</string>
-    <string name="download_later">"現在ダウンロードできません。しばらくしてからもう一度お試しください。"</string>
-    <string name="select_audio">"オーディオの選択"</string>
-    <string name="copy_to_sdcard">"添付ファイルをSDカードにコピー"</string>
-    <string name="copy_to_sdcard_success">"添付ファイルをSDカードにコピーしました"</string>
-    <string name="copy_to_sdcard_fail">"添付ファイルをSDカードにコピーできませんでした"</string>
-    <string name="menu_insert_smiley">"絵文字を挿入"</string>
-    <string name="select_link_title">"操作を選択"</string>
-</resources>
diff --git a/res/values-ko/arrays.xml b/res/values-ko/arrays.xml
deleted file mode 100644
index 71770c6..0000000
--- a/res/values-ko/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"행복"</item>
-    <item>"슬픔"</item>
-    <item>"윙크"</item>
-    <item>"메롱"</item>
-    <item>"놀람"</item>
-    <item>"키스"</item>
-    <item>"소리 지름"</item>
-    <item>"멋짐"</item>
-    <item>"욕심"</item>
-    <item>"부끄러움"</item>
-    <item>"당황"</item>
-    <item>"천사"</item>
-    <item>"우유부단"</item>
-    <item>"울음"</item>
-    <item>"입막음"</item>
-    <item>"웃음"</item>
-    <item>"어리둥절"</item>
-  </string-array>
-</resources>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
deleted file mode 100644
index a031242..0000000
--- a/res/values-ko/strings.xml
+++ /dev/null
@@ -1,243 +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="app_label">"메시지"</string>
-    <string name="new_message">"새 메시지"</string>
-    <string name="create_new_message">"새 메시지 작성"</string>
-    <string name="menu_call_back">"<xliff:g id="NAME">%s</xliff:g>에게 전화하기"</string>
-    <string name="menu_send_email">"<xliff:g id="NAME">%s</xliff:g>에게 이메일 보내기"</string>
-    <string name="menu_compose_new">"메시지 작성"</string>
-    <string name="menu_preferences">"설정"</string>
-    <string name="menu_add_address_to_contacts">"연락처에 <xliff:g id="NAME">%s</xliff:g> 추가"</string>
-    <string name="menu_call">"전화걸기"</string>
-    <string name="menu_delete_all">"대화 삭제"</string>
-    <string name="menu_delete">"삭제"</string>
-    <string name="menu_undelivered_messages">"전송되지 않은 메시지"</string>
-    <string name="menu_view">"보기"</string>
-    <string name="refreshing">"새로 고치는 중..."</string>
-    <string name="has_draft">"임시저장"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"익명"</string>
-    <string name="no_subject_view">"(제목 없음)"</string>
-    <string name="messagelist_sender_self">"나"</string>
-    <string name="view_picture">"사진 보기"</string>
-    <string name="view_slideshow">"슬라이드쇼 보기"</string>
-    <string name="view_message_details">"메시지 세부정보 보기"</string>
-    <string name="view_delivery_report">"보고 보기"</string>
-    <string name="delete_message">"메시지 삭제"</string>
-    <string name="sent_on">"보낸날짜: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"만료 날짜: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"KB"</string>
-    <string name="undelivered_msg_dialog_title">"전송되지 않은 메시지"</string>
-    <string name="undelivered_msg_dialog_body">"메시지를 보낼 수 없습니다."\n"마지막으로 시도한 시각은<xliff:g id="MESSAGE">%s</xliff:g>입니다."</string>
-    <string name="undelivered_sms_dialog_body">"메시지를 보낼 수 없습니다."</string>
-    <string name="delete_thread">"대화 삭제"</string>
-    <string name="menu_forward">"전달"</string>
-    <string name="download">"다운로드"</string>
-    <string name="downloading">"다운로드 중"</string>
-    <string name="inline_subject">"&lt;제목: <xliff:g id="SUBJECT">%s</xliff:g>&gt;"</string>
-    <string name="drm_protected_text">"* DRM 보호된 텍스트 *"</string>
-    <string name="insufficient_drm_rights">"DRM 권한이 충분하지 않습니다."</string>
-    <string name="copy_message_text">"메시지 텍스트 복사"</string>
-    <string name="message_options">"메시지 옵션"</string>
-    <string name="done">"완료"</string>
-    <string name="move_up">"위로 이동"</string>
-    <string name="move_down">"아래로 이동"</string>
-    <string name="remove_slide">"슬라이드 삭제"</string>
-    <string name="add_slide">"슬라이드 추가"</string>
-    <string name="add_slide_hint">"새 슬라이드를 만드세요."</string>
-    <string name="discard_slideshow">"슬라이드쇼 삭제"</string>
-    <string name="remove_text">"텍스트 삭제"</string>
-    <string name="add_picture">"사진 추가"</string>
-    <string name="remove_picture">"사진 삭제"</string>
-    <string name="add_music">"음악 추가"</string>
-    <string name="remove_music">"음악 삭제"</string>
-    <string name="add_video">"동영상 추가"</string>
-    <string name="remove_video">"동영상 삭제"</string>
-    <string name="compose_title">"메시지 작성"</string>
-    <string name="to_hint">"받는사람"</string>
-    <string name="subject_hint">"제목"</string>
-    <string name="add_attachment">"첨부"</string>
-    <string name="add_subject">"제목 추가"</string>
-    <string name="discard">"삭제"</string>
-    <string name="view">"보기"</string>
-    <string name="replace">"바꾸기"</string>
-    <string name="remove">"삭제"</string>
-    <string name="send">"보내기"</string>
-    <string name="all_threads">"모든 대화"</string>
-    <string name="type_to_compose_text_enter_to_send">"메시지 내용을 입력한 다음 Enter 키를 눌러 보냅니다."</string>
-    <string name="open_keyboard_to_compose_message">"키보드를 사용하여 메시지 작성"</string>
-    <string name="image_too_large">"사진 크기가 너무 큼"</string>
-    <string name="ask_for_automatically_resize">"보내기 전에 사진 크기를 자동으로 조정하시겠습니까?"</string>
-    <string name="compressing">"압축하는 중..."</string>
-    <string name="unsupported_media_format">"지원되지 않는 <xliff:g id="NAME">%1$s</xliff:g> 형식"</string>
-    <string name="select_different_media">"다른 <xliff:g id="NAME">%1$s</xliff:g>을(를) 선택하세요."</string>
-    <string name="exceed_message_size_limitation">"허용된 최대 메시지 크기에 도달했습니다."</string>
-    <string name="failed_to_add_media">"<xliff:g id="NAME">%1$s</xliff:g>은(는) 메시지에 추가할 수 없습니다."</string>
-    <string name="failed_to_resize_image">"사진 크기가 조정되지 않았습니다."</string>
-    <string name="resize_image_error_information">"사진의 크기를 조정했지만 아직도 전송할 수 없습니다."</string>
-    <string name="forward_prefix">"Fwd:"</string>
-    <string name="discard_message">"삭제"</string>
-    <string name="discard_message_reason">"유효한 수신자가 없으므로 메시지가 삭제됩니다."</string>
-    <string name="has_invalid_recipient">"유효하지 않은 수신자: &lt;<xliff:g id="NAME">%1$s</xliff:g>&gt;"</string>
-    <string name="invalid_recipient_message">"받는사람을 올바르게 지정하세요. 그렇지 않으면 메시지가 제대로 전송되지 않습니다."</string>
-    <string name="cannot_send_message">"메시지를 보낼 수 없음"</string>
-    <string name="cannot_send_message_reason">"메시지 받는사람이 올바르지 않습니다."</string>
-    <string name="cannot_forward_drm_obj">"메시지에 포함된 DRM 개체는 전달할 수 없습니다."</string>
-    <string name="converting_to_picture_message">"MMS 메시지로 변환 중…"</string>
-    <string name="converting_to_text_message">"SMS 메시지로 변환 중..."</string>
-    <string name="cannot_add_slide_anymore">"슬라이드를 더 이상 추가할 수 없습니다."</string>
-    <string name="cannot_save_message">"메시지를 저장할 수 없습니다."</string>
-    <string name="cannot_load_message">"메시지를 로드할 수 없습니다."</string>
-    <string name="message_saved_as_draft">"메시지가 임시저장되었습니다."</string>
-    <string name="cannot_play_audio">"오디오를 재생할 수 없습니다."</string>
-    <string name="preview">"미리보기"</string>
-    <string name="preview_slideshow">"미리보기"</string>
-    <string name="replace_image">"사진 바꾸기"</string>
-    <string name="duration_sec">"표시 시간(<xliff:g id="DURATION">%s</xliff:g>초)"</string>
-    <string name="duration_selector_title">"슬라이드 표시 시간"</string>
-    <string name="layout_selector_title">"슬라이드쇼 레이아웃"</string>
-    <string name="layout_top">"레이아웃(위)"</string>
-    <string name="layout_bottom">"레이아웃(아래)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"텍스트를 입력하거나 비워 두세요."</string>
-    <string name="secs">"초"</string>
-  <string-array name="select_dialog_items">
-    <item>"1초"</item>
-    <item>"2초"</item>
-    <item>"3초"</item>
-    <item>"4초"</item>
-    <item>"5초"</item>
-    <item>"6초"</item>
-    <item>"7초"</item>
-    <item>"8초"</item>
-    <item>"9초"</item>
-    <item>"10초"</item>
-    <item>"기타..."</item>
-  </string-array>
-    <string name="menu_view_contact">"연락처 보기"</string>
-    <string name="menu_add_to_contacts">"연락처에 추가"</string>
-    <string name="hidden_sender_address">"숨은 발신자 주소"</string>
-    <string name="yes">"확인"</string>
-    <string name="no">"취소"</string>
-    <string name="play">"재생"</string>
-    <string name="edit">"수정"</string>
-    <string name="resize">"크기조정"</string>
-    <string name="try_to_send">"보내기 시도"</string>
-    <string name="preferences_title">"설정"</string>
-    <string name="restore_default">"기본 설정값 복원"</string>
-    <string name="pref_notification_settings_title">"알림 설정"</string>
-    <string name="pref_mms_settings_title">"MMS 설정"</string>
-    <string name="pref_sms_settings_title">"SMS 설정"</string>
-    <string name="pref_summary_manage_sim_messages">"SIM 카드에 저장된 메시지 관리"</string>
-    <string name="pref_summary_mms_delivery_reports">"보내는 메시지마다 전송 여부 보고 요청"</string>
-    <string name="pref_summary_mms_read_reports">"보내는 메시지마다 읽음 여부 보고 요청"</string>
-    <string name="pref_summary_sms_delivery_reports">"보내는 메시지마다 전송 여부 보고 요청"</string>
-    <string name="pref_title_manage_sim_messages">"SIM 카드 메시지 관리"</string>
-    <string name="pref_title_mms_delivery_reports">"전송 여부 보고"</string>
-    <string name="pref_title_mms_read_reports">"읽음 여부 보고"</string>
-    <string name="pref_title_sms_delivery_reports">"전송 여부 보고"</string>
-    <string name="pref_title_notification_enabled">"알림"</string>
-    <string name="pref_summary_notification_enabled">"상태표시줄에 메시지 알림 표시"</string>
-    <string name="pref_title_notification_vibrate">"진동"</string>
-    <string name="pref_summary_notification_vibrate">"알림 시 진동도 함께 작동"</string>
-    <string name="pref_title_notification_ringtone">"벨소리 선택"</string>
-    <string name="pref_title_mms_auto_retrieval">"자동 검색"</string>
-    <string name="pref_summary_mms_auto_retrieval">"자동으로 메시지 검색"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"로밍 중에 자동 검색"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"로밍 중에 메시지를 자동으로 검색"</string>
-    <string name="to_label">"받는 사람"</string>
-    <string name="confirm_dialog_title">"삭제"</string>
-    <string name="confirm_delete_conversation">"전체 대화가 삭제됩니다."</string>
-    <string name="confirm_delete_all_conversations">"대화목록이 모두 삭제됩니다."</string>
-    <string name="confirm_delete_message">"메시지가 삭제됩니다."</string>
-    <string name="confirm_delete_all_messages">"전체 대화가 삭제됩니다."</string>
-    <string name="confirm_delete_all_SIM_messages">"SIM에 있는 모든 메일이 삭제됩니다."</string>
-    <string name="cannot_get_details">"세부정보를 가져올 수 없음"</string>
-    <string name="message_details_title">"메시지 세부정보"</string>
-    <string name="message_type_label">"유형:"</string>
-    <string name="text_message">"SMS 메시지"</string>
-    <string name="multimedia_message">"MMS 메시지"</string>
-    <string name="multimedia_notification">"MMS 알림"</string>
-    <string name="from_label">"보낸사람:"</string>
-    <string name="to_address_label">"받는사람:"</string>
-    <string name="bcc_label">"숨은 참조:"</string>
-    <string name="sent_label">"보낸 시간:"</string>
-    <string name="received_label">"받은 시간:"</string>
-    <string name="saved_label">"저장됨:"</string>
-    <string name="subject_label">"제목:"</string>
-    <string name="message_size_label">"메시지 크기:"</string>
-    <string name="priority_label">"중요도:"</string>
-    <string name="priority_high">"높음"</string>
-    <string name="priority_normal">"보통"</string>
-    <string name="priority_low">"낮음"</string>
-    <string name="message_class_label">"메시지 클래스:"</string>
-    <string name="menu_edit">"편집"</string>
-    <string name="menu_retry_sending">"보내기 재시도"</string>
-    <string name="menu_retry_sending_all">"모두 보내기 재시도"</string>
-    <string name="menu_delete_messages">"메시지 삭제"</string>
-    <string name="retrying_dialog_body">"연결 문제로 인해 <xliff:g id="MESSAGE">%s</xliff:g> 메시지가  전송되지 않았습니다."\n"재전송 시도 중..."</string>
-    <string name="sim_copy_to_phone_memory">"전화 메모리에 복사"</string>
-    <string name="sim_delete">"삭제"</string>
-    <string name="sim_manage_messages_title">"SIM 카드에 저장된 SMS 메시지"</string>
-    <string name="sim_view">"보기"</string>
-    <string name="sim_empty">"SIM 카드에 메시지가 없습니다."</string>
-    <string name="delivery_header_title">"보고"</string>
-    <string name="status_none">"(없음)"</string>
-    <string name="status_pending">"대기 중"</string>
-    <string name="status_read">"읽음"</string>
-    <string name="status_received">"받음"</string>
-    <string name="status_failed">"실패"</string>
-    <string name="status_unread">"읽지않음"</string>
-    <string name="status_rejected">"거부"</string>
-    <string name="recipient_label">"받는사람:"</string>
-    <string name="status_label">"상태:"</string>
-    <string name="attach_image">"사진"</string>
-    <string name="attach_take_photo">"사진촬영"</string>
-    <string name="attach_video">"동영상"</string>
-    <string name="attach_record_video">"동영상 캡처"</string>
-    <string name="attach_sound">"오디오"</string>
-    <string name="attach_record_sound">"음성 메시지"</string>
-    <string name="attach_slideshow">"슬라이드쇼"</string>
-    <string name="select_bottom_text">"텍스트를 아래쪽에"</string>
-    <string name="select_top_text">"텍스트를 위쪽에"</string>
-    <string name="notification_multiple">"읽지 않은 메시지가 <xliff:g id="COUNT">%s</xliff:g>개 있습니다."</string>
-    <string name="notification_multiple_title">"새 메시지"</string>
-    <string name="sim_full_title">"SIM 카드 용량이 가득 참"</string>
-    <string name="sim_full_body">"저장 공간을 늘리려면 메시지를 일부 삭제하세요."</string>
-    <string name="type_audio">"오디오"</string>
-    <string name="type_picture">"사진"</string>
-    <string name="type_video">"동영상"</string>
-    <string name="confirm">"확인"</string>
-    <string name="message_send_read_report">"읽음 여부 보고가 전송됩니다."</string>
-    <string name="message_queued">"메시지를 보낼 수 없습니다. 서비스가 복구되면 전송됩니다."</string>
-    <string name="no_subject">"(제목 없음)"</string>
-    <string name="unknown_sender">"보낸사람을 알 수 없음"</string>
-    <string name="dl_failure_notification">"<xliff:g id="FROM">%s</xliff:g>이(가) 보낸 <xliff:g id="SUBJECT">%s</xliff:g> 메시지를 다운로드하지 못했습니다."</string>
-    <string name="rate_limit_surpassed">"확인"</string>
-    <string name="confirm_rate_limit">"많은 수의 멀티미디어 메시지를 보내려고 합니다. 계속하시겠습니까?"</string>
-    <string name="message_download_failed_title">"메시지를 다운로드하지 못했습니다."</string>
-    <string name="message_send_failed_title">"메시지를 보내지 못함"</string>
-    <string name="message_failed_body">"메시지를 검토한 다음 다시 시도해 보세요."</string>
-    <string name="download_later">"메시지를 다운로드할 수 없습니다. 잠시 후 다시 시도해 주세요."</string>
-    <string name="select_audio">"오디오 선택"</string>
-    <string name="copy_to_sdcard">"SD 카드에 첨부파일 복사"</string>
-    <string name="copy_to_sdcard_success">"SD 카드에 첨부파일이 복사되었습니다."</string>
-    <string name="copy_to_sdcard_fail">"SD 카드에 첨부물을 복사하지 못했습니다."</string>
-    <string name="menu_insert_smiley">"이모티콘 삽입"</string>
-    <string name="select_link_title">"동작 선택"</string>
-</resources>
diff --git a/res/values-nb/arrays.xml b/res/values-nb/arrays.xml
deleted file mode 100644
index 1a3efd8..0000000
--- a/res/values-nb/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\\\\\\\"</item>
-    <item>":\\\\\\\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"Glad"</item>
-    <item>"Trist"</item>
-    <item>"Blunker"</item>
-    <item>"Rekker tunge"</item>
-    <item>"Overrasket"</item>
-    <item>"Kys"</item>
-    <item>"Roper"</item>
-    <item>"Kul"</item>
-    <item>"Pengemunn"</item>
-    <item>"Fot i munnen"</item>
-    <item>"Flau"</item>
-    <item>"Engel"</item>
-    <item>"Usikker"</item>
-    <item>"Gråter"</item>
-    <item>"Stille som graven"</item>
-    <item>"Ler"</item>
-    <item>"Forvirret"</item>
-  </string-array>
-</resources>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
deleted file mode 100644
index 826f0ec..0000000
--- a/res/values-nb/strings.xml
+++ /dev/null
@@ -1,244 +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="app_label">"Meldinger"</string>
-    <string name="new_message">"Ny melding"</string>
-    <string name="create_new_message">"Skriv ny melding"</string>
-    <string name="menu_call_back">"Ring <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_send_email">"Send e-post til <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_compose_new">"Skriv melding"</string>
-    <string name="menu_preferences">"Innstillinger"</string>
-    <string name="menu_add_address_to_contacts">"Legg <xliff:g id="NAME">%s</xliff:g> til som kontakt"</string>
-    <string name="menu_call">"Ring"</string>
-    <string name="menu_delete_all">"Slett tråder"</string>
-    <string name="menu_delete">"Slett"</string>
-    <string name="menu_undelivered_messages">"Ikke leverte meldinger"</string>
-    <string name="menu_view">"Vis"</string>
-    <string name="refreshing">"Synkroniserer…"</string>
-    <string name="has_draft">"Utkast"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"Anonym"</string>
-    <string name="no_subject_view">"(Mangler emne)"</string>
-    <string name="messagelist_sender_self">"Meg"</string>
-    <string name="view_picture">"Vis bilde"</string>
-    <string name="view_slideshow">"Vis bildeserie"</string>
-    <string name="view_message_details">"Vis meldingsdetaljer"</string>
-    <string name="view_delivery_report">"Vis rapport"</string>
-    <string name="delete_message">"Slett melding"</string>
-    <string name="sent_on">"Sendt: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"Utgår: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"kB"</string>
-    <string name="undelivered_msg_dialog_title">"Melding ikke levert"</string>
-    <string name="undelivered_msg_dialog_body">"Kunne ikke sende meldingen."\n"Forsøkte: <xliff:g id="MESSAGE">%s</xliff:g>."</string>
-    <string name="undelivered_sms_dialog_body">"Kunne ikke sende meldingen."</string>
-    <string name="delete_thread">"Slett tråd"</string>
-    <string name="menu_forward">"Videresend"</string>
-    <string name="download">"Last ned"</string>
-    <string name="downloading">"Laster ned"</string>
-    <string name="inline_subject">"&lt;Emne: <xliff:g id="SUBJECT">%s</xliff:g>&gt;"</string>
-    <string name="drm_protected_text">"* DRM-beskyttet tekst *"</string>
-    <string name="insufficient_drm_rights">"Oppdaget utilstrekkelige DRM-rettigheter."</string>
-    <string name="copy_message_text">"Kopier meldingstekst"</string>
-    <string name="message_options">"Innstillinger for melding"</string>
-    <string name="done">"Utført"</string>
-    <string name="move_up">"Flytt opp"</string>
-    <string name="move_down">"Flytt ned"</string>
-    <string name="remove_slide">"Fjern lysbilde"</string>
-    <string name="add_slide">"Legg til lysbilde"</string>
-    <string name="add_slide_hint">"Velg for å lage nytt bilde"</string>
-    <string name="discard_slideshow">"Forkast bildeserie"</string>
-    <string name="remove_text">"Fjern tekst"</string>
-    <string name="add_picture">"Legg til bilde"</string>
-    <string name="remove_picture">"Fjern bilde"</string>
-    <string name="add_music">"Legg til musikk"</string>
-    <string name="remove_music">"Fjern musikk"</string>
-    <string name="add_video">"Legg til video"</string>
-    <string name="remove_video">"Fjern video"</string>
-    <string name="compose_title">"Skriv melding"</string>
-    <string name="to_hint">"Til"</string>
-    <string name="subject_hint">"Emne"</string>
-    <string name="add_attachment">"Legg ved"</string>
-    <string name="add_subject">"Legg til emne"</string>
-    <string name="discard">"Forkast"</string>
-    <string name="view">"Vis"</string>
-    <string name="replace">"Erstatt"</string>
-    <string name="remove">"Fjern"</string>
-    <string name="send">"Send"</string>
-    <string name="all_threads">"Alle tråder"</string>
-    <string name="type_to_compose_text_enter_to_send">"Skriv melding, trykk Enter for å sende"</string>
-    <string name="open_keyboard_to_compose_message">"Åpne tastaturet for å skrive en melding"</string>
-    <string name="image_too_large">"Bildet er for stort"</string>
-    <string name="ask_for_automatically_resize">"Gjør bildet mindre før sending?"</string>
-    <string name="compressing">"Komprimerer…"</string>
-    <string name="unsupported_media_format">"Ustøttet <xliff:g id="NAME">%1$s</xliff:g>-format"</string>
-    <string name="select_different_media">"Vennligst velg et annet <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <string name="exceed_message_size_limitation">"Maksimal meldingsstørelse nådd."</string>
-    <string name="failed_to_add_media">"Beklager, du kan ikke legge dette <xliff:g id="NAME">%1$s</xliff:g>et til meldingen din."</string>
-    <string name="failed_to_resize_image">"Bildet ble ikke skalert."</string>
-    <string name="resize_image_error_information">"Beklager, selv etter skalering er dette bildet for stort."</string>
-    <string name="forward_prefix">"Fwd:"</string>
-    <string name="discard_message">"Forkast"</string>
-    <string name="discard_message_reason">"Meldingen vil bli forkastet, siden den ikke har noen gyldige mottagere."</string>
-    <string name="has_invalid_recipient">"Ugyldig(e) mottager(e): &lt;<xliff:g id="NAME">%1$s</xliff:g>&gt;"</string>
-    <string name="invalid_recipient_message">"Vennligst rett dem opp, ellers vil de ikke motta meldingen."</string>
-    <string name="cannot_send_message">"Kan ikke sende meldingen"</string>
-    <string name="cannot_send_message_reason">"Your message has no valid recipients."</string>
-    <string name="cannot_forward_drm_obj">"DRM-objektet inkludert i denne meldingen kan ikke sendes videre."</string>
-    <string name="converting_to_picture_message">"Konverterer til MMS-melding…"</string>
-    <string name="converting_to_text_message">"Konverterer til SMS-melding…"</string>
-    <string name="cannot_add_slide_anymore">"Kan ikke legge til flere lysbilder."</string>
-    <string name="cannot_save_message">"Kan ikke lagre meldingen."</string>
-    <string name="cannot_load_message">"Kan ikke laste meldingen."</string>
-    <string name="message_saved_as_draft">"Meldingen ble lagret som utkast."</string>
-    <string name="cannot_play_audio">"Kan ikke spille av lyd."</string>
-    <string name="preview">"Forhåndsvisning"</string>
-    <string name="preview_slideshow">"Forhåndsvisning"</string>
-    <string name="replace_image">"Erstatt bilde"</string>
-    <string name="duration_sec">"Varighet (<xliff:g id="DURATION">%s</xliff:g> sek)"</string>
-    <string name="duration_selector_title">"Varighet for lysbilde"</string>
-    <string name="layout_selector_title">"Lysbilde-layout"</string>
-    <string name="layout_top">"Layout (topp)"</string>
-    <string name="layout_bottom">"Layout (bunn)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"Skriv for å legge til tekst, eller la stå tom"</string>
-    <string name="secs">"sek"</string>
-  <string-array name="select_dialog_items">
-    <item>"1 sekund"</item>
-    <item>"2 sekunder"</item>
-    <item>"3 sekunder"</item>
-    <item>"4 sekunder"</item>
-    <item>"5 sekunder"</item>
-    <item>"6 sekunder"</item>
-    <item>"7 sekunder"</item>
-    <item>"8 sekunder"</item>
-    <item>"9 sekunder"</item>
-    <item>"10 sekunder"</item>
-    <item>"Annet…"</item>
-  </string-array>
-    <string name="menu_view_contact">"Vis kontakt"</string>
-    <string name="menu_add_to_contacts">"Legg til som kontakt"</string>
-    <string name="hidden_sender_address">"Skjult avsenderadresse"</string>
-    <string name="yes">"OK"</string>
-    <string name="no">"Avbryt"</string>
-    <string name="play">"Spill"</string>
-    <string name="edit">"Rediger"</string>
-    <string name="resize">"Skaler"</string>
-    <string name="try_to_send">"Prøv å sende"</string>
-    <string name="preferences_title">"Innstillinger"</string>
-    <string name="restore_default">"Gjennopprett standardinnstillinger"</string>
-    <string name="pref_notification_settings_title">"Innstillinger for varsling"</string>
-    <string name="pref_mms_settings_title">"MMS-innstillinger"</string>
-    <string name="pref_sms_settings_title">"SMS-innstillinger"</string>
-    <string name="pref_summary_manage_sim_messages">"Administrer meldinger lagret på SIM-kortet"</string>
-    <string name="pref_summary_mms_delivery_reports">"Spør om leveringsrapport for hver melding som sendes"</string>
-    <string name="pref_summary_mms_read_reports">"Spør om leserapport for hver melding som sendes"</string>
-    <string name="pref_summary_sms_delivery_reports">"Spør om leveringsrapport for hver melding som sendes"</string>
-    <string name="pref_title_manage_sim_messages">"SIM-kort-meldinger"</string>
-    <string name="pref_title_mms_delivery_reports">"Leveringsrapporter"</string>
-    <string name="pref_title_mms_read_reports">"Leserapporter"</string>
-    <string name="pref_title_sms_delivery_reports">"Leveringsrapporter"</string>
-    <string name="pref_title_notification_enabled">"Varslinger"</string>
-    <string name="pref_summary_notification_enabled">"Vis meldingsvarslinger i statusfeltet"</string>
-    <string name="pref_title_notification_vibrate">"Vibrer"</string>
-    <string name="pref_summary_notification_vibrate">"Vibrer ved varsling"</string>
-    <string name="pref_title_notification_ringtone">"Velg ringetone"</string>
-    <string name="pref_title_mms_auto_retrieval">"Autohent"</string>
-    <string name="pref_summary_mms_auto_retrieval">"Hent meldinger automatisk"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"Omstreifende autohent"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"Hent meldinger automatisk ved roaming"</string>
-    <string name="to_label">"Til"</string>
-    <string name="confirm_dialog_title">"Slett"</string>
-    <string name="confirm_delete_conversation">"Hele tråden vil bli slettet."</string>
-    <string name="confirm_delete_all_conversations">"Alle tråder vil bli slettet."</string>
-    <string name="confirm_delete_message">"Denne meldingen vil bli slettet."</string>
-    <string name="confirm_delete_all_messages">"Hele tråden vil bli slettet.\n\n\n65701806463341097\nAlle meldinger på SIM-kortet vil bli slettet."</string>
-    <!-- no translation found for confirm_delete_all_SIM_messages (65701806463341097) -->
-    <skip />
-    <string name="cannot_get_details">"Kan ikke hente detaljer"</string>
-    <string name="message_details_title">"Meldingsdetaljer"</string>
-    <string name="message_type_label">"Type:"</string>
-    <string name="text_message">"SMS-melding"</string>
-    <string name="multimedia_message">"MMS-melding"</string>
-    <string name="multimedia_notification">"MMS-varsling"</string>
-    <string name="from_label">"Fra:"</string>
-    <string name="to_address_label">"Til:"</string>
-    <string name="bcc_label">"Blindkopi:"</string>
-    <string name="sent_label">"Sendt:"</string>
-    <string name="received_label">"Mottatt:"</string>
-    <string name="saved_label">"Lagret:"</string>
-    <string name="subject_label">"Emne:"</string>
-    <string name="message_size_label">"Meldingsstørrelse:"</string>
-    <string name="priority_label">"Prioritet:"</string>
-    <string name="priority_high">"Høy"</string>
-    <string name="priority_normal">"Vanlig"</string>
-    <string name="priority_low">"Lav"</string>
-    <string name="message_class_label">"Meldingsklasse:"</string>
-    <string name="menu_edit">"Rediger"</string>
-    <string name="menu_retry_sending">"Prøv å sende på nytt"</string>
-    <string name="menu_retry_sending_all">"Prøv å sende alle på nytt"</string>
-    <string name="menu_delete_messages">"Slett meldinger"</string>
-    <string name="retrying_dialog_body">"Denne meldingen, <xliff:g id="MESSAGE">%s</xliff:g>, ble ikke sendt på grunn av et tilkoblingsproblem."\n"Prøver å sende på nytt…"</string>
-    <string name="sim_copy_to_phone_memory">"Kopier til telefonminne"</string>
-    <string name="sim_delete">"Slett"</string>
-    <string name="sim_manage_messages_title">"SMS-meldinger på SIM-kort"</string>
-    <string name="sim_view">"Vis"</string>
-    <string name="sim_empty">"Ingen meldinger på SIM-kortet."</string>
-    <string name="delivery_header_title">"Rapport"</string>
-    <string name="status_none">"(Ingen)"</string>
-    <string name="status_pending">"Pågår"</string>
-    <string name="status_read">"Lest"</string>
-    <string name="status_received">"Mottatt"</string>
-    <string name="status_failed">"Mislykket"</string>
-    <string name="status_unread">"Ulest"</string>
-    <string name="status_rejected">"Avvist"</string>
-    <string name="recipient_label">"Mottager:"</string>
-    <string name="status_label">"Status:"</string>
-    <string name="attach_image">"Bilder"</string>
-    <string name="attach_take_photo">"Kamera"</string>
-    <string name="attach_video">"Video"</string>
-    <string name="attach_record_video">"Ta opp video"</string>
-    <string name="attach_sound">"Lyd"</string>
-    <string name="attach_record_sound">"Ta opp lyd"</string>
-    <string name="attach_slideshow">"Lysbildevisning"</string>
-    <string name="select_bottom_text">"Tekst på bunnen"</string>
-    <string name="select_top_text">"Text på toppen"</string>
-    <string name="notification_multiple">"<xliff:g id="COUNT">%s</xliff:g> uleste meldinger."</string>
-    <string name="notification_multiple_title">"Nye meldinger"</string>
-    <string name="sim_full_title">"SIM-kort fullt"</string>
-    <string name="sim_full_body">"Fjern noen meldinger for å gjøre plass til flere."</string>
-    <string name="type_audio">"lyden"</string>
-    <string name="type_picture">"bildet"</string>
-    <string name="type_video">"videoen"</string>
-    <string name="confirm">"Bekreft"</string>
-    <string name="message_send_read_report">"En leserapport vil bli sendt."</string>
-    <string name="message_queued">"Kunne ikke sende meldingen nå. Den vil bli sendt når tjenesten blir tilgjengelig."</string>
-    <string name="no_subject">"(Mangler emne)"</string>
-    <string name="unknown_sender">"Ukjent sender"</string>
-    <string name="dl_failure_notification">"Kunne ikke laste ned meldingen <xliff:g id="SUBJECT">%s</xliff:g> fra <xliff:g id="FROM">%s</xliff:g>."</string>
-    <string name="rate_limit_surpassed">"Bekreft"</string>
-    <string name="confirm_rate_limit">"Et stort antall multimediemeldinger blir sendt. Er dette OK?"</string>
-    <string name="message_download_failed_title">"Melding ikke lastet ned"</string>
-    <string name="message_send_failed_title">"Melding ikke sendt"</string>
-    <string name="message_failed_body">"Velg for å se over meldingen, og prøv igjen."</string>
-    <string name="download_later">"Kunne ikke laste ned nå. Prøv igjen senere."</string>
-    <string name="select_audio">"Velg lyd"</string>
-    <string name="copy_to_sdcard">"Kopier vedlegg til minnekort"</string>
-    <string name="copy_to_sdcard_success">"Kopiert vedlegg til minnekort"</string>
-    <string name="copy_to_sdcard_fail">"Kunne ikke kopiere vedlegg til minnekort"</string>
-    <string name="menu_insert_smiley">"Sett inn smilefjes"</string>
-    <string name="select_link_title">"Velg handling"</string>
-</resources>
diff --git a/res/values-nl/arrays.xml b/res/values-nl/arrays.xml
deleted file mode 100644
index 763f186..0000000
--- a/res/values-nl/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"Blij"</item>
-    <item>"Bedroefd"</item>
-    <item>"Knipoog"</item>
-    <item>"Tong uitsteken"</item>
-    <item>"Verrast"</item>
-    <item>"Kussend"</item>
-    <item>"Schreeuwend"</item>
-    <item>"Cool"</item>
-    <item>"Geldzoeker"</item>
-    <item>"Mond vol tanden"</item>
-    <item>"Beschaamd"</item>
-    <item>"Engel"</item>
-    <item>"Twijfelend"</item>
-    <item>"Huilend"</item>
-    <item>"Lippen op elkaar"</item>
-    <item>"Lachend"</item>
-    <item>"Verward"</item>
-  </string-array>
-</resources>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
deleted file mode 100644
index bfd3a49..0000000
--- a/res/values-nl/strings.xml
+++ /dev/null
@@ -1,243 +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="app_label">"Berichten"</string>
-    <string name="new_message">"Nieuw bericht"</string>
-    <string name="create_new_message">"Nieuw bericht opstellen"</string>
-    <string name="menu_call_back">"<xliff:g id="NAME">%s</xliff:g> bellen"</string>
-    <string name="menu_send_email">"E-mail verzenden aan <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_compose_new">"Opstellen"</string>
-    <string name="menu_preferences">"Instellingen"</string>
-    <string name="menu_add_address_to_contacts">"<xliff:g id="NAME">%s</xliff:g> toevoegen aan contactpersonen"</string>
-    <string name="menu_call">"Bellen"</string>
-    <string name="menu_delete_all">"Threads verwijderen"</string>
-    <string name="menu_delete">"Verwijderen"</string>
-    <string name="menu_undelivered_messages">"Niet-afgeleverde berichten"</string>
-    <string name="menu_view">"Weergeven"</string>
-    <string name="refreshing">"Vernieuwen..."</string>
-    <string name="has_draft">"Concept"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"Anoniem"</string>
-    <string name="no_subject_view">"(Geen onderwerp)"</string>
-    <string name="messagelist_sender_self">"Ik"</string>
-    <string name="view_picture">"Foto weergeven"</string>
-    <string name="view_slideshow">"Diavoorstelling weergeven"</string>
-    <string name="view_message_details">"Berichtdetails weergeven"</string>
-    <string name="view_delivery_report">"Rapport weergeven"</string>
-    <string name="delete_message">"Bericht verwijderen"</string>
-    <string name="sent_on">"Verzonden: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"Verloopt op: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"kB"</string>
-    <string name="undelivered_msg_dialog_title">"Niet-afgeleverd bericht"</string>
-    <string name="undelivered_msg_dialog_body">"Kan dit bericht niet verzenden."\n"Poging: <xliff:g id="MESSAGE">%s</xliff:g>."</string>
-    <string name="undelivered_sms_dialog_body">"Kan dit bericht niet verzenden."</string>
-    <string name="delete_thread">"Thread verwijderen"</string>
-    <string name="menu_forward">"Doorsturen"</string>
-    <string name="download">"Downloaden"</string>
-    <string name="downloading">"Downloaden"</string>
-    <string name="inline_subject">"&lt;Onderwerp: <xliff:g id="SUBJECT">%s</xliff:g>&gt;"</string>
-    <string name="drm_protected_text">"* DRM-beschermde tekst *"</string>
-    <string name="insufficient_drm_rights">"Onvoldoende DRM-rechten gedetecteerd."</string>
-    <string name="copy_message_text">"Tekst van bericht kopiëren"</string>
-    <string name="message_options">"Berichtopties"</string>
-    <string name="done">"Gereed"</string>
-    <string name="move_up">"Naar boven"</string>
-    <string name="move_down">"Naar beneden"</string>
-    <string name="remove_slide">"Dia verwijderen"</string>
-    <string name="add_slide">"Dia toevoegen"</string>
-    <string name="add_slide_hint">"Selecteer dit om een nieuwe dia te maken."</string>
-    <string name="discard_slideshow">"Diavoorstelling weggooien"</string>
-    <string name="remove_text">"Tekst verwijderen"</string>
-    <string name="add_picture">"Foto toevoegen"</string>
-    <string name="remove_picture">"Foto verwijderen"</string>
-    <string name="add_music">"Muziek toevoegen"</string>
-    <string name="remove_music">"Muziek verwijderen"</string>
-    <string name="add_video">"Video toevoegen"</string>
-    <string name="remove_video">"Video verwijderen"</string>
-    <string name="compose_title">"Opstellen"</string>
-    <string name="to_hint">"Aan"</string>
-    <string name="subject_hint">"Onderwerp"</string>
-    <string name="add_attachment">"Bijvoegen"</string>
-    <string name="add_subject">"Onderwerp toevoegen"</string>
-    <string name="discard">"Weggooien"</string>
-    <string name="view">"Weergeven"</string>
-    <string name="replace">"Vervangen"</string>
-    <string name="remove">"Verwijderen"</string>
-    <string name="send">"Verzenden"</string>
-    <string name="all_threads">"Alle threads"</string>
-    <string name="type_to_compose_text_enter_to_send">"Typ om tekst in te voeren, druk op Enter om te verzenden"</string>
-    <string name="open_keyboard_to_compose_message">"Toetsenbord openen om bericht op te stellen"</string>
-    <string name="image_too_large">"Foto te groot"</string>
-    <string name="ask_for_automatically_resize">"Formaat van foto automatisch aanpassen vóór verzending?"</string>
-    <string name="compressing">"Comprimeren..."</string>
-    <string name="unsupported_media_format">"Niet-ondersteunde indeling voor <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <string name="select_different_media">"Selecteer een ander item (<xliff:g id="NAME">%1$s</xliff:g>)."</string>
-    <string name="exceed_message_size_limitation">"Limiet berichtgrootte bereikt."</string>
-    <string name="failed_to_add_media">"U kunt dit item (<xliff:g id="NAME">%1$s</xliff:g>) niet aan uw bericht toevoegen."</string>
-    <string name="failed_to_resize_image">"Formaat van foto is niet aangepast."</string>
-    <string name="resize_image_error_information">"Zelfs nadat het formaat is aangepast, is deze foto te groot voor verzending."</string>
-    <string name="forward_prefix">"Fw:"</string>
-    <string name="discard_message">"Weggooien"</string>
-    <string name="discard_message_reason">"Uw bericht wordt weggegooid, omdat het geen geldige ontvangers heeft."</string>
-    <string name="has_invalid_recipient">"Ongeldige ontvanger(s): &lt;<xliff:g id="NAME">%1$s</xliff:g>&gt;"</string>
-    <string name="invalid_recipient_message">"Corrigeer de ontvangers, anders ontvangen ze het bericht niet."</string>
-    <string name="cannot_send_message">"Kan dit bericht niet verzenden"</string>
-    <string name="cannot_send_message_reason">"Uw bericht heeft geen geldige ontvangers."</string>
-    <string name="cannot_forward_drm_obj">"Het DRM-object in het bericht kan niet worden doorgestuurd."</string>
-    <string name="converting_to_picture_message">"Converteren naar MMS-bericht..."</string>
-    <string name="converting_to_text_message">"Converteren naar SMS-bericht..."</string>
-    <string name="cannot_add_slide_anymore">"Kan niet meer dia\'s toevoegen."</string>
-    <string name="cannot_save_message">"Bericht kan niet worden opgeslagen."</string>
-    <string name="cannot_load_message">"Kan bericht niet laden."</string>
-    <string name="message_saved_as_draft">"Bericht opgeslagen als concept."</string>
-    <string name="cannot_play_audio">"Audio kan niet worden afgespeeld."</string>
-    <string name="preview">"Voorbeeld"</string>
-    <string name="preview_slideshow">"Voorbeeld"</string>
-    <string name="replace_image">"Foto vervangen"</string>
-    <string name="duration_sec">"Duur (<xliff:g id="DURATION">%s</xliff:g> sec)"</string>
-    <string name="duration_selector_title">"Duur voor dia"</string>
-    <string name="layout_selector_title">"Lay-out van diavoorstelling"</string>
-    <string name="layout_top">"Indeling (bovenaan)"</string>
-    <string name="layout_bottom">"Indeling (onderaan)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"Typ om tekst in te voeren of laat leeg"</string>
-    <string name="secs">"seconden"</string>
-  <string-array name="select_dialog_items">
-    <item>"1 seconde"</item>
-    <item>"2 seconden"</item>
-    <item>"3 seconden"</item>
-    <item>"4 seconden"</item>
-    <item>"5 seconden"</item>
-    <item>"6 seconden"</item>
-    <item>"7 seconden"</item>
-    <item>"8 seconden"</item>
-    <item>"9 seconden"</item>
-    <item>"10 seconden"</item>
-    <item>"Anders..."</item>
-  </string-array>
-    <string name="menu_view_contact">"Contactpersoon weergeven"</string>
-    <string name="menu_add_to_contacts">"Toevoegen aan contactpersonen"</string>
-    <string name="hidden_sender_address">"Verborgen adres verzender"</string>
-    <string name="yes">"OK"</string>
-    <string name="no">"Annuleren"</string>
-    <string name="play">"Afspelen"</string>
-    <string name="edit">"Bewerken"</string>
-    <string name="resize">"Formaat aanpassen"</string>
-    <string name="try_to_send">"Poging tot verzenden"</string>
-    <string name="preferences_title">"Instellingen"</string>
-    <string name="restore_default">"Standaardinstellingen terugzetten"</string>
-    <string name="pref_notification_settings_title">"Meldingsinstellingen"</string>
-    <string name="pref_mms_settings_title">"MMS-instellingen"</string>
-    <string name="pref_sms_settings_title">"SMS-instellingen"</string>
-    <string name="pref_summary_manage_sim_messages">"Berichten op uw SIM-kaart beheren"</string>
-    <string name="pref_summary_mms_delivery_reports">"Leveringsrapport voor elk verzonden bericht aanvragen"</string>
-    <string name="pref_summary_mms_read_reports">"Leesrapport voor elk verzonden bericht aanvragen"</string>
-    <string name="pref_summary_sms_delivery_reports">"Leveringsrapport voor elk verzonden bericht aanvragen"</string>
-    <string name="pref_title_manage_sim_messages">"Berichten op SIM-kaart beheren"</string>
-    <string name="pref_title_mms_delivery_reports">"Leveringsrapporten"</string>
-    <string name="pref_title_mms_read_reports">"Rapporten lezen"</string>
-    <string name="pref_title_sms_delivery_reports">"Leveringsrapporten"</string>
-    <string name="pref_title_notification_enabled">"Meldingen"</string>
-    <string name="pref_summary_notification_enabled">"Berichtmeldingen in statusbalk weergeven"</string>
-    <string name="pref_title_notification_vibrate">"Trillen"</string>
-    <string name="pref_summary_notification_vibrate">"Ook trillen bij melding"</string>
-    <string name="pref_title_notification_ringtone">"Beltoon selecteren"</string>
-    <string name="pref_title_mms_auto_retrieval">"Automatisch ophalen"</string>
-    <string name="pref_summary_mms_auto_retrieval">"Berichten automatisch ophalen"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"Automatisch ophalen tijdens roaming"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"Berichten automatisch ophalen tijdens roaming"</string>
-    <string name="to_label">"Aan"</string>
-    <string name="confirm_dialog_title">"Verwijderen"</string>
-    <string name="confirm_delete_conversation">"De volledige thread wordt verwijderd."</string>
-    <string name="confirm_delete_all_conversations">"Alle threads worden verwijderd."</string>
-    <string name="confirm_delete_message">"Het bericht wordt verwijderd."</string>
-    <string name="confirm_delete_all_messages">"De volledige thread wordt verwijderd."</string>
-    <string name="confirm_delete_all_SIM_messages">"Alle berichten op de SIM-kaart worden verwijderd."</string>
-    <string name="cannot_get_details">"Kan details niet ophalen"</string>
-    <string name="message_details_title">"Berichtdetails"</string>
-    <string name="message_type_label">"Type:"</string>
-    <string name="text_message">"SMS-bericht"</string>
-    <string name="multimedia_message">"MMS-bericht"</string>
-    <string name="multimedia_notification">"MMS-melding"</string>
-    <string name="from_label">"Van:"</string>
-    <string name="to_address_label">"Aan:"</string>
-    <string name="bcc_label">"Bcc:"</string>
-    <string name="sent_label">"Verzonden:"</string>
-    <string name="received_label">"Ontvangen:"</string>
-    <string name="saved_label">"Opgeslagen:"</string>
-    <string name="subject_label">"Onderwerp:"</string>
-    <string name="message_size_label">"Berichtgrootte:"</string>
-    <string name="priority_label">"Prioriteit:"</string>
-    <string name="priority_high">"Hoog"</string>
-    <string name="priority_normal">"Normaal"</string>
-    <string name="priority_low">"Laag"</string>
-    <string name="message_class_label">"Berichtklasse:"</string>
-    <string name="menu_edit">"Bewerken"</string>
-    <string name="menu_retry_sending">"Nieuwe verzendpoging"</string>
-    <string name="menu_retry_sending_all">"Nieuwe verzendpoging voor alles"</string>
-    <string name="menu_delete_messages">"Berichten verwijderen"</string>
-    <string name="retrying_dialog_body">"Dit bericht <xliff:g id="MESSAGE">%s</xliff:g> is niet verzonden vanwege een verbindingsprobleem."\n"Nieuwe verzendpoging…"</string>
-    <string name="sim_copy_to_phone_memory">"Kopiëren naar telefoongeheugen"</string>
-    <string name="sim_delete">"Verwijderen"</string>
-    <string name="sim_manage_messages_title">"SMS-berichten op SIM-kaart"</string>
-    <string name="sim_view">"Weergeven"</string>
-    <string name="sim_empty">"Geen berichten op de SIM-kaart."</string>
-    <string name="delivery_header_title">"Rapport"</string>
-    <string name="status_none">"(Geen)"</string>
-    <string name="status_pending">"In behandeling"</string>
-    <string name="status_read">"Lezen"</string>
-    <string name="status_received">"Ontvangen"</string>
-    <string name="status_failed">"Mislukt"</string>
-    <string name="status_unread">"Ongelezen"</string>
-    <string name="status_rejected">"Afgewezen"</string>
-    <string name="recipient_label">"Ontvanger:"</string>
-    <string name="status_label">"Status:"</string>
-    <string name="attach_image">"Foto\'s"</string>
-    <string name="attach_take_photo">"Foto nemen"</string>
-    <string name="attach_video">"Video\'s"</string>
-    <string name="attach_record_video">"Video opnemen"</string>
-    <string name="attach_sound">"Audio"</string>
-    <string name="attach_record_sound">"Audio opnemen"</string>
-    <string name="attach_slideshow">"Diavoorstelling"</string>
-    <string name="select_bottom_text">"Tekst onderaan"</string>
-    <string name="select_top_text">"Tekst bovenaan"</string>
-    <string name="notification_multiple">"<xliff:g id="COUNT">%s</xliff:g> ongelezen berichten."</string>
-    <string name="notification_multiple_title">"Nieuwe berichten"</string>
-    <string name="sim_full_title">"SIM-kaart vol"</string>
-    <string name="sim_full_body">"Verwijder enkele berichten om ruimte vrij te maken voor nieuwe berichten."</string>
-    <string name="type_audio">"audio"</string>
-    <string name="type_picture">"foto"</string>
-    <string name="type_video">"video"</string>
-    <string name="confirm">"Bevestigen"</string>
-    <string name="message_send_read_report">"Er wordt een leesrapport verzonden."</string>
-    <string name="message_queued">"Uw bericht kan momenteel niet worden verzonden. Het wordt verzonden als de service beschikbaar komt."</string>
-    <string name="no_subject">"(Geen onderwerp)"</string>
-    <string name="unknown_sender">"Onbekende afzender"</string>
-    <string name="dl_failure_notification">"Downloaden van bericht <xliff:g id="SUBJECT">%s</xliff:g> van <xliff:g id="FROM">%s</xliff:g> is mislukt."</string>
-    <string name="rate_limit_surpassed">"Bevestigen"</string>
-    <string name="confirm_rate_limit">"Er wordt een groot aantal multimediaberichten verzonden. Is dat OK?"</string>
-    <string name="message_download_failed_title">"Bericht niet gedownload"</string>
-    <string name="message_send_failed_title">"Bericht niet verzonden"</string>
-    <string name="message_failed_body">"Selecteer dit om het bericht te controleren en opnieuw te proberen."</string>
-    <string name="download_later">"Kan momenteel niet downloaden. Probeer het later opnieuw."</string>
-    <string name="select_audio">"Audio selecteren"</string>
-    <string name="copy_to_sdcard">"Bijlage kopiëren naar SD-kaart"</string>
-    <string name="copy_to_sdcard_success">"Bijlage gekopiërd naar SD-kaart"</string>
-    <string name="copy_to_sdcard_fail">"Kan de bijlage niet kopiëren naar de SD-kaart"</string>
-    <string name="menu_insert_smiley">"Smiley invoegen"</string>
-    <string name="select_link_title">"Actie selecteren"</string>
-</resources>
diff --git a/res/values-pl/arrays.xml b/res/values-pl/arrays.xml
deleted file mode 100644
index cf9f669..0000000
--- a/res/values-pl/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"Zadowolenie"</item>
-    <item>"Smutek"</item>
-    <item>"Mrugnięcie"</item>
-    <item>"Wystający język"</item>
-    <item>"Zdziwienie"</item>
-    <item>"Całus"</item>
-    <item>"Krzyk"</item>
-    <item>"Super"</item>
-    <item>"Pazerność"</item>
-    <item>"Gafa"</item>
-    <item>"Zakłopotanie"</item>
-    <item>"Anioł"</item>
-    <item>"Niezdecydowanie"</item>
-    <item>"Płacz"</item>
-    <item>"Milczę jak grób"</item>
-    <item>"Śmiech"</item>
-    <item>"Zakłopotanie"</item>
-  </string-array>
-</resources>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
deleted file mode 100644
index 366fbe0..0000000
--- a/res/values-pl/strings.xml
+++ /dev/null
@@ -1,243 +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="app_label">"Wiadomości"</string>
-    <string name="new_message">"Nowa wiadomość"</string>
-    <string name="create_new_message">"Utwórz nową wiadomość"</string>
-    <string name="menu_call_back">"Zadzwoń do: <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_send_email">"Wyślij wiadomość e-mail do: <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_compose_new">"Utwórz"</string>
-    <string name="menu_preferences">"Ustawienia"</string>
-    <string name="menu_add_address_to_contacts">"Dodaj <xliff:g id="NAME">%s</xliff:g> do Kontaktów"</string>
-    <string name="menu_call">"Zadzwoń"</string>
-    <string name="menu_delete_all">"Usuń wątki"</string>
-    <string name="menu_delete">"Usuń"</string>
-    <string name="menu_undelivered_messages">"Niedostarczone wiadomości"</string>
-    <string name="menu_view">"Wyświetl"</string>
-    <string name="refreshing">"Odświeżanie..."</string>
-    <string name="has_draft">"Wersja robocza"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"Anonim"</string>
-    <string name="no_subject_view">"(Brak tematu)"</string>
-    <string name="messagelist_sender_self">"Ja"</string>
-    <string name="view_picture">"Pokaż zdjęcie"</string>
-    <string name="view_slideshow">"Wyświetl pokaz slajdów"</string>
-    <string name="view_message_details">"Pokaż szczegóły wiadomości"</string>
-    <string name="view_delivery_report">"Pokaż raport"</string>
-    <string name="delete_message">"Usuń wiadomość"</string>
-    <string name="sent_on">"Wysłano: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"Traci ważność: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"KB"</string>
-    <string name="undelivered_msg_dialog_title">"Wiadomość niedostarczona"</string>
-    <string name="undelivered_msg_dialog_body">"Nie można wysłać wiadomości."\n"Ostatnia próba: <xliff:g id="MESSAGE">%s</xliff:g>."</string>
-    <string name="undelivered_sms_dialog_body">"Nie można wysłać tej wiadomości."</string>
-    <string name="delete_thread">"Usuń wątek"</string>
-    <string name="menu_forward">"Prześlij dalej"</string>
-    <string name="download">"Pobierz"</string>
-    <string name="downloading">"Pobieranie"</string>
-    <string name="inline_subject">"&lt;Temat: <xliff:g id="SUBJECT">%s</xliff:g>&gt;"</string>
-    <string name="drm_protected_text">"* tekst chroniony przez DRM *"</string>
-    <string name="insufficient_drm_rights">"Wykryto niewystarczające uprawnienia DRM."</string>
-    <string name="copy_message_text">"Kopiuj tekst wiadomości"</string>
-    <string name="message_options">"Opcje wiadomości"</string>
-    <string name="done">"Gotowe"</string>
-    <string name="move_up">"Przesuń w górę"</string>
-    <string name="move_down">"Przesuń w dół"</string>
-    <string name="remove_slide">"Usuń slajd"</string>
-    <string name="add_slide">"Dodaj slajd"</string>
-    <string name="add_slide_hint">"Wybierz, aby utworzyć nowy slajd."</string>
-    <string name="discard_slideshow">"Odrzuć pokaz slajdów"</string>
-    <string name="remove_text">"Usuń tekst"</string>
-    <string name="add_picture">"Dodaj zdjęcie"</string>
-    <string name="remove_picture">"Usuń zdjęcie"</string>
-    <string name="add_music">"Dodaj muzykę"</string>
-    <string name="remove_music">"Usuń muzykę"</string>
-    <string name="add_video">"Dodaj film wideo"</string>
-    <string name="remove_video">"Usuń film wideo"</string>
-    <string name="compose_title">"Utwórz"</string>
-    <string name="to_hint">"Do"</string>
-    <string name="subject_hint">"Temat"</string>
-    <string name="add_attachment">"Załącz"</string>
-    <string name="add_subject">"Dodaj temat"</string>
-    <string name="discard">"Odrzuć"</string>
-    <string name="view">"Wyświetl"</string>
-    <string name="replace">"Zastąp"</string>
-    <string name="remove">"Usuń"</string>
-    <string name="send">"Wyślij"</string>
-    <string name="all_threads">"Wszystkie wątki"</string>
-    <string name="type_to_compose_text_enter_to_send">"Wpisz, aby utworzyć i naciśnij klawisz ENTER, aby wysłać."</string>
-    <string name="open_keyboard_to_compose_message">"Otwórz klawiaturę, aby utworzyć wiadomość"</string>
-    <string name="image_too_large">"Zdjęcie jest za duże"</string>
-    <string name="ask_for_automatically_resize">"Zmienić automatycznie rozmiar zdjęcia przed wysłaniem?"</string>
-    <string name="compressing">"Kompresowanie..."</string>
-    <string name="unsupported_media_format">"Nieobsługiwany format elementu <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <string name="select_different_media">"Wybierz inny element <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <string name="exceed_message_size_limitation">"Osiągnięto maksymalny rozmiar wiadomości."</string>
-    <string name="failed_to_add_media">"Niestety, nie można dodać: <xliff:g id="NAME">%1$s</xliff:g> do wiadomości."</string>
-    <string name="failed_to_resize_image">"Nie zmieniono rozmiaru zdjęcia."</string>
-    <string name="resize_image_error_information">"Niestety, nawet po zmianie rozmiaru zdjęcie jest zbyt duże, aby je wysłać."</string>
-    <string name="forward_prefix">"Prześlij dalej:"</string>
-    <string name="discard_message">"Odrzuć"</string>
-    <string name="discard_message_reason">"Wiadomość zostanie odrzucona, ponieważ nie zawiera poprawnych odbiorców."</string>
-    <string name="has_invalid_recipient">"Błędni odbiorcy: &lt;<xliff:g id="NAME">%1$s</xliff:g>&gt;"</string>
-    <string name="invalid_recipient_message">"Należy poprawić dane odbiorców, gdyż mogą oni nie otrzymać wiadomości."</string>
-    <string name="cannot_send_message">"Nie można wysłać wiadomości"</string>
-    <string name="cannot_send_message_reason">"Wiadomość nie zawiera poprawnych odbiorców."</string>
-    <string name="cannot_forward_drm_obj">"Zawarty w wiadomości obiekt DRM nie może być przekazany."</string>
-    <string name="converting_to_picture_message">"Konwertowanie do wiadomości MMS..."</string>
-    <string name="converting_to_text_message">"Konwertowanie do wiadomości SMS..."</string>
-    <string name="cannot_add_slide_anymore">"Nie można dodać więcej slajdów."</string>
-    <string name="cannot_save_message">"Nie można zapisać wiadomości."</string>
-    <string name="cannot_load_message">"Nie można załadować wiadomości."</string>
-    <string name="message_saved_as_draft">"Wiadomość została zapisana jako wersja robocza."</string>
-    <string name="cannot_play_audio">"Nie można odtworzyć nagrania audio."</string>
-    <string name="preview">"Podgląd"</string>
-    <string name="preview_slideshow">"Podgląd"</string>
-    <string name="replace_image">"Zastąp zdjęcie"</string>
-    <string name="duration_sec">"Czas trwania (<xliff:g id="DURATION">%s</xliff:g> s)"</string>
-    <string name="duration_selector_title">"Czas trwania slajdu"</string>
-    <string name="layout_selector_title">"Układ pokazu slajdów"</string>
-    <string name="layout_top">"Układ (u góry)"</string>
-    <string name="layout_bottom">"Układ (u dołu)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"Rozpocznij wpisywanie tekstu lub pozostaw to pole puste"</string>
-    <string name="secs">"s"</string>
-  <string-array name="select_dialog_items">
-    <item>"1 sekunda"</item>
-    <item>"2 sekundy"</item>
-    <item>"3 sekundy"</item>
-    <item>"4 sekundy"</item>
-    <item>"5 sekund"</item>
-    <item>"6 sekund"</item>
-    <item>"7 sekund"</item>
-    <item>"8 sekund"</item>
-    <item>"9 sekund"</item>
-    <item>"10 sekund"</item>
-    <item>"Inny..."</item>
-  </string-array>
-    <string name="menu_view_contact">"Pokaż kontakt"</string>
-    <string name="menu_add_to_contacts">"Dodaj do kontaktów"</string>
-    <string name="hidden_sender_address">"Ukryty adres nadawcy"</string>
-    <string name="yes">"OK"</string>
-    <string name="no">"Anuluj"</string>
-    <string name="play">"Odtwórz"</string>
-    <string name="edit">"Edytuj"</string>
-    <string name="resize">"Zmień rozmiar"</string>
-    <string name="try_to_send">"Spróbuj wysłać"</string>
-    <string name="preferences_title">"Ustawienia"</string>
-    <string name="restore_default">"Przywróć ustawienia domyślne"</string>
-    <string name="pref_notification_settings_title">"Ustawienia powiadomień"</string>
-    <string name="pref_mms_settings_title">"Ustawienia wiadomości MMS"</string>
-    <string name="pref_sms_settings_title">"Ustawienia wiadomości SMS"</string>
-    <string name="pref_summary_manage_sim_messages">"Zarządzanie wiadomościami zapisanymi na karcie SIM"</string>
-    <string name="pref_summary_mms_delivery_reports">"Żądaj potwierdzenia dostarczenia każdej wysłanej wiadomości"</string>
-    <string name="pref_summary_mms_read_reports">"Żądanie raportu przeczytania każdej wysłanej wiadomości."</string>
-    <string name="pref_summary_sms_delivery_reports">"Żądaj potwierdzenia dostarczenia każdej wysłanej wiadomości"</string>
-    <string name="pref_title_manage_sim_messages">"Zarządzanie wiadomościami na karcie SIM"</string>
-    <string name="pref_title_mms_delivery_reports">"Raporty dostarczenia"</string>
-    <string name="pref_title_mms_read_reports">"Raporty odczytu"</string>
-    <string name="pref_title_sms_delivery_reports">"Raporty dostarczenia"</string>
-    <string name="pref_title_notification_enabled">"Powiadomienia"</string>
-    <string name="pref_summary_notification_enabled">"Wyświetlaj powiadomienie o wiadomości na pasku stanu"</string>
-    <string name="pref_title_notification_vibrate">"Wibracje"</string>
-    <string name="pref_summary_notification_vibrate">"Wibracje również przy powiadomieniu"</string>
-    <string name="pref_title_notification_ringtone">"Wybierz dzwonek"</string>
-    <string name="pref_title_mms_auto_retrieval">"Automatyczne pobieranie"</string>
-    <string name="pref_summary_mms_auto_retrieval">"Pobierz wiadomości automatycznie"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"Automatyczne odbieranie wiadomości podczas roamingu"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"Automatyczne odbieranie wiadomości podczas roamingu"</string>
-    <string name="to_label">"Do"</string>
-    <string name="confirm_dialog_title">"Usuń"</string>
-    <string name="confirm_delete_conversation">"Cały wątek zostanie usunięty."</string>
-    <string name="confirm_delete_all_conversations">"Wszystkie wątki zostaną usunięte."</string>
-    <string name="confirm_delete_message">"Wiadomość zostanie usunięta."</string>
-    <string name="confirm_delete_all_messages">"Cały wątek zostanie usunięty."</string>
-    <string name="confirm_delete_all_SIM_messages">"Wszystkie wiadomości na karcie SIM zostaną usunięte."</string>
-    <string name="cannot_get_details">"Nie można uzyskać szczegółów"</string>
-    <string name="message_details_title">"Szczegóły wiadomości"</string>
-    <string name="message_type_label">"Typ:"</string>
-    <string name="text_message">"Wiadomość SMS"</string>
-    <string name="multimedia_message">"Wiadomość MMS"</string>
-    <string name="multimedia_notification">"Powiadomienie MMS"</string>
-    <string name="from_label">"Od:"</string>
-    <string name="to_address_label">"Do:"</string>
-    <string name="bcc_label">"Udw:"</string>
-    <string name="sent_label">"Wysłane:"</string>
-    <string name="received_label">"Odebrano:"</string>
-    <string name="saved_label">"Zapisano:"</string>
-    <string name="subject_label">"Temat:"</string>
-    <string name="message_size_label">"Rozmiar wiadomości:"</string>
-    <string name="priority_label">"Priorytet:"</string>
-    <string name="priority_high">"Wysoki"</string>
-    <string name="priority_normal">"Normalny"</string>
-    <string name="priority_low">"Niski"</string>
-    <string name="message_class_label">"Klasa wiadomości:"</string>
-    <string name="menu_edit">"Edytuj"</string>
-    <string name="menu_retry_sending">"Spróbuj wysłać ponownie"</string>
-    <string name="menu_retry_sending_all">"Spróbuj wysłać wszystkie ponownie"</string>
-    <string name="menu_delete_messages">"Usuń wiadomości"</string>
-    <string name="retrying_dialog_body">"Wiadomość <xliff:g id="MESSAGE">%s</xliff:g> nie została wysłana z powodu problemu z połączeniem."\n"Próba wysłania ponownie..."</string>
-    <string name="sim_copy_to_phone_memory">"Kopiuj do pamięci telefonu"</string>
-    <string name="sim_delete">"Usuń"</string>
-    <string name="sim_manage_messages_title">"Wiadomości SMS na karcie SIM"</string>
-    <string name="sim_view">"Wyświetl"</string>
-    <string name="sim_empty">"Brak wiadomości na karcie SIM"</string>
-    <string name="delivery_header_title">"Raport"</string>
-    <string name="status_none">"(Brak)"</string>
-    <string name="status_pending">"Oczekujący"</string>
-    <string name="status_read">"Przeczytany"</string>
-    <string name="status_received">"Odebrane"</string>
-    <string name="status_failed">"Nieudany"</string>
-    <string name="status_unread">"Nieprzeczytany"</string>
-    <string name="status_rejected">"Odrzucony"</string>
-    <string name="recipient_label">"Adresat"</string>
-    <string name="status_label">"Stan:"</string>
-    <string name="attach_image">"Zdjęcia"</string>
-    <string name="attach_take_photo">"Zrób zdjęcie"</string>
-    <string name="attach_video">"Filmy wideo"</string>
-    <string name="attach_record_video">"Nagraj film wideo"</string>
-    <string name="attach_sound">"Audio"</string>
-    <string name="attach_record_sound">"Nagraj audio"</string>
-    <string name="attach_slideshow">"Pokaz slajdów"</string>
-    <string name="select_bottom_text">"Tekst na dole"</string>
-    <string name="select_top_text">"Tekst na górze"</string>
-    <string name="notification_multiple">"Liczba nieprzeczytanych wiadomości: <xliff:g id="COUNT">%s</xliff:g>."</string>
-    <string name="notification_multiple_title">"Nowe wiadomości"</string>
-    <string name="sim_full_title">"Karta SIM jest pełna"</string>
-    <string name="sim_full_body">"Usuń część wiadomości, aby zwolnić miejsce dla nowych."</string>
-    <string name="type_audio">"audio"</string>
-    <string name="type_picture">"zdjęcie"</string>
-    <string name="type_video">"film wideo"</string>
-    <string name="confirm">"Potwierdź"</string>
-    <string name="message_send_read_report">"Wysłany zostanie raport o odczytaniu wiadomości."</string>
-    <string name="message_queued">"Nie można w tej chwili wysłać wiadomości. Zostanie ona wysłana, gdy usługa będzie dostępna."</string>
-    <string name="no_subject">"(Brak tematu)"</string>
-    <string name="unknown_sender">"Nieznany nadawca"</string>
-    <string name="dl_failure_notification">"Pobieranie wiadomości <xliff:g id="SUBJECT">%s</xliff:g> od <xliff:g id="FROM">%s</xliff:g> zakończyło się niepowodzeniem."</string>
-    <string name="rate_limit_surpassed">"Potwierdź"</string>
-    <string name="confirm_rate_limit">"Wysyłanych jest wiele wiadomości multimedialnych. Czy to jest OK?"</string>
-    <string name="message_download_failed_title">"Wiadomość nie została pobrana"</string>
-    <string name="message_send_failed_title">"Wiadomość nie została wysłana"</string>
-    <string name="message_failed_body">"Ponownie wyświetl wiadomość i spróbuj jeszcze raz."</string>
-    <string name="download_later">"Nie można pobrać w tej chwili. Spróbuj ponownie później."</string>
-    <string name="select_audio">"Wybierz plik audio"</string>
-    <string name="copy_to_sdcard">"Kopiuj załącznik na kartę SD"</string>
-    <string name="copy_to_sdcard_success">"Załącznik został skopiowany na kartę SD"</string>
-    <string name="copy_to_sdcard_fail">"Kopiowanie załącznika na kartę SD nie powiodło się"</string>
-    <string name="menu_insert_smiley">"Wstaw emotikon"</string>
-    <string name="select_link_title">"Wybierz akcję"</string>
-</resources>
diff --git a/res/values-ru/arrays.xml b/res/values-ru/arrays.xml
deleted file mode 100644
index eaba9b5..0000000
--- a/res/values-ru/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"Счастье"</item>
-    <item>"Грустно"</item>
-    <item>"Подмигиваю"</item>
-    <item>"Высунутый язык"</item>
-    <item>"Удивление"</item>
-    <item>"Целую"</item>
-    <item>"Кричу"</item>
-    <item>"Круто"</item>
-    <item>"Знаю, что говорю"</item>
-    <item>"Молчок"</item>
-    <item>"В смущении"</item>
-    <item>"Ангел"</item>
-    <item>"В нерешительности"</item>
-    <item>"Плачу"</item>
-    <item>"Никому не скажу"</item>
-    <item>"Смешно"</item>
-    <item>"В замешательстве"</item>
-  </string-array>
-</resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
deleted file mode 100644
index 322cf04..0000000
--- a/res/values-ru/strings.xml
+++ /dev/null
@@ -1,243 +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="app_label">"Сообщения"</string>
-    <string name="new_message">"Создать сообщение"</string>
-    <string name="create_new_message">"Создать сообщение"</string>
-    <string name="menu_call_back">"Позвонить: <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_send_email">"Отправить письмо, адресат: <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_compose_new">"Написать"</string>
-    <string name="menu_preferences">"Настройки"</string>
-    <string name="menu_add_address_to_contacts">"Добавить <xliff:g id="NAME">%s</xliff:g>в контакты"</string>
-    <string name="menu_call">"Позвонить"</string>
-    <string name="menu_delete_all">"Удалить ветки"</string>
-    <string name="menu_delete">"Удалить"</string>
-    <string name="menu_undelivered_messages">"Недоставленные сообщения"</string>
-    <string name="menu_view">"Просмотреть"</string>
-    <string name="refreshing">"Идет обновление…"</string>
-    <string name="has_draft">"Черновик"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"Аноним"</string>
-    <string name="no_subject_view">"(Без темы)"</string>
-    <string name="messagelist_sender_self">"Я"</string>
-    <string name="view_picture">"Просмотреть изображение"</string>
-    <string name="view_slideshow">"Просмотреть слайд-шоу"</string>
-    <string name="view_message_details">"Просмотреть сведения о сообщении"</string>
-    <string name="view_delivery_report">"Просмотреть отчет"</string>
-    <string name="delete_message">"Удалить сообщение"</string>
-    <string name="sent_on">"Отправлено: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"Срок действия: <xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"Кб"</string>
-    <string name="undelivered_msg_dialog_title">"Недоставленное сообщение"</string>
-    <string name="undelivered_msg_dialog_body">"Не удается отправить сообщение."\n"Последняя попытка: <xliff:g id="MESSAGE">%s</xliff:g>."</string>
-    <string name="undelivered_sms_dialog_body">"Отправить это сообщение не удается."</string>
-    <string name="delete_thread">"Удалить ветку"</string>
-    <string name="menu_forward">"Переслать"</string>
-    <string name="download">"Загрузить"</string>
-    <string name="downloading">"Идет загрузка"</string>
-    <string name="inline_subject">"&lt;Тема: <xliff:g id="SUBJECT">%s</xliff:g>&gt;"</string>
-    <string name="drm_protected_text">"* текст защищен DRM *"</string>
-    <string name="insufficient_drm_rights">"Недостаточно прав DRM."</string>
-    <string name="copy_message_text">"Скопировать текст сообщения"</string>
-    <string name="message_options">"Параметры сообщения"</string>
-    <string name="done">"Готово"</string>
-    <string name="move_up">"Переместить вверх"</string>
-    <string name="move_down">"Переместить вниз"</string>
-    <string name="remove_slide">"Удалить слайд"</string>
-    <string name="add_slide">"Добавить слайд"</string>
-    <string name="add_slide_hint">"Выберите для создания слайда."</string>
-    <string name="discard_slideshow">"Отменить слайд-шоу"</string>
-    <string name="remove_text">"Удалить текст"</string>
-    <string name="add_picture">"Добавить изображение"</string>
-    <string name="remove_picture">"Убрать изображение"</string>
-    <string name="add_music">"Добавить музыку"</string>
-    <string name="remove_music">"Убрать музыку"</string>
-    <string name="add_video">"Добавить видео"</string>
-    <string name="remove_video">"Убрать видео"</string>
-    <string name="compose_title">"Написать"</string>
-    <string name="to_hint">"Кому"</string>
-    <string name="subject_hint">"Тема"</string>
-    <string name="add_attachment">"Вложить"</string>
-    <string name="add_subject">"Добавить тему"</string>
-    <string name="discard">"Закрыть"</string>
-    <string name="view">"Просмотреть"</string>
-    <string name="replace">"Заменить"</string>
-    <string name="remove">"Удалить"</string>
-    <string name="send">"Отправить"</string>
-    <string name="all_threads">"Все ветки"</string>
-    <string name="type_to_compose_text_enter_to_send">"Введите текст, нажмите Enter для отправки"</string>
-    <string name="open_keyboard_to_compose_message">"Откройте клавиатуру для ввода сообщения"</string>
-    <string name="image_too_large">"Изображение слишком велико"</string>
-    <string name="ask_for_automatically_resize">"Изменить размер изображения автоматически перед отправкой?"</string>
-    <string name="compressing">"Идет сжатие…"</string>
-    <string name="unsupported_media_format">"Формат не поддерживается: <xliff:g id="NAME">%1$s</xliff:g>"</string>
-    <string name="select_different_media">"Выберите другое <xliff:g id="NAME">%1$s</xliff:g>."</string>
-    <string name="exceed_message_size_limitation">"Максимальный размер сообщения."</string>
-    <string name="failed_to_add_media">"К сожалению, добавить <xliff:g id="NAME">%1$s</xliff:g> к сообщению невозможно."</string>
-    <string name="failed_to_resize_image">"Размер изображения не изменен."</string>
-    <string name="resize_image_error_information">"К сожалению, даже после изменения размера это изображение слишком велико для отправки."</string>
-    <string name="forward_prefix">"Fwd:"</string>
-    <string name="discard_message">"Отмена"</string>
-    <string name="discard_message_reason">"Сообщение будет отменено, поскольку у него нет действительных получателей."</string>
-    <string name="has_invalid_recipient">"Недействительный получатель(и): &lt;<xliff:g id="NAME">%1$s</xliff:g>&gt;"</string>
-    <string name="invalid_recipient_message">"Исправьте получателей или они не получат сообщение."</string>
-    <string name="cannot_send_message">"Не удается отправить это сообщение"</string>
-    <string name="cannot_send_message_reason">"У сообщения нет действительных получателей."</string>
-    <string name="cannot_forward_drm_obj">"Переслать вложенный в сообщение объект DRM нельзя."</string>
-    <string name="converting_to_picture_message">"Преобразование в сообщение MMS..."</string>
-    <string name="converting_to_text_message">"Преобразование в сообщение SMS..."</string>
-    <string name="cannot_add_slide_anymore">"Больше слайдов добавить нельзя."</string>
-    <string name="cannot_save_message">"Не удается сохранить сообщение."</string>
-    <string name="cannot_load_message">"Не удалось загрузить сообщение."</string>
-    <string name="message_saved_as_draft">"Сообщение сохранено как черновик."</string>
-    <string name="cannot_play_audio">"Невозможно воспроизвести звук."</string>
-    <string name="preview">"Предварительный просмотр"</string>
-    <string name="preview_slideshow">"Предварительный просмотр"</string>
-    <string name="replace_image">"Заменить изображение"</string>
-    <string name="duration_sec">"Продолжительность (<xliff:g id="DURATION">%s</xliff:g> сек.)"</string>
-    <string name="duration_selector_title">"Продолжительность отображения слайда"</string>
-    <string name="layout_selector_title">"Макет слайд-шоу"</string>
-    <string name="layout_top">"Макет (вверху)"</string>
-    <string name="layout_bottom">"Макет (внизу)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"Введите текст или оставьте пустым"</string>
-    <string name="secs">"сек."</string>
-  <string-array name="select_dialog_items">
-    <item>"1 секунда"</item>
-    <item>"2 секунды"</item>
-    <item>"3 секунды"</item>
-    <item>"4 секунды"</item>
-    <item>"5 секунд"</item>
-    <item>"6 секунд"</item>
-    <item>"7 секунд"</item>
-    <item>"8 секунд"</item>
-    <item>"9 секунд"</item>
-    <item>"10 секунд"</item>
-    <item>"Другая..."</item>
-  </string-array>
-    <string name="menu_view_contact">"Просмотреть контакт"</string>
-    <string name="menu_add_to_contacts">"Добавить в контакты"</string>
-    <string name="hidden_sender_address">"Адрес отправителя скрыт"</string>
-    <string name="yes">"ОК"</string>
-    <string name="no">"Отмена"</string>
-    <string name="play">"Воспроизвести"</string>
-    <string name="edit">"Изменить"</string>
-    <string name="resize">"Изменить размер"</string>
-    <string name="try_to_send">"Попробовать отправить"</string>
-    <string name="preferences_title">"Настройки"</string>
-    <string name="restore_default">"Восстановить настройки по умолчанию"</string>
-    <string name="pref_notification_settings_title">"Настройки уведомлений"</string>
-    <string name="pref_mms_settings_title">"Настройки MMS"</string>
-    <string name="pref_sms_settings_title">"Настройки SMS"</string>
-    <string name="pref_summary_manage_sim_messages">"Управление сообщениями на SIM-карте"</string>
-    <string name="pref_summary_mms_delivery_reports">"Запрашивать отчет о доставке каждого отправляемого сообщения"</string>
-    <string name="pref_summary_mms_read_reports">"Запрашивать отчет о прочтении каждого отправляемого сообщения"</string>
-    <string name="pref_summary_sms_delivery_reports">"Запрашивать отчет о доставке каждого отправляемого сообщения"</string>
-    <string name="pref_title_manage_sim_messages">"Управление сообщениями на SIM-карте"</string>
-    <string name="pref_title_mms_delivery_reports">"Отчеты о доставке"</string>
-    <string name="pref_title_mms_read_reports">"Читать отчеты"</string>
-    <string name="pref_title_sms_delivery_reports">"Отчеты о доставке"</string>
-    <string name="pref_title_notification_enabled">"Уведомления"</string>
-    <string name="pref_summary_notification_enabled">"Показывать уведомления о сообщениях на панели состояния"</string>
-    <string name="pref_title_notification_vibrate">"Вибрация"</string>
-    <string name="pref_summary_notification_vibrate">"Вибрация при уведомлении"</string>
-    <string name="pref_title_notification_ringtone">"Выбрать мелодию звонка"</string>
-    <string name="pref_title_mms_auto_retrieval">"Получать автоматически"</string>
-    <string name="pref_summary_mms_auto_retrieval">"Получать сообщения автоматически"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"Получать в роуминге автоматически"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"Получать сообщения в роуминге автоматически"</string>
-    <string name="to_label">"Кому"</string>
-    <string name="confirm_dialog_title">"Удаление"</string>
-    <string name="confirm_delete_conversation">"Вся ветка будет удалена."</string>
-    <string name="confirm_delete_all_conversations">"Все ветки будут удалены."</string>
-    <string name="confirm_delete_message">"Это сообщение будет удалено."</string>
-    <string name="confirm_delete_all_messages">"Вся ветка будет удалена."</string>
-    <string name="confirm_delete_all_SIM_messages">"Все сообщения на SIM-карте будут удалены."</string>
-    <string name="cannot_get_details">"Не удается получить сведения"</string>
-    <string name="message_details_title">"Сведения о сообщении"</string>
-    <string name="message_type_label">"Тип:"</string>
-    <string name="text_message">"SMS-сообщение"</string>
-    <string name="multimedia_message">"Сообщение MMS"</string>
-    <string name="multimedia_notification">"Уведомление MMS"</string>
-    <string name="from_label">"От:"</string>
-    <string name="to_address_label">"Кому:"</string>
-    <string name="bcc_label">"СК:"</string>
-    <string name="sent_label">"Отправлено:"</string>
-    <string name="received_label">"Получено:"</string>
-    <string name="saved_label">"Сохранено:"</string>
-    <string name="subject_label">"Тема:"</string>
-    <string name="message_size_label">"Размер сообщения:"</string>
-    <string name="priority_label">"Важность:"</string>
-    <string name="priority_high">"Высокая"</string>
-    <string name="priority_normal">"Нормальная"</string>
-    <string name="priority_low">"Низкая"</string>
-    <string name="message_class_label">"Класс сообщения:"</string>
-    <string name="menu_edit">"Правка"</string>
-    <string name="menu_retry_sending">"Повторить отправку"</string>
-    <string name="menu_retry_sending_all">"Повторить отправку всех"</string>
-    <string name="menu_delete_messages">"Удалить сообщения"</string>
-    <string name="retrying_dialog_body">"Сообщение <xliff:g id="MESSAGE">%s</xliff:g> не было отправлено из-за проблем с подключением."\n"Попытка повторной отправки…"</string>
-    <string name="sim_copy_to_phone_memory">"Копировать в память телефона"</string>
-    <string name="sim_delete">"Удалить"</string>
-    <string name="sim_manage_messages_title">"SMS-сообщения на SIM-карте"</string>
-    <string name="sim_view">"Просмотреть"</string>
-    <string name="sim_empty">"Нет сообщений на SIM-карте."</string>
-    <string name="delivery_header_title">"Отчет"</string>
-    <string name="status_none">"(Нет)"</string>
-    <string name="status_pending">"Ожидает отправки"</string>
-    <string name="status_read">"Прочитано"</string>
-    <string name="status_received">"Получено"</string>
-    <string name="status_failed">"Ошибка"</string>
-    <string name="status_unread">"Не прочитано"</string>
-    <string name="status_rejected">"Отклонено"</string>
-    <string name="recipient_label">"Получатель:"</string>
-    <string name="status_label">"Состояние:"</string>
-    <string name="attach_image">"Изображения"</string>
-    <string name="attach_take_photo">"Сделать фотографию"</string>
-    <string name="attach_video">"Видео"</string>
-    <string name="attach_record_video">"Снять видео"</string>
-    <string name="attach_sound">"Звук"</string>
-    <string name="attach_record_sound">"Записать звук"</string>
-    <string name="attach_slideshow">"Слайд-шоу"</string>
-    <string name="select_bottom_text">"Текст снизу"</string>
-    <string name="select_top_text">"Текст сверху"</string>
-    <string name="notification_multiple">"Непрочитанных сообщений: <xliff:g id="COUNT">%s</xliff:g>."</string>
-    <string name="notification_multiple_title">"Новые сообщения"</string>
-    <string name="sim_full_title">"SIM-карта заполнена"</string>
-    <string name="sim_full_body">"Удалите какие-нибудь сообщения, чтобы освободить место для новых."</string>
-    <string name="type_audio">"звук"</string>
-    <string name="type_picture">"изображение"</string>
-    <string name="type_video">"видео"</string>
-    <string name="confirm">"Подтверждение"</string>
-    <string name="message_send_read_report">"Будет отправлен отчет о прочтении."</string>
-    <string name="message_queued">"Не удается отправить сообщение. Оно будет отправлено, когда станет доступна сеть."</string>
-    <string name="no_subject">"(Без темы)"</string>
-    <string name="unknown_sender">"Неизвестный отправитель"</string>
-    <string name="dl_failure_notification">"Не удалось загрузить сообщение <xliff:g id="SUBJECT">%s</xliff:g> от пользователя <xliff:g id="FROM">%s</xliff:g>."</string>
-    <string name="rate_limit_surpassed">"Подтверждение"</string>
-    <string name="confirm_rate_limit">"Отправляется много мультимедийных сообщений. Продолжить?"</string>
-    <string name="message_download_failed_title">"Сообщение не загружено"</string>
-    <string name="message_send_failed_title">"Сообщение не отправлено"</string>
-    <string name="message_failed_body">"Выберите, чтобы посмотреть сообщение и повторить отправку."</string>
-    <string name="download_later">"В настоящее время загрузка невозможна. Повторите попытку позже."</string>
-    <string name="select_audio">"Выбрать звук"</string>
-    <string name="copy_to_sdcard">"Скопировать вложение на карту SD"</string>
-    <string name="copy_to_sdcard_success">"Вложение скопировано на карту SD"</string>
-    <string name="copy_to_sdcard_fail">"Не удалось скопировать вложение на карту SD"</string>
-    <string name="menu_insert_smiley">"Вставить смайлик"</string>
-    <string name="select_link_title">"Выбор действия"</string>
-</resources>
diff --git a/res/values-zh-rCN/arrays.xml b/res/values-zh-rCN/arrays.xml
deleted file mode 100644
index ebc45ea..0000000
--- a/res/values-zh-rCN/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"开心"</item>
-    <item>"忧伤"</item>
-    <item>"眨眼"</item>
-    <item>"吐舌"</item>
-    <item>"吃惊"</item>
-    <item>"亲吻"</item>
-    <item>"叫喊"</item>
-    <item>"酷"</item>
-    <item>"财迷"</item>
-    <item>"不知所云"</item>
-    <item>"尴尬"</item>
-    <item>"天使"</item>
-    <item>"犹豫不定"</item>
-    <item>"哭泣"</item>
-    <item>"保守秘密"</item>
-    <item>"大笑"</item>
-    <item>"困惑"</item>
-  </string-array>
-</resources>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
deleted file mode 100644
index 5ce0551..0000000
--- a/res/values-zh-rCN/strings.xml
+++ /dev/null
@@ -1,243 +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="app_label">"发送信息"</string>
-    <string name="new_message">"新建信息"</string>
-    <string name="create_new_message">"撰写新信息"</string>
-    <string name="menu_call_back">"呼叫<xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_send_email">"向<xliff:g id="NAME">%s</xliff:g>发送电子邮件"</string>
-    <string name="menu_compose_new">"撰写"</string>
-    <string name="menu_preferences">"设置"</string>
-    <string name="menu_add_address_to_contacts">"将<xliff:g id="NAME">%s</xliff:g>添加到“联系人”"</string>
-    <string name="menu_call">"呼叫"</string>
-    <string name="menu_delete_all">"删除线程"</string>
-    <string name="menu_delete">"删除"</string>
-    <string name="menu_undelivered_messages">"未发送的信息"</string>
-    <string name="menu_view">"查看"</string>
-    <string name="refreshing">"正在刷新..."</string>
-    <string name="has_draft">"草稿"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"匿名"</string>
-    <string name="no_subject_view">"(无主题)"</string>
-    <string name="messagelist_sender_self">"我"</string>
-    <string name="view_picture">"查看图片"</string>
-    <string name="view_slideshow">"观看幻灯片演示"</string>
-    <string name="view_message_details">"查看信息详情"</string>
-    <string name="view_delivery_report">"查看报告"</string>
-    <string name="delete_message">"删除信息"</string>
-    <string name="sent_on">"发送时间:<xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"有效期:<xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"KB"</string>
-    <string name="undelivered_msg_dialog_title">"未发送的信息"</string>
-    <string name="undelivered_msg_dialog_body">"无法发送此信息。"\n"做过的尝试:<xliff:g id="MESSAGE">%s</xliff:g>。"</string>
-    <string name="undelivered_sms_dialog_body">"无法发送此信息。"</string>
-    <string name="delete_thread">"删除线程"</string>
-    <string name="menu_forward">"转发"</string>
-    <string name="download">"下载"</string>
-    <string name="downloading">"正在下载"</string>
-    <string name="inline_subject">"&lt;主题:<xliff:g id="SUBJECT">%s</xliff:g>&gt;"</string>
-    <string name="drm_protected_text">"* 受 DRM 保护的文本 *"</string>
-    <string name="insufficient_drm_rights">"检测到 DRM 权限不足。"</string>
-    <string name="copy_message_text">"复制信息文本"</string>
-    <string name="message_options">"信息选项"</string>
-    <string name="done">"完成"</string>
-    <string name="move_up">"上移"</string>
-    <string name="move_down">"下移"</string>
-    <string name="remove_slide">"删除幻灯片"</string>
-    <string name="add_slide">"添加幻灯片"</string>
-    <string name="add_slide_hint">"选择以创建新幻灯片。"</string>
-    <string name="discard_slideshow">"放弃幻灯片演示"</string>
-    <string name="remove_text">"删除文本"</string>
-    <string name="add_picture">"添加图片"</string>
-    <string name="remove_picture">"删除图片"</string>
-    <string name="add_music">"添加音乐"</string>
-    <string name="remove_music">"删除音乐"</string>
-    <string name="add_video">"添加视频"</string>
-    <string name="remove_video">"删除视频"</string>
-    <string name="compose_title">"撰写"</string>
-    <string name="to_hint">"收信人"</string>
-    <string name="subject_hint">"主题"</string>
-    <string name="add_attachment">"附加"</string>
-    <string name="add_subject">"添加主题"</string>
-    <string name="discard">"放弃"</string>
-    <string name="view">"查看"</string>
-    <string name="replace">"替换"</string>
-    <string name="remove">"删除"</string>
-    <string name="send">"发送"</string>
-    <string name="all_threads">"所有线程"</string>
-    <string name="type_to_compose_text_enter_to_send">"键入内容以撰写信息,按 Enter 键发送"</string>
-    <string name="open_keyboard_to_compose_message">"打开键盘以撰写信息"</string>
-    <string name="image_too_large">"图片太大"</string>
-    <string name="ask_for_automatically_resize">"发送前自动调整图片大小?"</string>
-    <string name="compressing">"正在压缩..."</string>
-    <string name="unsupported_media_format">"不支持的<xliff:g id="NAME">%1$s</xliff:g>格式"</string>
-    <string name="select_different_media">"请选择其他<xliff:g id="NAME">%1$s</xliff:g>。"</string>
-    <string name="exceed_message_size_limitation">"信息大小已达到限制。"</string>
-    <string name="failed_to_add_media">"很抱歉,您不能将此<xliff:g id="NAME">%1$s</xliff:g>添加到您的信息中。"</string>
-    <string name="failed_to_resize_image">"未调整图片大小。"</string>
-    <string name="resize_image_error_information">"很抱歉,此图片调整大小后仍太大,无法发送。"</string>
-    <string name="forward_prefix">"Fwd:"</string>
-    <string name="discard_message">"放弃"</string>
-    <string name="discard_message_reason">"您的信息会被丢弃,因为没有有效的收信人。"</string>
-    <string name="has_invalid_recipient">"无效的收信人:&lt;<xliff:g id="NAME">%1$s</xliff:g>&gt;"</string>
-    <string name="invalid_recipient_message">"请更正收信人,否则他们将会收不到信息。"</string>
-    <string name="cannot_send_message">"无法发送此信息"</string>
-    <string name="cannot_send_message_reason">"您的信息没有有效的收信人。"</string>
-    <string name="cannot_forward_drm_obj">"无法转发信息中包含的 DRM 对象。"</string>
-    <string name="converting_to_picture_message">"正在转换为彩信..."</string>
-    <string name="converting_to_text_message">"正在转换为短信..."</string>
-    <string name="cannot_add_slide_anymore">"无法再添加幻灯片。"</string>
-    <string name="cannot_save_message">"无法保存信息。"</string>
-    <string name="cannot_load_message">"无法载入信息。"</string>
-    <string name="message_saved_as_draft">"保存为草稿的信息。"</string>
-    <string name="cannot_play_audio">"无法播放音频。"</string>
-    <string name="preview">"预览"</string>
-    <string name="preview_slideshow">"预览"</string>
-    <string name="replace_image">"替换图片"</string>
-    <string name="duration_sec">"持续时间(<xliff:g id="DURATION">%s</xliff:g> 秒)"</string>
-    <string name="duration_selector_title">"幻灯片的长度"</string>
-    <string name="layout_selector_title">"幻灯片演示布局"</string>
-    <string name="layout_top">"布局(顶部)"</string>
-    <string name="layout_bottom">"布局(底部)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"键入文本内容,或保留空白"</string>
-    <string name="secs">"秒"</string>
-  <string-array name="select_dialog_items">
-    <item>"1 秒"</item>
-    <item>"2 秒"</item>
-    <item>"3 秒"</item>
-    <item>"4 秒"</item>
-    <item>"5 秒"</item>
-    <item>"6 秒"</item>
-    <item>"7 秒"</item>
-    <item>"8 秒"</item>
-    <item>"9 秒"</item>
-    <item>"10 秒"</item>
-    <item>"其他..."</item>
-  </string-array>
-    <string name="menu_view_contact">"查看联系信息"</string>
-    <string name="menu_add_to_contacts">"添加到“联系人”"</string>
-    <string name="hidden_sender_address">"隐藏的发信人地址"</string>
-    <string name="yes">"确定"</string>
-    <string name="no">"取消"</string>
-    <string name="play">"播放"</string>
-    <string name="edit">"编辑"</string>
-    <string name="resize">"调整大小"</string>
-    <string name="try_to_send">"尝试发送"</string>
-    <string name="preferences_title">"设置"</string>
-    <string name="restore_default">"恢复默认设置"</string>
-    <string name="pref_notification_settings_title">"通知设置"</string>
-    <string name="pref_mms_settings_title">"彩信设置"</string>
-    <string name="pref_sms_settings_title">"短信设置"</string>
-    <string name="pref_summary_manage_sim_messages">"管理 SIM 卡中存储的信息"</string>
-    <string name="pref_summary_mms_delivery_reports">"为您发送的每条信息请求一个发送报告"</string>
-    <string name="pref_summary_mms_read_reports">"发送的每条信息都要求返回已读报告"</string>
-    <string name="pref_summary_sms_delivery_reports">"为您发送的每条信息请求一个发送报告"</string>
-    <string name="pref_title_manage_sim_messages">"管理 SIM 卡信息"</string>
-    <string name="pref_title_mms_delivery_reports">"发送报告"</string>
-    <string name="pref_title_mms_read_reports">"已读报告"</string>
-    <string name="pref_title_sms_delivery_reports">"发送报告"</string>
-    <string name="pref_title_notification_enabled">"通知"</string>
-    <string name="pref_summary_notification_enabled">"在状态栏中显示信息通知"</string>
-    <string name="pref_title_notification_vibrate">"振动"</string>
-    <string name="pref_summary_notification_vibrate">"收到通知时也振动"</string>
-    <string name="pref_title_notification_ringtone">"选择铃声"</string>
-    <string name="pref_title_mms_auto_retrieval">"自动检索"</string>
-    <string name="pref_summary_mms_auto_retrieval">"自动检索信息"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"漫游时自动检索"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"漫游时自动检索信息"</string>
-    <string name="to_label">"收信人"</string>
-    <string name="confirm_dialog_title">"删除"</string>
-    <string name="confirm_delete_conversation">"会删除整个线程。"</string>
-    <string name="confirm_delete_all_conversations">"会删除所有线程。"</string>
-    <string name="confirm_delete_message">"会删除此信息。"</string>
-    <string name="confirm_delete_all_messages">"会删除整个线程。"</string>
-    <string name="confirm_delete_all_SIM_messages">"SIM 卡上的所有信息都会删除。"</string>
-    <string name="cannot_get_details">"无法获取详情"</string>
-    <string name="message_details_title">"信息详情"</string>
-    <string name="message_type_label">"类型:"</string>
-    <string name="text_message">"短信"</string>
-    <string name="multimedia_message">"彩信"</string>
-    <string name="multimedia_notification">"彩信通知"</string>
-    <string name="from_label">"发信人:"</string>
-    <string name="to_address_label">"收信人:"</string>
-    <string name="bcc_label">"密送:"</string>
-    <string name="sent_label">"已发送:"</string>
-    <string name="received_label">"已收到:"</string>
-    <string name="saved_label">"已保存:"</string>
-    <string name="subject_label">"主题:"</string>
-    <string name="message_size_label">"信息大小:"</string>
-    <string name="priority_label">"优先权:"</string>
-    <string name="priority_high">"高"</string>
-    <string name="priority_normal">"正常"</string>
-    <string name="priority_low">"低"</string>
-    <string name="message_class_label">"信息等级:"</string>
-    <string name="menu_edit">"编辑"</string>
-    <string name="menu_retry_sending">"重试发送"</string>
-    <string name="menu_retry_sending_all">"重试发送全部"</string>
-    <string name="menu_delete_messages">"删除信息"</string>
-    <string name="retrying_dialog_body">"此信息<xliff:g id="MESSAGE">%s</xliff:g>因连接问题而未被发送。"\n"正在尝试重新发送..."</string>
-    <string name="sim_copy_to_phone_memory">"复制到手机内存"</string>
-    <string name="sim_delete">"删除"</string>
-    <string name="sim_manage_messages_title">"SIM 卡上的短信"</string>
-    <string name="sim_view">"查看"</string>
-    <string name="sim_empty">"SIM 卡中没有信息。"</string>
-    <string name="delivery_header_title">"报告"</string>
-    <string name="status_none">"(无)"</string>
-    <string name="status_pending">"未决"</string>
-    <string name="status_read">"已读"</string>
-    <string name="status_received">"已收到"</string>
-    <string name="status_failed">"失败"</string>
-    <string name="status_unread">"未读"</string>
-    <string name="status_rejected">"拒绝"</string>
-    <string name="recipient_label">"收信人:"</string>
-    <string name="status_label">"状态:"</string>
-    <string name="attach_image">"图片"</string>
-    <string name="attach_take_photo">"拍摄照片"</string>
-    <string name="attach_video">"视频"</string>
-    <string name="attach_record_video">"拍摄视频"</string>
-    <string name="attach_sound">"音频"</string>
-    <string name="attach_record_sound">"录音"</string>
-    <string name="attach_slideshow">"幻灯片演示"</string>
-    <string name="select_bottom_text">"底部文本"</string>
-    <string name="select_top_text">"顶部文本"</string>
-    <string name="notification_multiple">"<xliff:g id="COUNT">%s</xliff:g> 条未读信息。"</string>
-    <string name="notification_multiple_title">"新信息"</string>
-    <string name="sim_full_title">"SIM 卡已满"</string>
-    <string name="sim_full_body">"删除某些信息以腾出空间存储更多内容。"</string>
-    <string name="type_audio">"音频"</string>
-    <string name="type_picture">"图片"</string>
-    <string name="type_video">"视频"</string>
-    <string name="confirm">"确认"</string>
-    <string name="message_send_read_report">"会发送已读报告。"</string>
-    <string name="message_queued">"当前无法发送您的信息。该信息会在服务可用后发送。"</string>
-    <string name="no_subject">"(无主题)"</string>
-    <string name="unknown_sender">"未知发信人"</string>
-    <string name="dl_failure_notification">"从 <xliff:g id="FROM">%s</xliff:g> 下载信息<xliff:g id="SUBJECT">%s</xliff:g>失败。"</string>
-    <string name="rate_limit_surpassed">"确认"</string>
-    <string name="confirm_rate_limit">"正在发送多条彩信。目前的速度如何?"</string>
-    <string name="message_download_failed_title">"未下载信息"</string>
-    <string name="message_send_failed_title">"信息未发送"</string>
-    <string name="message_failed_body">"选择以检查信息并重试。"</string>
-    <string name="download_later">"当前无法下载。请稍后重试。"</string>
-    <string name="select_audio">"选择音频"</string>
-    <string name="copy_to_sdcard">"将附件复制到 SD 卡"</string>
-    <string name="copy_to_sdcard_success">"附件已复制到 SD 卡"</string>
-    <string name="copy_to_sdcard_fail">"无法将附件复制到 SD 卡"</string>
-    <string name="menu_insert_smiley">"插入表情符号"</string>
-    <string name="select_link_title">"选择操作"</string>
-</resources>
diff --git a/res/values-zh-rTW/arrays.xml b/res/values-zh-rTW/arrays.xml
deleted file mode 100644
index 5094546..0000000
--- a/res/values-zh-rTW/arrays.xml
+++ /dev/null
@@ -1,56 +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-array name="default_smiley_texts">
-    <item>":-)"</item>
-    <item>":-("</item>
-    <item>";-)"</item>
-    <item>":-P"</item>
-    <item>"=-O"</item>
-    <item>":-*"</item>
-    <item>":O"</item>
-    <item>"B-)"</item>
-    <item>":-$"</item>
-    <item>":-!"</item>
-    <item>":-["</item>
-    <item>"O:-)"</item>
-    <item>":-\\"</item>
-    <item>":\'("</item>
-    <item>":-X"</item>
-    <item>":-D"</item>
-    <item>"o_O"</item>
-  </string-array>
-  <string-array name="default_smiley_names">
-    <item>"開心"</item>
-    <item>"傷心"</item>
-    <item>"眨眼"</item>
-    <item>"吐舌頭"</item>
-    <item>"驚訝"</item>
-    <item>"紅唇"</item>
-    <item>"大喊"</item>
-    <item>"酷"</item>
-    <item>"滿嘴錢"</item>
-    <item>"說錯話"</item>
-    <item>"害羞"</item>
-    <item>"天使"</item>
-    <item>"還沒決定"</item>
-    <item>"嚎啕大哭"</item>
-    <item>"不要告訴別人"</item>
-    <item>"開懷大笑"</item>
-    <item>"疑惑"</item>
-  </string-array>
-</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
deleted file mode 100644
index eccd6db..0000000
--- a/res/values-zh-rTW/strings.xml
+++ /dev/null
@@ -1,243 +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="app_label">"簡訊"</string>
-    <string name="new_message">"新增簡訊"</string>
-    <string name="create_new_message">"撰寫新簡訊"</string>
-    <string name="menu_call_back">"撥打電話給 <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_send_email">"傳送電子郵件給 <xliff:g id="NAME">%s</xliff:g>"</string>
-    <string name="menu_compose_new">"撰寫"</string>
-    <string name="menu_preferences">"設定"</string>
-    <string name="menu_add_address_to_contacts">"新增 <xliff:g id="NAME">%s</xliff:g> 至 [通訊錄]"</string>
-    <string name="menu_call">"撥打"</string>
-    <string name="menu_delete_all">"刪除會話群組"</string>
-    <string name="menu_delete">"刪除"</string>
-    <string name="menu_undelivered_messages">"無法傳送的簡訊"</string>
-    <string name="menu_view">"檢視"</string>
-    <string name="refreshing">"重新整理中..."</string>
-    <string name="has_draft">"草稿"</string>
-    <!-- no translation found for broadcast_from_to (1804605929273213017) -->
-    <skip />
-    <string name="anonymous_recipient">"匿名"</string>
-    <string name="no_subject_view">"(沒有主旨)"</string>
-    <string name="messagelist_sender_self">"我"</string>
-    <string name="view_picture">"檢視圖片"</string>
-    <string name="view_slideshow">"檢視投影片"</string>
-    <string name="view_message_details">"檢視簡訊細節"</string>
-    <string name="view_delivery_report">"檢視報告"</string>
-    <string name="delete_message">"刪除簡訊"</string>
-    <string name="sent_on">"傳送時間:<xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="expire_on">"期限終止:<xliff:g id="DATE">%s</xliff:g>"</string>
-    <string name="kilobyte">"KB"</string>
-    <string name="undelivered_msg_dialog_title">"無法傳送的簡訊"</string>
-    <string name="undelivered_msg_dialog_body">"無法傳送此簡訊。"\n"試圖傳送:<xliff:g id="MESSAGE">%s</xliff:g>。"</string>
-    <string name="undelivered_sms_dialog_body">"簡訊無法傳送。"</string>
-    <string name="delete_thread">"刪除會話群組"</string>
-    <string name="menu_forward">"轉寄"</string>
-    <string name="download">"下載"</string>
-    <string name="downloading">"下載中"</string>
-    <string name="inline_subject">"(主旨:<xliff:g id="SUBJECT">%s</xliff:g>)"</string>
-    <string name="drm_protected_text">"* 受 DRM 保護的文字 *"</string>
-    <string name="insufficient_drm_rights">"DRM 授權權限不足。"</string>
-    <string name="copy_message_text">"複製簡訊文字"</string>
-    <string name="message_options">"簡訊選項"</string>
-    <string name="done">"完成"</string>
-    <string name="move_up">"往上移動"</string>
-    <string name="move_down">"往下移動"</string>
-    <string name="remove_slide">"移除投影片"</string>
-    <string name="add_slide">"新增投影片"</string>
-    <string name="add_slide_hint">"新增投影片"</string>
-    <string name="discard_slideshow">"放棄投影片"</string>
-    <string name="remove_text">"移除文字"</string>
-    <string name="add_picture">"新增圖片"</string>
-    <string name="remove_picture">"移除圖片"</string>
-    <string name="add_music">"新增音樂"</string>
-    <string name="remove_music">"移除音樂"</string>
-    <string name="add_video">"新增影片"</string>
-    <string name="remove_video">"移除影片"</string>
-    <string name="compose_title">"撰寫"</string>
-    <string name="to_hint">"給"</string>
-    <string name="subject_hint">"主旨"</string>
-    <string name="add_attachment">"附加"</string>
-    <string name="add_subject">"新增主旨"</string>
-    <string name="discard">"放棄"</string>
-    <string name="view">"檢視"</string>
-    <string name="replace">"取代"</string>
-    <string name="remove">"移除"</string>
-    <string name="send">"傳送"</string>
-    <string name="all_threads">"所有會話群組"</string>
-    <string name="type_to_compose_text_enter_to_send">"輸入簡訊,按下 [Enter] 傳送"</string>
-    <string name="open_keyboard_to_compose_message">"開啟鍵盤以撰寫簡訊"</string>
-    <string name="image_too_large">"圖片太大"</string>
-    <string name="ask_for_automatically_resize">"傳送前是否自動重新調整圖片大小?"</string>
-    <string name="compressing">"壓縮中..."</string>
-    <string name="unsupported_media_format">"不支援 <xliff:g id="NAME">%1$s</xliff:g> 格式"</string>
-    <string name="select_different_media">"請選取不同的 <xliff:g id="NAME">%1$s</xliff:g>。"</string>
-    <string name="exceed_message_size_limitation">"已達最大簡訊長度。"</string>
-    <string name="failed_to_add_media">"抱歉,無法在簡訊中新增 <xliff:g id="NAME">%1$s</xliff:g>。"</string>
-    <string name="failed_to_resize_image">"圖片大小未改變。"</string>
-    <string name="resize_image_error_information">"抱歉,縮小後的圖片仍然太大、無法傳送。"</string>
-    <string name="forward_prefix">"轉寄:"</string>
-    <string name="discard_message">"放棄"</string>
-    <string name="discard_message_reason">"由於沒有有效的收件者,您的簡訊將被捨棄。"</string>
-    <string name="has_invalid_recipient">"無效收件者:(<xliff:g id="NAME">%1$s</xliff:g>)"</string>
-    <string name="invalid_recipient_message">"請修改收件者,否則他們收不到簡訊。"</string>
-    <string name="cannot_send_message">"無法傳送此簡訊"</string>
-    <string name="cannot_send_message_reason">"您的簡訊沒有正確的收件者。"</string>
-    <string name="cannot_forward_drm_obj">"簡訊內含的 DRM 物件無法轉寄。"</string>
-    <string name="converting_to_picture_message">"轉換成 MMS 簡訊..."</string>
-    <string name="converting_to_text_message">"轉換成 SMS 簡訊..."</string>
-    <string name="cannot_add_slide_anymore">"無法新增更多投影片。"</string>
-    <string name="cannot_save_message">"無法儲存簡訊。"</string>
-    <string name="cannot_load_message">"無法載入簡訊。"</string>
-    <string name="message_saved_as_draft">"簡訊已存成草稿。"</string>
-    <string name="cannot_play_audio">"無法播放音訊。"</string>
-    <string name="preview">"預覽"</string>
-    <string name="preview_slideshow">"預覽"</string>
-    <string name="replace_image">"取代圖片"</string>
-    <string name="duration_sec">"長度 (<xliff:g id="DURATION">%s</xliff:g> 秒)"</string>
-    <string name="duration_selector_title">"投影片長度"</string>
-    <string name="layout_selector_title">"投影片版面"</string>
-    <string name="layout_top">"投影片版面 (頂部)"</string>
-    <string name="layout_bottom">"投影片版面 (底部)"</string>
-    <string name="type_to_compose_text_or_leave_blank">"輸入文字或空白"</string>
-    <string name="secs">"秒"</string>
-  <string-array name="select_dialog_items">
-    <item>"1 秒"</item>
-    <item>"2 秒"</item>
-    <item>"3 秒"</item>
-    <item>"4 秒"</item>
-    <item>"5 秒"</item>
-    <item>"6 秒"</item>
-    <item>"7 秒"</item>
-    <item>"8 秒"</item>
-    <item>"9 秒"</item>
-    <item>"10 秒"</item>
-    <item>"其他..."</item>
-  </string-array>
-    <string name="menu_view_contact">"檢視聯絡人"</string>
-    <string name="menu_add_to_contacts">"新增至 [通訊錄]"</string>
-    <string name="hidden_sender_address">"隱藏寄件者地址"</string>
-    <string name="yes">"確定"</string>
-    <string name="no">"取消"</string>
-    <string name="play">"播放"</string>
-    <string name="edit">"編輯"</string>
-    <string name="resize">"調整大小"</string>
-    <string name="try_to_send">"嘗試傳送"</string>
-    <string name="preferences_title">"設定"</string>
-    <string name="restore_default">"還原預設值"</string>
-    <string name="pref_notification_settings_title">"通知設定"</string>
-    <string name="pref_mms_settings_title">"MMS 設定"</string>
-    <string name="pref_sms_settings_title">"SMS 設定"</string>
-    <string name="pref_summary_manage_sim_messages">"管理 SIM 卡上的簡訊"</string>
-    <string name="pref_summary_mms_delivery_reports">"傳送簡訊後要求傳送報告"</string>
-    <string name="pref_summary_mms_read_reports">"傳送簡訊後要求讀取報告"</string>
-    <string name="pref_summary_sms_delivery_reports">"傳送簡訊後要求傳送報告"</string>
-    <string name="pref_title_manage_sim_messages">"管理 SIM 卡上的簡訊"</string>
-    <string name="pref_title_mms_delivery_reports">"傳送報告"</string>
-    <string name="pref_title_mms_read_reports">"閱讀報告"</string>
-    <string name="pref_title_sms_delivery_reports">"傳送報告"</string>
-    <string name="pref_title_notification_enabled">"通知"</string>
-    <string name="pref_summary_notification_enabled">"在狀態列顯示簡訊通知"</string>
-    <string name="pref_title_notification_vibrate">"震動"</string>
-    <string name="pref_summary_notification_vibrate">"同時開啟震動提示"</string>
-    <string name="pref_title_notification_ringtone">"選取鈴聲"</string>
-    <string name="pref_title_mms_auto_retrieval">"自動擷取"</string>
-    <string name="pref_summary_mms_auto_retrieval">"自動擷取簡訊"</string>
-    <string name="pref_title_mms_retrieval_during_roaming">"漫遊時自動擷取"</string>
-    <string name="pref_summary_mms_retrieval_during_roaming">"漫遊時自動擷取簡訊"</string>
-    <string name="to_label">"給"</string>
-    <string name="confirm_dialog_title">"刪除"</string>
-    <string name="confirm_delete_conversation">"將刪除整個會話群組。"</string>
-    <string name="confirm_delete_all_conversations">"所有會話群組都會被刪除。"</string>
-    <string name="confirm_delete_message">"此簡訊將被刪除。"</string>
-    <string name="confirm_delete_all_messages">"將刪除整個會話群組。"</string>
-    <string name="confirm_delete_all_SIM_messages">"即將刪除 SIM 卡上的所有訊息。"</string>
-    <string name="cannot_get_details">"無法取得細節"</string>
-    <string name="message_details_title">"簡訊細節"</string>
-    <string name="message_type_label">"類型:"</string>
-    <string name="text_message">"SMS 簡訊"</string>
-    <string name="multimedia_message">"MMS 簡訊"</string>
-    <string name="multimedia_notification">"MMS 通知"</string>
-    <string name="from_label">"從:"</string>
-    <string name="to_address_label">"收件者:"</string>
-    <string name="bcc_label">"密件副本:"</string>
-    <string name="sent_label">"傳送:"</string>
-    <string name="received_label">"已接收:"</string>
-    <string name="saved_label">"已儲存:"</string>
-    <string name="subject_label">"主旨:"</string>
-    <string name="message_size_label">"簡訊大小:"</string>
-    <string name="priority_label">"優先權:"</string>
-    <string name="priority_high">"高"</string>
-    <string name="priority_normal">"一般"</string>
-    <string name="priority_low">"低"</string>
-    <string name="message_class_label">"簡訊種類:"</string>
-    <string name="menu_edit">"編輯"</string>
-    <string name="menu_retry_sending">"重新傳送"</string>
-    <string name="menu_retry_sending_all">"全部重新傳送"</string>
-    <string name="menu_delete_messages">"刪除簡訊"</string>
-    <string name="retrying_dialog_body">"由於連線問題,此簡訊 (<xliff:g id="MESSAGE">%s</xliff:g>) 傳送失敗。"\n"重新傳送中..."</string>
-    <string name="sim_copy_to_phone_memory">"複製到手機記憶體"</string>
-    <string name="sim_delete">"刪除"</string>
-    <string name="sim_manage_messages_title">"SIM 卡上的 SMS 簡訊"</string>
-    <string name="sim_view">"檢視"</string>
-    <string name="sim_empty">"SIM 卡中沒有簡訊。"</string>
-    <string name="delivery_header_title">"報告"</string>
-    <string name="status_none">"(無)"</string>
-    <string name="status_pending">"等待"</string>
-    <string name="status_read">"已讀取"</string>
-    <string name="status_received">"已接收"</string>
-    <string name="status_failed">"失敗"</string>
-    <string name="status_unread">"未讀"</string>
-    <string name="status_rejected">"已拒絕"</string>
-    <string name="recipient_label">"收件者:"</string>
-    <string name="status_label">"狀態:"</string>
-    <string name="attach_image">"圖片"</string>
-    <string name="attach_take_photo">"擷取圖片"</string>
-    <string name="attach_video">"影片"</string>
-    <string name="attach_record_video">"擷取影片"</string>
-    <string name="attach_sound">"音訊"</string>
-    <string name="attach_record_sound">"錄製音訊"</string>
-    <string name="attach_slideshow">"投影片"</string>
-    <string name="select_bottom_text">"置底文字"</string>
-    <string name="select_top_text">"置頂文字"</string>
-    <string name="notification_multiple">"<xliff:g id="COUNT">%s</xliff:g> 封未讀簡訊。"</string>
-    <string name="notification_multiple_title">"新簡訊"</string>
-    <string name="sim_full_title">"SIM 卡已滿"</string>
-    <string name="sim_full_body">"刪除一些簡訊以釋放儲存空間。"</string>
-    <string name="type_audio">"音訊"</string>
-    <string name="type_picture">"圖片"</string>
-    <string name="type_video">"影片"</string>
-    <string name="confirm">"確認"</string>
-    <string name="message_send_read_report">"即將傳送讀取報告。"</string>
-    <string name="message_queued">"目前無法傳送簡訊。服務恢復後會自動傳送。"</string>
-    <string name="no_subject">"(沒有主旨)"</string>
-    <string name="unknown_sender">"未知的寄件者"</string>
-    <string name="dl_failure_notification">"從 <xliff:g id="FROM">%s</xliff:g> 下載 <xliff:g id="SUBJECT">%s</xliff:g> 失敗。"</string>
-    <string name="rate_limit_surpassed">"確認"</string>
-    <string name="confirm_rate_limit">"即將傳送大量多媒體簡訊。確定傳送?"</string>
-    <string name="message_download_failed_title">"簡訊未下載"</string>
-    <string name="message_send_failed_title">"簡訊未送出"</string>
-    <string name="message_failed_body">"檢視此簡訊並再試一次。"</string>
-    <string name="download_later">"目前無法下載。請稍後再試一次。"</string>
-    <string name="select_audio">"選取音訊"</string>
-    <string name="copy_to_sdcard">"將附件儲存至 SD 卡"</string>
-    <string name="copy_to_sdcard_success">"已將附件儲存至 SD 卡"</string>
-    <string name="copy_to_sdcard_fail">"無法將附件複製到 SD 卡"</string>
-    <string name="menu_insert_smiley">"插入表情符號"</string>
-    <string name="select_link_title">"選取動作"</string>
-</resources>
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
deleted file mode 100644
index 157b59a..0000000
--- a/res/values/arrays.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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>
-    <!-- NOTE: if you change anything about this array, you must make the corresponding change
-         to the array DEFAULT_SMILEY_RES_IDS in MessageListItem.java and to default_smiley_names
-         below. -->
-    <string-array name="default_smiley_texts">
-      <item>:-)</item>   <!-- 0: Happy -->
-      <item>:-(</item>   <!-- 1: Sad -->
-      <item>;-)</item>   <!-- 2: Winking -->
-      <item>:-P</item>   <!-- 3: Tongue sticking out -->
-      <item>=-O</item>   <!-- 4: Surprised -->
-      <item>:-*</item>   <!-- 5: Kissing -->
-      <item>:O</item>    <!-- 6: Yelling -->
-      <item>B-)</item>   <!-- 7: Cool -->
-      <item>:-$</item>   <!-- 8: Money mouth -->
-      <item>:-!</item>   <!-- 9: Foot in mouth -->
-      <item>:-[</item>   <!-- 10: Embarrassed -->
-      <item>O:-)</item>  <!-- 11: Angel -->
-      <item>:-\\</item>  <!-- 12: Undecided -->
-      <item>:\'(</item>  <!-- 13: Crying -->
-      <item>:-X</item>   <!-- 14: Lips are sealed -->
-      <item>:-D</item>   <!-- 15: Laughing -->
-      <item>o_O</item>   <!-- 16: Confused -->
-    </string-array>
-
-    <!-- NOTE: if you change anything about this array, you must make the corresponding change
-         to the array DEFAULT_SMILEY_RES_IDS in MessageListItem.java and to default_smiley_texts
-         above. -->
-    <string-array name="default_smiley_names">
-        <item>Happy</item>                   <!-- 0: :-) -->
-        <item>Sad</item>                     <!-- 1: :-( -->
-        <item>Winking</item>                 <!-- 2: ;-) -->
-        <item>Tongue sticking out</item>     <!-- 3: :-P -->
-        <item>Surprised</item>               <!-- 4: =-O -->
-        <item>Kissing</item>                 <!-- 5: :-* -->
-        <item>Yelling</item>                 <!-- 6: :O -->
-        <item>Cool</item>                    <!-- 7: B-) -->
-        <item>Money mouth</item>             <!-- 8: :-$ -->
-        <item>Foot in mouth</item>           <!-- 9: :-! -->
-        <item>Embarrassed</item>             <!-- 10: :-[ -->
-        <item>Angel</item>                   <!-- 11: O:-) -->
-        <item>Undecided</item>               <!-- 12: :-\\ -->
-        <item>Crying</item>                  <!-- 13: :\'( -->
-        <item>Lips are sealed</item>         <!-- 14: :-X -->
-        <item>Laughing</item>                <!-- 15: :-D -->
-        <item>Confused</item>                <!-- 16: o_O -->
-    </string-array>
-</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
deleted file mode 100644
index f43dd0b..0000000
--- a/res/values/colors.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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>
-    <!-- Activity background color -->
-    <drawable name="class_zero_background">#7f040000</drawable>
-
-    <!-- Widget background -->
-    <drawable name="light_blue_background">#ffecfbff</drawable>
-    <drawable name="white_background">#ffffffff</drawable>
-
-    <!-- text color -->
-    <drawable name="text_color">#ffffffff</drawable>
-    <drawable name="text_color_red">#ffff0000</drawable>
-    <drawable name="text_color_black">#ff000000</drawable>
-    <drawable name="text_color_offwhite">#55ffffff</drawable>
-
-    <!-- Chat "sent time" text background -->
-    <color name="timestamp_color">#bf000000</color>
-</resources>
-
diff --git a/res/values/strings.xml b/res/values/strings.xml
deleted file mode 100644
index 15ac245..0000000
--- a/res/values/strings.xml
+++ /dev/null
@@ -1,530 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <!-- The name of the SMS/MMS app as it appears to the user in the Home screen, task switcher, etc. -->
-    <string name="app_label">Messaging</string>
-
-    <!-- Command name to open a Compose screen; displays in conversation list -->
-    <string name="new_message">New message</string>
-    <!-- Summary text under "New Message" command; displays in conversation list -->
-    <string name="create_new_message">Compose new message</string>
-    <!-- Context menu item on an individual message for dialing the sender's phone number -->
-    <string name="menu_call_back">Call <xliff:g id="name">%s</xliff:g></string>
-    <!-- Context menu item on an individual message for emailing the sender -->
-    <string name="menu_send_email">Send email to <xliff:g id="name">%s</xliff:g></string>
-
-    <!-- Menu item for starting a new conversation -->
-    <string name="menu_compose_new">Compose</string>
-    <!-- Menu item for accessing application settings -->
-    <string name="menu_preferences">Settings</string>
-    <string name="menu_add_address_to_contacts">Add <xliff:g id="name">%s</xliff:g> to Contacts</string>
-    <!-- Menu item to call the recipient of the conversation on the phone (imperative verb) -->
-    <string name="menu_call">Call</string>
-    <!-- Menu item for deleting all conversations -->
-    <string name="menu_delete_all">Delete threads</string>
-    <!-- Context menu item on an individual conversation for deleting that conversation -->
-    <string name="menu_delete">Delete</string>
-    <!-- This string is no longer used. It used to be the menu item for viewing all messages that
-         were unable to be delivered, i.e. send failed -->
-    <string name="menu_undelivered_messages">Undelivered messages</string>
-    <!-- Context menu item on an individual conversation for viewing that conversation -->
-    <string name="menu_view">View</string>
-    <!-- Message that appears on screen while SIM card messages are retrieved -->
-    <string name="refreshing">Refreshing\u2026</string>
-
-    <!-- Tag appearing on conversations in the conversation list that contain a draft message -->
-    <string name="has_draft">Draft</string>
-
-    <!-- Appearance of message sender in multi-recipient messages, e.g. "me to Megan" -->
-    <string name="broadcast_from_to"><xliff:g id="format">%s to %s</xliff:g></string>
-    <!-- Name to use when we have an unspecified sender -->
-    <string name="anonymous_recipient">Anonymous</string>
-    <!-- Subject to display in the conversation list if there is no subject -->
-    <string name="no_subject_view">(No subject)</string>
-
-    <!-- Name of the local user when displaying sender of an outgoing message (personal pronoun) -->
-    <string name="messagelist_sender_self">Me</string>
-    <!-- Context menu item on an individual message for viewing an attached picture -->
-    <string name="view_picture">View picture</string>
-    <!-- Context menu item on an individual message for viewing an attached slideshow -->
-    <string name="view_slideshow">View slideshow</string>
-    <!-- Context menu item on an individual message for viewing message details such as time and date -->
-    <string name="view_message_details">View message details</string>
-    <!-- Context menu item on an individual message for viewing a delivery report -->
-    <string name="view_delivery_report">View report</string>
-    <!-- Context menu item on an individual message for deleting only that message -->
-    <string name="delete_message">Delete message</string>
-    <!-- Time and date a message was sent -->
-    <string name="sent_on">"Sent: <xliff:g id="date">%s</xliff:g>"</string>
-    <!-- Time and date a message is due to expire -->
-    <string name="expire_on">"Expires: <xliff:g id="date">%s</xliff:g>"</string>
-    <!-- Abbreviation for "kilobyte" -->
-    <string name="kilobyte">KB</string>
-
-    <!-- Dialog box title brought up when warning the user that a message could not be delivered -->
-    <string name="undelivered_msg_dialog_title">Undelivered message</string>
-    <!-- Dialog box message indicating that a message could not be delivered, including the time of last attempt -->
-    <string name="undelivered_msg_dialog_body">Unable to send this message.\nAttempt made: <xliff:g id="message">%s</xliff:g>.</string>
-    <!-- Dialog box message indicating that a message could not be delivered -->
-    <string name="undelivered_sms_dialog_body">Unable to send this message.</string>
-    <!-- Menu item for deleting the entire conversation currently being viewed -->
-    <string name="delete_thread">Delete thread</string>
-    <!-- Context menu item on an individual message for forwarding it to another recipient -->
-    <string name="menu_forward">Forward</string>
-    <!-- Text of a button appearing for MMS messages that have not yet been downloaded, causing the message
-         to be downloaded (imperative verb) -->
-    <string name="download">Download</string>
-    <!-- Message displayed in place of the "download message" button once it has been pressed,
-         indicating that the download is in progress -->
-    <string name="downloading">Downloading</string>
-    <!-- Formatting for subject displayed inline, prepended to MMS message text -->
-    <string name="inline_subject">"&lt;Subject: <xliff:g id="subject">%s</xliff:g>&gt;"</string>
-    <!-- Text to display when the actual text is inaccessible due to DRM protection -->
-    <string name="drm_protected_text">"* DRM protected text *"</string>
-    <!-- Error message to display when DRM rights are insufficient to access some data -->
-    <string name="insufficient_drm_rights">Insufficient DRM rights detected.</string>
-    <!-- Individual message context menu item -->
-    <string name="copy_message_text">Copy message text</string>
-    <!-- Header for context menu on an individual message -->
-    <string name="message_options">Message options</string>
-
-    <!-- Button text on edit slide screen indicating the user wants to finish editing that slide -->
-    <string name="done">Done</string>
-
-    <!-- Menu item in slideshow edit screen for moving the selected slide up in the order -->
-    <string name="move_up">Move up</string>
-    <!-- Menu item in slideshow edit screen for moving the selected slide down in the order -->
-    <string name="move_down">Move down</string>
-    <!-- Menu item in slideshow edit screen for removing the selected slide from the slideshow -->
-    <string name="remove_slide">Remove slide</string>
-    <!-- Menu item in slideshow edit screen for adding a new slide to the slideshow -->
-    <string name="add_slide">Add slide</string>
-    <!-- Text displayed below "Add slide" item in slideshow edit screen -->
-    <string name="add_slide_hint">Select to create new slide.</string>
-    <!-- Menu item in slideshow edit screen for discarding the entire slideshow -->
-    <string name="discard_slideshow">Discard slideshow</string>
-
-
-    <!-- Menu item in slide edit screen for removing the text from the slide being edited -->
-    <string name="remove_text">Remove text</string>
-    <!-- Menu item in slide edit screen for adding a picture to the slide being edited -->
-    <string name="add_picture">Add picture</string>
-    <!-- Menu item in slide edit screen for removing the picture from the slide being edited -->
-    <string name="remove_picture">Remove picture</string>
-    <!-- Menu item in slide edit screen for adding music to the slide being edited -->
-    <string name="add_music">Add music</string>
-    <!-- Menu item in slide edit screen for removing the music from the slide being edited -->
-    <string name="remove_music">Remove music</string>
-    <!-- Menu item in slide edit screen for adding a video to the slide being edited -->
-    <string name="add_video">Add video</string>
-    <!-- Menu item in slide edit screen for removing the video from the slide being edited -->
-    <string name="remove_video">Remove video</string>
-
-    <!-- Title bar displayed in compose message activity before a recipient has been selected -->
-    <string name="compose_title">Compose</string>
-    <!-- Hint displayed in message recipient text box when starting a new conversation -->
-    <string name="to_hint">To</string>
-    <!-- Hint displayed in subject edit text box when adding a subject -->
-    <string name="subject_hint">Subject</string>
-
-    <!-- Menu item in conversation screen for attaching something to the message being composed -->
-    <string name="add_attachment">Attach</string>
-    <!-- Menu item in conversation screen for adding a subject to the message being composed -->
-    <string name="add_subject">Add subject</string>
-    <!-- Menu item in conversation screen for discarding the message currently being composed -->
-    <string name="discard">Discard</string>
-
-    <!-- Button next to an attachment during message composition to view the attachment (imperative verb) -->
-    <string name="view">View</string>
-    <!-- Button next to an attachment during message composition to replace the attachment (imperative verb) -->
-    <string name="replace">Replace</string>
-    <!-- Button next to an attachment during message composition to remove the attachment (imperative verb) -->
-    <string name="remove">Remove</string>
-
-    <!-- Button in conversation screen for sending the message currently being composed (imperative verb) -->
-    <string name="send">Send</string>
-
-    <!-- Menu item in conversation screen for returning to the conversation list -->
-    <string name="all_threads">All threads</string>
-
-    <!-- Hint text in message body field when keyboard is exposed -->
-    <string name="type_to_compose_text_enter_to_send">Type to compose, press Enter to send</string>
-    <!-- Hint text in message body field when keyboard is hidden -->
-    <string name="open_keyboard_to_compose_message">Open keyboard to compose message</string>
-
-    <!-- Dialog title for warning the user that the picture they are trying to attach is too large -->
-    <string name="image_too_large">Picture too large</string>
-    <!-- Dialog message text asking the user if he wants to resize the picture being attached -->
-    <string name="ask_for_automatically_resize">Automatically resize picture before sending?</string>
-
-    <!-- Progress message while an image is being resized -->
-    <string name="compressing">Compressing\u2026</string>
-
-    <!-- Error message indicating the format for the specified media type (e.g. "picture") is unsupported -->
-    <string name="unsupported_media_format">Unsupported <xliff:g id="name">%1$s</xliff:g> format</string>
-    <!-- Message prompting the user to select a different item; item string as type-appropriate (e.g. "picture") -->
-    <string name="select_different_media">Please select a different <xliff:g id="name">%1$s</xliff:g>.</string>
-    <!-- Message indicating that the message size limit has been reached -->
-    <string name="exceed_message_size_limitation">Message size limit reached.</string>
-    <!-- Error message indicating that the item trying to be attached could not be added -->
-    <string name="failed_to_add_media">Sorry, you cannot add this <xliff:g id="name">%1$s</xliff:g> to your message.</string>
-    <!-- Error message indicating that the picture being attached and resized could not be resized -->
-    <string name="failed_to_resize_image">Picture not resized.</string>
-    <!-- Error message indicating that an image being attached is still too large to send even after resize -->
-    <string name="resize_image_error_information">Sorry, even when resized this picture is too large to send.</string>
-    <!-- String prepended to forwarded messages to indicate they were forwarded -->
-    <string name="forward_prefix">Fwd:\u0020</string>
-    <!-- Dialog box title that appears when a draft message will not be saved due to invalid recipients -->
-    <string name="discard_message">Discard</string>
-    <!-- Dialog message text explaining that a draft message will not be saved due to invalid recipients -->
-    <string name="discard_message_reason">Your message will be discarded because it has no valid recipients.</string>
-    <!-- Dialog box title indicating which recipients are invalid when the user tries to send a message with invalid recipients -->
-    <string name="has_invalid_recipient">Invalid recipient(s): &lt;<xliff:g id="name">%1$s</xliff:g>&gt;</string>
-    <!-- Dialog message text when the user tries to send a message with invalid recipients -->
-    <string name="invalid_recipient_message">Please correct the recipient(s) or they will not receive the message.</string>
-    <!-- Dialog box title indicating the message cannot be sent because there are no valid recipients -->
-    <string name="cannot_send_message">Cannot send this message</string>
-    <!-- Dialog message text indicating the message cannot be sent because there are no valid recipients -->
-    <string name="cannot_send_message_reason">Your message has no valid recipients.</string>
-    <!-- Error message displayed when the user attempts to forward a message with DRM-locked contents -->
-    <string name="cannot_forward_drm_obj">The DRM object included in the message cannot be forwarded.</string>
-
-    <!-- Brief message that appears when converting a message from SMS to MMS. -->
-    <string name="converting_to_picture_message">Converting to MMS message\u2026</string>
-    <!-- Brief message that appears when converting a message from MMS to SMS. -->
-    <string name="converting_to_text_message">Converting to SMS message\u2026</string>
-    <!-- Brief message that appears when the maximum number of slides has been reached -->
-    <string name="cannot_add_slide_anymore">Cannot add more slides.</string>
-    <!-- Brief message that appears when the message cannot be saved -->
-    <string name="cannot_save_message">Cannot save message.</string>
-    <string name="cannot_load_message">Cannot load message.</string>
-    <!-- Brief message that appears when a message has automatically been saved as a draft -->
-    <string name="message_saved_as_draft">Message saved as draft.</string>
-
-    <!-- Error message indicating that an audio attachment cannot be played -->
-    <string name="cannot_play_audio">Cannot play audio.</string>
-
-    <!-- Button in the slide editor screen used to preview the slide (imperative verb) -->
-    <string name="preview">Preview</string>
-    <!-- Menu item in the slide editor screen used to preview the entire slideshow (imperative verb) -->
-    <string name="preview_slideshow">Preview</string>
-    <!-- Button in the slide editor screen used to replace the attached picture -->
-    <string name="replace_image">Replace picture</string>
-    <!-- String for slide duration in seconds -->
-    <string name="duration_sec">Duration (<xliff:g id="duration">%s</xliff:g> sec)</string>
-    <!-- Dialog box title for duration selector -->
-    <string name="duration_selector_title">"Duration for slide "</string>
-    <!-- Dialog box title for slide layout selector -->
-    <string name="layout_selector_title">"Slideshow layout "</string>
-    <!-- Slide layout option for layout at the top -->
-    <string name="layout_top">Layout (top)</string>
-    <!-- Slide layout option for layout at the bottom -->
-    <string name="layout_bottom">Layout (bottom)</string>
-    <!-- Hint in slide text field before text is typed -->
-    <string name="type_to_compose_text_or_leave_blank">Type to compose text, or leave blank</string>
-
-    <!-- In duration selection dialog box, short version of "seconds" -->
-    <string name="secs">secs</string>
-    <!-- Options for slide duration in duration selection dialog box -->
-    <string-array name="select_dialog_items">
-         <item>1 second</item>
-         <item>2 seconds</item>
-         <item>3 seconds</item>
-         <item>4 seconds</item>
-         <item>5 seconds</item>
-         <item>6 seconds</item>
-         <item>7 seconds</item>
-         <item>8 seconds</item>
-         <item>9 seconds</item>
-         <item>10 seconds</item>
-         <item>Other\u2026</item>
-    </string-array>
-
-    <!-- Context menu item on a message recipient for viewing their contact info -->
-    <string name="menu_view_contact">View contact</string>
-    <!-- Context menu item on a message recipient for adding them to the user's
-         contacts (used if the recipient is not already in the address book) -->
-    <string name="menu_add_to_contacts">Add to Contacts</string>
-
-    <!-- Sender to be used if the sender address has been hidden -->
-    <string name="hidden_sender_address">Hidden sender address</string>
-
-    <!-- Text to be used for affirmative response button in dialog boxes -->
-    <string name="yes">OK</string>
-    <!-- Text to be used for negative response button in dialog boxes -->
-    <string name="no">Cancel</string>
-
-    <!-- Button text used for playing an attachment or slideshow (imperative verb) -->
-    <string name="play">Play</string>
-    <!-- Button text used for editing a slideshow (imperative verb) -->
-    <string name="edit">Edit</string>
-    <!-- Button for resizing an image used in "image too large" dialog box (imperative verb) -->
-    <string name="resize">Resize</string>
-    <!-- Button used for trying to send a message that has some valid recipients and some
-         invalid recipients, in spite of the warning presented to the user -->
-    <string name="try_to_send">Try to send</string>
-
-    <!-- Title of Settings screen -->
-    <string name="preferences_title">"Settings"</string>
-    <!-- Settings screen menu item for restoring all settings to default -->
-    <string name="restore_default">"Restore default settings"</string>
-
-    <!-- Settings screen, section heading for notifications -->
-    <string name="pref_notification_settings_title">Notification settings</string>
-    <!-- Settings screen, section heading for MMS-specific settings -->
-    <string name="pref_mms_settings_title">MMS settings</string>
-    <!-- Settings screen, section heading for SMS-specific settings -->
-    <string name="pref_sms_settings_title">SMS settings</string>
-
-    <!-- Settings item description for entering SIM card message screen -->
-    <string name="pref_summary_manage_sim_messages">Manage messages stored on your SIM card</string>
-    <!-- Settings item description for boolean MMS delivery report setting -->
-    <string name="pref_summary_mms_delivery_reports">Request a delivery report for each message you send</string>
-    <!-- Settings item description for boolean MMS read report setting -->
-    <string name="pref_summary_mms_read_reports">Request a read report for each message you send</string>
-    <!-- Settings item description for boolean SMS delivery report setting -->
-    <string name="pref_summary_sms_delivery_reports">Request a delivery report for each message you send</string>
-    <!-- Settings item for entering SIM card message screen -->
-    <string name="pref_title_manage_sim_messages">Manage SIM card messages</string>
-    <!-- Settings item for boolean option to enable/disable MMS delivery reports -->
-    <string name="pref_title_mms_delivery_reports">Delivery reports</string>
-    <!-- Settings item for boolean option to enable/disable MMS read reports -->
-    <string name="pref_title_mms_read_reports">Read reports</string>
-    <!-- Settings item for boolean option to enable/disable SMS delivery reports -->
-    <string name="pref_title_sms_delivery_reports">Delivery reports</string>
-    <!-- Settings item for boolean option to display message notifications -->
-    <string name="pref_title_notification_enabled">Notifications</string>
-    <!-- Settings item description for boolean message notification option -->
-    <string name="pref_summary_notification_enabled">Display message notifications in status bar</string>
-    <!-- Settings item for boolean option to vibrate during message notification -->
-    <string name="pref_title_notification_vibrate">Vibrate</string>
-    <!-- Settings item description for boolean vibrate option -->
-    <string name="pref_summary_notification_vibrate">Also vibrate when notified</string>
-    <!-- Settings item for entering ringtone selection screen -->
-    <string name="pref_title_notification_ringtone">Select ringtone</string>
-
-    <!-- Settings item for boolean option to auto-retrieve incoming MMS messages -->
-    <string name="pref_title_mms_auto_retrieval">Auto-retrieve</string>
-    <!-- Settings item description for boolean MMS auto-retrieve option -->
-    <string name="pref_summary_mms_auto_retrieval">Automatically retrieve messages</string>
-    <!-- Settings item for boolean option to auto-retrieve incoming MMS messages while roaming -->
-    <string name="pref_title_mms_retrieval_during_roaming">Roaming auto-retrieve</string>
-    <!-- Settings item description for boolean MMS auto-retrieve while roaming option -->
-    <string name="pref_summary_mms_retrieval_during_roaming">Automatically retrieve messages while roaming</string>
-
-    <!-- Label prepended to recipient's name in Undelivered Messages screen -->
-    <string name="to_label">"To "</string>
-
-    <!-- Confirm Delete -->
-    <!-- Delete confirmation dialog title -->
-    <string name="confirm_dialog_title">Delete</string>
-    <!-- Delete entire thread confirmation dialog message -->
-    <string name="confirm_delete_conversation">The entire thread will be deleted.</string>
-    <!-- Delete all threads confirmation dialog message -->
-    <string name="confirm_delete_all_conversations">All threads will be deleted.</string>
-    <!-- Delete message confirmation dialog message -->
-    <string name="confirm_delete_message">The message will be deleted.</string>
-    <!-- Delete entire thread confirmation dialog message -->
-    <string name="confirm_delete_all_messages">The entire thread will be deleted.</string>
-    <!-- Delete all the messages on the SIM dialog message -->
-    <string name="confirm_delete_all_SIM_messages">All messages on the SIM will be deleted.</string>
-
-    <!-- When the user tries to view message details and some error occurs while
-         retrieving those details, this message will be shown. -->
-    <string name="cannot_get_details">Cannot get details</string>
-    <!-- Title of "Message details" dialog -->
-    <string name="message_details_title">Message details</string>
-    <!-- Label in "Message details" dialog -->
-    <string name="message_type_label">Type:\u0020</string>
-    <!-- "Type" value in "Message details" dialog -->
-    <string name="text_message">SMS message</string>
-    <!-- "Type" value in "Message details" dialog -->
-    <string name="multimedia_message">MMS message</string>
-    <!-- "Type" value in "Message details" dialog -->
-    <string name="multimedia_notification">MMS notification</string>
-    <!-- Label in "Message details" dialog showing who sent the message. -->
-    <string name="from_label">From:\u0020</string>
-    <!-- Label in "Message details" dialog -->
-    <string name="to_address_label">To:\u0020</string>
-    <!-- Label in "Message details" dialog -->
-    <string name="bcc_label">Bcc:\u0020</string>
-    <!-- Label in "Message details" dialog -->
-    <string name="sent_label">Sent:\u0020</string>
-    <!-- Label in "Message details" dialog -->
-    <string name="received_label">Received:\u0020</string>
-    <!-- Label in "Message details" dialog -->
-    <string name="saved_label">Saved:\u0020</string>
-    <!-- Label in "Message details" dialog -->
-    <string name="subject_label">Subject:\u0020</string>
-    <!-- Label in "Message details" dialog -->
-    <string name="message_size_label">Message size:\u0020</string>
-    <!-- Label in "Message details" dialog -->
-    <string name="priority_label">Priority:\u0020</string>
-    <!-- "Priority" value in "Message details" dialog -->
-    <string name="priority_high">High</string>
-    <!-- "Priority" value in "Message details" dialog -->
-    <string name="priority_normal">Normal</string>
-    <!-- "Priority" value in "Message details" dialog -->
-    <string name="priority_low">Low</string>
-    <!-- Label in "Message details" dialog -->
-    <string name="message_class_label">Message class:\u0020</string>
-
-   <!-- Menu title for editing a message -->
-   <string name="menu_edit">Edit</string>
-   <!-- Menu title the user can use for trying to resend a message. -->
-   <string name="menu_retry_sending">Retry sending</string>
-   <!-- Menu title the user can use for trying to resend all the messages. -->
-   <string name="menu_retry_sending_all">Retry sending all</string>
-   <!-- Menu title for deleting undelivered messages or messages on
-        the SIM card. -->
-   <string name="menu_delete_messages">Delete messages</string>
-   <!-- Dialog text displayed when trying to resend an unsent message. -->
-   <string name="retrying_dialog_body">This message <xliff:g id="message">%s</xliff:g> was not sent due to a connection problem.\r\nRetrying to send\u2026</string>
-
-    <!-- Manage SIM Messages -->
-    <!-- Menu title to copy a selected message from the SIM card to the phone. -->
-    <string name="sim_copy_to_phone_memory">Copy to phone memory</string>
-    <!-- Menu title to delete a selected messaged from the SIM card. -->
-    <string name="sim_delete">Delete</string>
-    <!-- Title of screen displaying messages on SIM card -->
-    <string name="sim_manage_messages_title">SMS messages on SIM card</string>
-    <!-- Context menu item but currently commented out in 1.0. -->
-    <string name="sim_view">View</string>
-    <!-- Message that appears on the "SMS messges on SIM card" screen when there are no messages on the SIM card -->
-    <string name="sim_empty">No messages on the SIM card.</string>
-
-    <!-- Delivery Header View -->
-    <!-- Title of "Report" window -->
-    <string name="delivery_header_title">Report</string>
-
-    <!-- Delivery Report Activity -->
-    <!-- Status in "Report" window -->
-    <string name="status_none">(None)</string>
-    <!-- Status in "Report" window -->
-    <string name="status_pending">Pending</string>
-    <!-- Status in "Report" window -->
-    <string name="status_read">Read</string>
-    <!-- Status in "Report" window -->
-    <string name="status_received">Received</string>
-    <!-- Status in "Report" window -->
-    <string name="status_failed">Unsuccessful</string>
-    <!-- Status in "Report" window -->
-    <string name="status_unread">Unread</string>
-    <!-- Status in "Report" window -->
-    <string name="status_rejected">Rejected</string>
-    <!-- Label in "Report" window -->
-    <string name="recipient_label">Recipient:\u0020</string>
-    <!-- Label in "Report" window -->
-    <string name="status_label">Status:\u0020</string>
-    
-
-    <!-- Attachment Type Selector Adapter. This string is an option in the "Attach" dialog, "Add music" dialog -->
-    <string name="attach_image">Pictures</string>
-    <!-- Attachment Type Selector Adapter. This string is an option in the "Attach" dialog, "Add music" dialog -->
-    <string name="attach_take_photo">Capture picture</string>
-    <!-- Attachment Type Selector Adapter. This string is an option in the "Attach" dialog, "Add music" dialog -->
-    <string name="attach_video">Videos</string>
-    <!-- Attachment Type Selector Adapter. This string is an option in the "Attach" dialog, "Add music" dialog -->
-    <string name="attach_record_video">Capture video</string>
-    <!-- Attachment Type Selector Adapter. This string is an option in the "Attach" dialog, "Add music" dialog -->
-    <string name="attach_sound">Audio</string>
-    <!-- Attachment Type Selector Adapter. This string is an option in the "Attach" dialog, "Add music" dialog -->
-    <string name="attach_record_sound">Record audio</string>
-    <!-- Attachment Type Selector Adapter. This string is an option in the "Attach" dialog, "Add music" dialog -->
-    <string name="attach_slideshow">Slideshow</string>
-
-    <!-- Layout Selector Adapter. Slideshow layout dialog option for aligning an icon. -->
-    <string name="select_bottom_text">Text on bottom</string>
-    <!-- Layout Selector Adapter. Slideshow layout dialog option for aligning an icon. -->
-    <string name="select_top_text">Text on top</string>
-
-    <!-- Delivery Report Notification dialog title. -->
-    <string name="notification_multiple"><xliff:g id="count">%s</xliff:g> unread messages.</string>
-    <!-- Delivery Report Notification dialog title. -->
-    <string name="notification_multiple_title">New messages</string>
-
-    <!-- Sim Full Notification dialog title. -->
-    <string name="sim_full_title">SIM card full</string>
-    <!-- Sim Full Notification dialog text. -->
-    <string name="sim_full_body">Delete some messages to make room for more.</string>
-
-    <!-- Multimedia type used in building other messages.
-         For instance: Sorry, you cannot add this audio to your message. -->
-    <string name="type_audio">audio</string>
-    <!-- Multimedia type used in building other messages.
-         For instance: Sorry, you cannot add this picture to your message. -->
-    <string name="type_picture">picture</string>
-    <!-- Multimedia type used in building other messages.
-         For instance: Sorry, you cannot add this video to your message. -->
-    <string name="type_video">video</string>
-
-    <!-- Dialog title for the Read Report dialog. -->
-    <string name="confirm">Confirm</string>
-    <!-- Dialog text for the Read Report dialog. -->
-    <string name="message_send_read_report">A read report will be sent.</string>
-
-    <!-- This is the text of a toast message briefly displayed when a problem occurs
-         while sending. -->
-    <string name="message_queued">Currently unable to send your message. It will be sent when the service becomes available.</string>
-
-    <!-- Download Manager -->
-    <!-- When an error occurs downloading a new message and a subject isn't available, substitute
-         this default subject. -->
-    <string name="no_subject">(No subject)</string>
-    <!-- When an error occurs downloading a new message and the sender is unknown, substitute
-         this default text. -->
-    <string name="unknown_sender">Unknown sender</string>
-    <!-- When an error occurs downloading a new message, display this message. 
-         An example: Download of message Wanna get pizza from dorkman was unsuccessful. -->
-    <string name="dl_failure_notification">Download of message <xliff:g id="subject">%s</xliff:g> from <xliff:g id="from">%s</xliff:g> was unsuccessful.</string>
-
-    <!-- This is the confirm rate limit alert dialog title. -->
-    <string name="rate_limit_surpassed">Confirm</string>
-    <!-- This is the confirm rate limit alert dialog text. -->
-    <string name="confirm_rate_limit">A large number of multimedia messages are being sent. Is this OK?</string>
-
-    <!-- Message Failed Notification -->
-    <!-- Dialog box title when receiving a message failed. -->
-    <string name="message_download_failed_title">Message not downloaded</string>
-    <!-- Dialog box title when sending a message failed. -->
-    <string name="message_send_failed_title">Message not sent</string>
-    <!-- Dialog box message text when failure occurs sending a message. -->
-    <string name="message_failed_body">Select to review the message and try again.</string>
-    <!-- Dialog box message when there's a problem retrieving messages. -->
-    <string name="download_later">Currently unable to download. Please try again later.</string>
-
-    <!-- Title for audio file picker -->
-    <string name="select_audio">Select audio</string>
-    <!-- Menu title to copy an attachment to the SD card -->
-    <string name="copy_to_sdcard">Copy attached to SD card</string>
-    <!-- Toast message on successful copy to SD card -->
-    <string name="copy_to_sdcard_success">Attachment copied to SD card</string>
-    <!-- Toast message on failed copy to SD card -->
-    <string name="copy_to_sdcard_fail">Copying attachment to SD card failed</string>
-    <!-- Menu item -->
-    <string name="menu_insert_smiley">Insert smiley</string>
-
-    <!-- This is the dialog title for the "Select link" dialog, shown when the user clicks on a
-    chat in the chat history view if there are links in the chat message. The dialog displays the
-    links if there are any -->
-    <string name="select_link_title">Select action</string>
-</resources>
-
diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml
deleted file mode 100644
index 5dafe26..0000000
--- a/res/xml/preferences.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
--->
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
-  <PreferenceCategory android:title="@string/pref_sms_settings_title">
-    <CheckBoxPreference android:defaultValue="false"
-                      android:key="pref_key_sms_delivery_reports"
-                      android:summary="@string/pref_summary_sms_delivery_reports"
-                      android:title="@string/pref_title_sms_delivery_reports" />
-    <com.android.mms.ui.ManageSimPreference
-       android:key="pref_key_manage_sim_messages"
-       android:summary="@string/pref_summary_manage_sim_messages"
-       android:title="@string/pref_title_manage_sim_messages" />
-  </PreferenceCategory>
-  <PreferenceCategory android:title="@string/pref_mms_settings_title">
-    <CheckBoxPreference android:defaultValue="false"
-                      android:key="pref_key_mms_delivery_reports"
-                      android:summary="@string/pref_summary_mms_delivery_reports"
-                      android:title="@string/pref_title_mms_delivery_reports" />
-    <CheckBoxPreference android:defaultValue="false"
-                      android:key="pref_key_mms_read_reports"
-                      android:summary="@string/pref_summary_mms_read_reports"
-                      android:title="@string/pref_title_mms_read_reports" />
-    <CheckBoxPreference android:defaultValue="true"
-                      android:key="pref_key_mms_auto_retrieval"
-                      android:title="@string/pref_title_mms_auto_retrieval"
-                      android:summary="@string/pref_summary_mms_auto_retrieval" />
-    <CheckBoxPreference android:layout="?android:attr/preferenceLayoutChild"
-                        android:dependency="pref_key_mms_auto_retrieval"
-                        android:defaultValue="false"
-                        android:key="pref_key_mms_retrieval_during_roaming"
-                        android:title="@string/pref_title_mms_retrieval_during_roaming"
-                        android:summary="@string/pref_summary_mms_retrieval_during_roaming" />
-  </PreferenceCategory>
-  <PreferenceCategory android:title="@string/pref_notification_settings_title">
-    <CheckBoxPreference android:key="pref_key_enable_notifications"
-                        android:title="@string/pref_title_notification_enabled"
-                        android:summary="@string/pref_summary_notification_enabled"
-                        android:defaultValue="true" />
-    <RingtonePreference android:layout="?android:attr/preferenceLayoutChild"
-                        android:dependency="pref_key_enable_notifications"
-                        android:key="pref_key_ringtone"
-                        android:title="@string/pref_title_notification_ringtone"
-                        android:ringtoneType="notification"
-                        android:defaultValue="content://settings/system/notification_sound" />
-    <CheckBoxPreference android:layout="?android:attr/preferenceLayoutChild"
-                        android:dependency="pref_key_enable_notifications"
-                        android:key="pref_key_vibrate"
-                        android:defaultValue="false"
-                        android:title="@string/pref_title_notification_vibrate"
-                        android:summary="@string/pref_summary_notification_vibrate" />
-  </PreferenceCategory>
-</PreferenceScreen>
diff --git a/src/com/android/mms/AttachImage.java b/src/com/android/mms/AttachImage.java
deleted file mode 100644
index 2973d8c..0000000
--- a/src/com/android/mms/AttachImage.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.provider.Telephony.Mms.Intents;
-import android.util.Config;
-import android.util.Log;
-
-import com.android.mms.ui.ComposeMessageActivity;
-
-class AttachImage extends Activity {
-    private static final String TAG = "AttachImage";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-    private static final int TAG_COMPOSER = 1;
-
-    public AttachImage() {
-    }
-
-    @Override
-    public void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "mms.AttachImage.onCreate with " + getIntent().getData());
-        }
-
-        Intent intent = new Intent();
-        intent.setClass(this, ComposeMessageActivity.class);
-        intent.putExtra(Intents.EXTRA_CONTENTS, new Uri[] { getIntent().getData() });
-        intent.putExtra(Intents.EXTRA_TYPES,    new String[] { "image/*" });
-        startActivityForResult(intent, TAG_COMPOSER);
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "mms.AttachImage.onActivityResult requstCode " + requestCode + "; result is " + resultCode);
-        }
-
-        switch (requestCode) {
-            case TAG_COMPOSER: {
-                finish();
-                break;
-            }
-        }
-    }
-
-}
-
diff --git a/src/com/android/mms/ContentClassException.java b/src/com/android/mms/ContentClassException.java
deleted file mode 100644
index c5ec5b6..0000000
--- a/src/com/android/mms/ContentClassException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms;
-
-import com.google.android.mms.MmsException;
-
-public final class ContentClassException extends MmsException {
-    private final boolean mIsRestricted;
-
-    public ContentClassException(boolean isRestricted) {
-        super();
-        mIsRestricted = isRestricted;
-    }
-
-    public ContentClassException(String msg, boolean isRestricted) {
-        super(msg);
-        mIsRestricted = isRestricted;
-    }
-
-    public ContentClassException(Exception cause, boolean isRestricted) {
-        super(cause);
-        mIsRestricted = isRestricted;
-    }
-
-    public boolean isRestricted() {
-        return mIsRestricted;
-    }
-}
diff --git a/src/com/android/mms/ContentRestrictionException.java b/src/com/android/mms/ContentRestrictionException.java
deleted file mode 100644
index 625e853..0000000
--- a/src/com/android/mms/ContentRestrictionException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms;
-
-/**
- * A generic exception that is thrown by checking content restriction.
- */
-public class ContentRestrictionException extends RuntimeException {
-    private static final long serialVersionUID = 516136015813043499L;
-
-    public ContentRestrictionException() {
-        super();
-    }
-
-    public ContentRestrictionException(String msg) {
-        super(msg);
-    }
-
-    public ContentRestrictionException(Exception cause) {
-        super(cause);
-    }
-}
diff --git a/src/com/android/mms/ExceedMessageSizeException.java b/src/com/android/mms/ExceedMessageSizeException.java
deleted file mode 100644
index 3e3cb25..0000000
--- a/src/com/android/mms/ExceedMessageSizeException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms;
-
-/**
- * An exception that is thrown when message size exceeds limitation.
- */
-public final class ExceedMessageSizeException extends ContentRestrictionException {
-    private static final long serialVersionUID = 6647713416796190850L;
-
-    public ExceedMessageSizeException() {
-        super();
-    }
-
-    public ExceedMessageSizeException(String msg) {
-        super(msg);
-    }
-
-    public ExceedMessageSizeException(Exception cause) {
-        super(cause);
-    }
-}
diff --git a/src/com/android/mms/MmsApp.java b/src/com/android/mms/MmsApp.java
deleted file mode 100644
index 9e721ff..0000000
--- a/src/com/android/mms/MmsApp.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms;
-
-import com.android.mms.drm.DrmUtils;
-import com.android.mms.layout.LayoutManager;
-import com.android.mms.util.ContactInfoCache;
-import com.android.mms.util.DownloadManager;
-import com.android.mms.util.SmileyParser;
-import com.android.mms.util.RateController;
-
-import android.app.Application;
-import android.content.res.Configuration;
-import android.preference.PreferenceManager;
-
-public class MmsApp extends Application {
-
-    @Override
-    public void onCreate() {
-        super.onCreate();
-
-        // Load the default preference values
-        PreferenceManager.setDefaultValues(this, R.xml.preferences, false);
-
-        ContactInfoCache.init(this);
-        DownloadManager.init(this);
-        RateController.init(this);
-        DrmUtils.cleanupStorage(this);
-        LayoutManager.init(this);
-        SmileyParser.init(this);
-    }
-
-    @Override
-    public void onTerminate() {
-        DrmUtils.cleanupStorage(this);
-    }
-
-    @Override
-    public void onConfigurationChanged(Configuration newConfig) {
-        LayoutManager.getInstance().onConfigurationChanged(newConfig);
-    }
-}
diff --git a/src/com/android/mms/MmsConfig.java b/src/com/android/mms/MmsConfig.java
deleted file mode 100644
index f2a28a9..0000000
--- a/src/com/android/mms/MmsConfig.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms;
-
-/**
- * Configuration values for MMS application.
- *
- */
-public class MmsConfig {
-    /**
-     * Defines how many slides could be added into a MM.
-     */
-    public static final int MAX_SLIDES_COUNT = 10;
-    /**
-     * The quality parameter which is used to compress JPEG images.
-     */
-    public static final int IMAGE_COMPRESSION_QUALITY = 80;
-}
diff --git a/src/com/android/mms/ResolutionException.java b/src/com/android/mms/ResolutionException.java
deleted file mode 100644
index 1fb7b9a..0000000
--- a/src/com/android/mms/ResolutionException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms;
-
-/**
- * An exception that is thrown when image resolution exceeds restriction.
- */
-public final class ResolutionException extends ContentRestrictionException {
-    private static final long serialVersionUID = 5509925632215500520L;
-
-    public ResolutionException() {
-        super();
-    }
-
-    public ResolutionException(String msg) {
-        super(msg);
-    }
-
-    public ResolutionException(Exception cause) {
-        super(cause);
-    }
-}
diff --git a/src/com/android/mms/UnsupportContentTypeException.java b/src/com/android/mms/UnsupportContentTypeException.java
deleted file mode 100644
index cebb2d6..0000000
--- a/src/com/android/mms/UnsupportContentTypeException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms;
-
-/**
- * An exception that is thrown when content type is not supported.
- */
-public final class UnsupportContentTypeException extends ContentRestrictionException {
-    private static final long serialVersionUID = 2684128059358484321L;
-
-    public UnsupportContentTypeException() {
-        super();
-    }
-
-    public UnsupportContentTypeException(String msg) {
-        super(msg);
-    }
-
-    public UnsupportContentTypeException(Exception cause) {
-        super(cause);
-    }
-}
diff --git a/src/com/android/mms/activity/VCalManager.java b/src/com/android/mms/activity/VCalManager.java
deleted file mode 100644
index 443018e..0000000
--- a/src/com/android/mms/activity/VCalManager.java
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.activity;
-
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.database.Cursor;
-import android.net.Uri;
-import android.provider.Calendar;
-import android.provider.Calendar.Calendars;
-import android.syncml.pim.PropertyNode;
-import android.syncml.pim.VDataBuilder;
-import android.syncml.pim.VNode;
-import android.syncml.pim.vcalendar.CalendarStruct;
-import android.syncml.pim.vcalendar.VCalComposer;
-import android.syncml.pim.vcalendar.VCalException;
-import android.syncml.pim.vcalendar.VCalParser;
-import android.text.format.Time;
-import android.util.Log;
-
-import java.util.HashMap;
-import java.util.Set;
-
-/**
- * Provides the methods to handle the content provider of calendars for MMS activity client.
- */
-public class VCalManager {
-    private static final String TAG = "VCalManager";
-    private static final String TIME_FORMAT_STRING = "%Y-%m-%d %H:%M:%S";
-
-    private ContentValues mVCalValues;
-    private final Context mContext;
-    private final ContentResolver mResolver;
-    private Uri mUri;
-    private HashMap<String, Long> mCalendars = null;
-
-    /**
-     * Constructor.
-     * @param context the context of the activity.
-     * @param data Calendar data.
-     * @throws IllegalArgumentException
-     */
-    public VCalManager(Context context, String data) throws IllegalArgumentException {
-        if (context == null) {
-            throw new IllegalArgumentException();
-        }
-
-        mContext = context;
-        mResolver = mContext.getContentResolver();
-        mVCalValues = parseVCalendar(data);
-    }
-
-    /**
-     * Constructor.
-     * @param context the context of the activity.
-     * @param uri the stored event URI.
-     */
-    public VCalManager(Context context, Uri uri) {
-        mContext = context;
-        mResolver = mContext.getContentResolver();
-        mUri = uri;
-    }
-
-    public String[] getCalendars() {
-        if (mCalendars == null) {
-            Cursor cursor = SqliteWrapper.query(mContext, mResolver, Calendars.CONTENT_URI,
-                                new String[] {Calendars._ID, Calendars.DISPLAY_NAME},
-                                null, null, null);
-
-            if (null == cursor) {
-                return null;
-            }
-
-            mCalendars = new HashMap<String, Long>();
-            try {
-                while (cursor.moveToNext()) {
-                    long id = cursor.getLong(cursor.getColumnIndexOrThrow(Calendars._ID));
-                    String name = cursor.getString(cursor.getColumnIndexOrThrow(Calendars.DISPLAY_NAME));
-                    mCalendars.put(name, id);
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-
-        Set<String> keySet = mCalendars.keySet();
-        int size = keySet.size();
-        if (size <= 0) {
-            return null;
-        }
-
-        String[] calendarArray = new String[size];
-        keySet.toArray(calendarArray);
-        return calendarArray;
-    }
-
-    /**
-     * Load the formatted data of the stored calendar event.
-     * @return the formatted data string.
-     */
-    public String getData() {
-        if (mUri == null) {
-            Log.e(TAG, "Bad content URI.");
-            return null;
-        }
-        Cursor c = SqliteWrapper.query(mContext, mResolver, mUri,
-                        null, null, null, null);
-
-        String uid = mUri.toString();
-        if (c == null) {
-            Log.e(TAG, "Cannot query the content from " + mUri);
-            return null;
-        }
-        try {
-            c.moveToFirst();
-            CalendarStruct calStruct = new CalendarStruct();
-
-            calStruct.timezone = c.getString(c.getColumnIndexOrThrow(Calendar.Events.EVENT_TIMEZONE));
-
-            //event list:
-            CalendarStruct.EventStruct evtStruct = new CalendarStruct.EventStruct();
-
-            evtStruct.uid = uid;
-            evtStruct.description = c.getString(c.getColumnIndexOrThrow(
-                    Calendar.Events.DESCRIPTION));
-            evtStruct.dtend = convertLongToRFC2445DateTime(c.getLong(c.getColumnIndexOrThrow(
-                    Calendar.Events.DTEND)));
-            evtStruct.dtstart = convertLongToRFC2445DateTime(c.getLong(c.getColumnIndexOrThrow(
-                    Calendar.Events.DTSTART)));
-            evtStruct.duration = c.getString(c.getColumnIndexOrThrow(
-                    Calendar.Events.DURATION));
-            evtStruct.event_location = c.getString(c.getColumnIndexOrThrow(
-                    Calendar.Events.EVENT_LOCATION));
-            evtStruct.has_alarm = c.getString(c.getColumnIndexOrThrow(
-                    Calendar.Events.HAS_ALARM));
-            evtStruct.last_date = convertLongToRFC2445DateTime(c.getLong(c.getColumnIndexOrThrow(
-                    Calendar.Events.LAST_DATE)));
-            evtStruct.rrule = c.getString(c.getColumnIndexOrThrow(
-                    Calendar.Events.RRULE));
-            evtStruct.status = c.getString(c.getColumnIndexOrThrow(
-                    Calendar.Events.STATUS));
-            evtStruct.title = c.getString(c.getColumnIndexOrThrow(
-                    Calendar.Events.TITLE));
-
-            if (!isNull(evtStruct.has_alarm)) {
-                getReminders(evtStruct, Uri.parse(uid).getLastPathSegment());
-            }
-
-            calStruct.addEventList(evtStruct);
-
-            try{    //build vcalendar:
-                VCalComposer composer = new VCalComposer();
-
-                return composer.createVCal(calStruct, VCalComposer.VERSION_VCAL10_INT);
-            } catch (Exception e) {
-                return null;
-            }
-        } finally {
-            c.close();
-        }
-    }
-
-    /**
-     * Get the name of the calendar event with ".vcs" suffix.
-     * @return the name of the calendar event.
-     */
-    public String getName() {
-        if (mUri == null) {
-            Log.e(TAG, "Bad content URI.");
-            return null;
-        }
-
-        Cursor c = SqliteWrapper.query(mContext, mResolver, mUri,
-                        null, null, null, null);
-        if (c == null) {
-            Log.e(TAG, "Cannot query the content from " + mUri);
-            return null;
-        }
-        try {
-            c.moveToFirst();
-            return c.getString(c.getColumnIndexOrThrow(Calendar.Events.TITLE)) + ".vcs";
-        } finally {
-            c.close();
-        }
-    }
-
-    /**
-     * Save the calendar data to local database.
-     *
-     * @param calendarName the calendar into which the vCal is saved.
-     *      By calling method getCalendars(), user can get all calendar
-     *      names as an string array.
-     * @return true if success, otherwise return false.
-     */
-    public Uri save(String calendarName) {
-        Long id = mCalendars.get(calendarName);
-        if (null == id) {
-            return null;
-        }
-
-        mVCalValues.put(Calendar.Events.CALENDAR_ID, id);
-        return SqliteWrapper.insert(mContext, mResolver,
-                    Calendar.Events.CONTENT_URI, mVCalValues);
-    }
-
-    /**
-     * Get the title of the calendar event.
-     * @return the title.
-     */
-    public String getTitle() {
-        return (String) mVCalValues.get(Calendar.Events.TITLE);
-    }
-
-    /**
-     * Get the event location of the calendar event.
-     * @return the event location.
-     */
-    public String getEventLocation() {
-        return (String) mVCalValues.get(Calendar.Events.EVENT_LOCATION);
-    }
-
-    /**
-     * Get the description of the calendar event.
-     * @return the description.
-     */
-    public String getDescription() {
-        return (String) mVCalValues.get(Calendar.Events.DESCRIPTION);
-    }
-
-    /**
-     * Get the start time of the calendar event.
-     * @return the start time formatted as "%Y-%m-%d %H:%M:%S".
-     */
-    public String getDateTimeStart() {
-        Long start = (Long) mVCalValues.get(Calendar.Events.DTSTART);
-        if (start == null) {
-            return null;
-        }
-        Time time = new Time();
-        time.set(start);
-        return time.format(TIME_FORMAT_STRING);
-    }
-
-    /**
-     * Get the end time of the calendar event.
-     * @return the end time formatted as "%Y-%m-%d %H:%M:%S".
-     */
-    public String getDateTimeEnd() {
-        Long end = (Long) mVCalValues.get(Calendar.Events.DTEND);
-        if (end == null) {
-            return null;
-        }
-        Time time = new Time();
-        time.set(end);
-        return time.format(TIME_FORMAT_STRING);
-    }
-
-    /**
-     * Get the duration of the calendar event.
-     * @return the duration which is NOT formatted as "%Y-%m-%d %H:%M:%S".
-     */
-    public String getDuration() {
-        return (String) mVCalValues.get(Calendar.Events.DURATION);
-    }
-
-    /**
-     * Get the rule of the calendar event.
-     * @return the rule.
-     */
-    public String getRepeatRule() {
-        return (String) mVCalValues.get(Calendar.Events.RRULE);
-    }
-
-    /**
-     * Get the completed time of the calendar event.
-     * @return the completed time formatted as "%Y-%m-%d %H:%M:%S".
-     */
-    public String getCompleted() {
-        Long complete = (Long) mVCalValues.get(Calendar.Events.LAST_DATE);
-        if (complete == null) {
-            return null;
-        }
-        Time time = new Time();
-        time.set(complete);
-        return time.format(TIME_FORMAT_STRING);
-    }
-
-    private ContentValues parseVCalendar(String data) {
-        VCalParser parser = new VCalParser();
-        VDataBuilder builder = new VDataBuilder();
-
-        if (null == data) {
-            return null;
-        }
-
-        try {
-            parser.parse(data, builder);
-        } catch (VCalException e) {
-            Log.e(TAG, "VCalException: ", e);
-            return null;
-        }
-
-        String curCalendarId = "";
-        for (VNode vnode : builder.vNodeList) {
-            // VCALENDAR field MUST present before VENENT and VTODO
-            if (vnode.VName.equalsIgnoreCase("VCALENDAR")) {
-                // If no Calendar, just set -1 as CalendarId, because user
-                // should view the content even if no calendar created.
-                curCalendarId = String.valueOf(getFirstIDFromCalendar());
-            } else if (vnode.VName.equalsIgnoreCase("VEVENT") ||
-                        vnode.VName.equalsIgnoreCase("VTODO")) {
-                return setEventMap(vnode, curCalendarId);
-            }
-        }
-
-        return null;
-    }
-
-    private static ContentValues setEventMap(VNode vnode, String calId) {
-        ContentValues values = new ContentValues();
-
-        values.put(Calendar.Events.CALENDAR_ID, calId);
-        for (PropertyNode prop : vnode.propList) {
-            if (prop.propValue != null) {
-                Time time = new Time();
-                if (prop.propName.equalsIgnoreCase("DESCRIPTION")) {
-                    values.put(Calendar.Events.DESCRIPTION, prop.propValue);
-                } else if (prop.propName.equalsIgnoreCase("DTEND")) {
-                    time.parse(prop.propValue);
-                    values.put(Calendar.Events.DTEND, time.toMillis(false /* use isDst */));
-                } else if (prop.propName.equalsIgnoreCase("DTSTART")) {
-                    time.parse(prop.propValue);
-                    values.put(Calendar.Events.DTSTART, time.toMillis(false /* use isDst */));
-                } else if (prop.propName.equalsIgnoreCase("SUMMARY")) {
-                    values.put(Calendar.Events.TITLE, prop.propValue);
-                } else if (prop.propName.equalsIgnoreCase("LOCATION")) {
-                    values.put(Calendar.Events.EVENT_LOCATION, prop.propValue);
-                } else if (prop.propName.equalsIgnoreCase("DUE")) {
-                    values.put(Calendar.Events.DURATION, prop.propValue);
-                } else if (prop.propName.equalsIgnoreCase("RRULE")) {
-                    values.put(Calendar.Events.RRULE, prop.propValue);
-                } else if (prop.propName.equalsIgnoreCase("COMPLETED")) {
-                    time.parse(prop.propValue);
-                    values.put(Calendar.Events.LAST_DATE, time.toMillis(false /* use isDst */));
-                }
-            }
-        }
-        return values;
-    }
-
-    private static boolean isNull(String str) {
-        if ((str == null) || str.trim().equals("")) {
-            return true;
-        }
-        return false;
-    }
-
-    private static String convertLongToRFC2445DateTime(long mills) {
-        Time time = new Time();
-
-        time.set(mills);
-        return time.format("%Y%m%dT%H%M%SZ");
-    }
-
-    private void getReminders(CalendarStruct.EventStruct evtStruct, String localid) {
-        Cursor c = SqliteWrapper.query(mContext, mResolver, Calendar.Reminders.CONTENT_URI,
-                        null, "event_id=" + localid, null, null);
-        String data = "";
-        while ((c != null) && c.moveToNext()) {
-            data = c.getString(c.getColumnIndexOrThrow(Calendar.Reminders.METHOD));
-            evtStruct.addReminderList(data);
-        }
-        if (c != null) {
-            c.close();
-        }
-    }
-
-    private int getFirstIDFromCalendar() {
-        Cursor c = SqliteWrapper.query(mContext, mResolver, Calendar.Calendars.CONTENT_URI,
-                        null, null, null, null);
-
-        if (c != null) {
-            while (c.moveToNext()) {
-                int id = c.getInt(c.getColumnIndexOrThrow("_id"));
-                c.close();
-                return id;
-            }
-            c.close();
-        }
-        return -1;
-    }
-}
diff --git a/src/com/android/mms/activity/VCardManager.java b/src/com/android/mms/activity/VCardManager.java
deleted file mode 100644
index fffed10..0000000
--- a/src/com/android/mms/activity/VCardManager.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-package com.android.mms.activity;
-
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.database.Cursor;
-import android.database.sqlite.SQLiteException;
-import android.net.Uri;
-import android.provider.Contacts;
-import android.syncml.pim.PropertyNode;
-import android.syncml.pim.VDataBuilder;
-import android.syncml.pim.VNode;
-import android.syncml.pim.vcard.ContactStruct;
-import android.syncml.pim.vcard.VCardComposer;
-import android.syncml.pim.vcard.VCardException;
-import android.syncml.pim.vcard.VCardParser;
-import android.util.Log;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-
-public class VCardManager {
-    static private final String TAG = "VCardManager";
-
-    private ArrayList<ContentValues> mContactMethodList;
-    private ArrayList<ContentValues> mPhoneList;
-    private ArrayList<ContentValues> mOrganizationList;
-    private ContentValues mPeople;
-
-    private final String mData;
-
-    private final ContentResolver mResolver;
-    private final Context mContext;
-
-    public VCardManager(Context context, String data) {
-        mContext = context;
-        mResolver = context.getContentResolver();
-        mData = data;
-        parse(mData);
-    }
-
-    public VCardManager(Context context, Uri uri) {
-        mContext = context;
-        mResolver = context.getContentResolver();
-        mData = loadData(uri);
-        parse(mData);
-    }
-
-    public String getData() {
-        return mData;
-    }
-
-    /**
-     * Get property value.
-     *
-     * @return the value
-     */
-    public String getName() {
-        return (String) mPeople.get(Contacts.People.NAME);
-    }
-
-    /**
-     * Save content to content provider.
-     */
-    public Uri save() {
-        try {
-            Uri uri = SqliteWrapper.insert(mContext, mResolver, Contacts.People.CONTENT_URI,
-                            mPeople);
-            ContentValues[] phoneArray = new ContentValues[mPhoneList.size()];
-            mResolver.bulkInsert(Uri.withAppendedPath(uri, "phones"), mPhoneList
-                    .toArray(phoneArray));
-            ContentValues[] organizationArray = new ContentValues[mOrganizationList.size()];
-            mResolver.bulkInsert(Uri.withAppendedPath(uri, "organizations"), mOrganizationList
-                    .toArray(organizationArray));
-            ContentValues[] contactMethodArray = new ContentValues[mContactMethodList.size()];
-            mResolver.bulkInsert(Uri.withAppendedPath(uri, "contact_methods"), mContactMethodList
-                    .toArray(contactMethodArray));
-            return uri;
-        } catch (SQLiteException e) {
-            SqliteWrapper.checkSQLiteException(mContext, e);
-        }
-        return null;
-    }
-
-    private void parse(String data) {
-        VCardParser mParser = new VCardParser();
-        VDataBuilder builder = new VDataBuilder();
-
-        mContactMethodList = new ArrayList<ContentValues>();
-        mPhoneList = new ArrayList<ContentValues>();
-        mOrganizationList = new ArrayList<ContentValues>();
-        mPeople = new ContentValues();
-
-        try {
-            mParser.parse(data, builder);
-        } catch (VCardException e) {
-            Log.e(TAG, e.getMessage(), e);
-        } catch (IOException e) {
-            Log.e(TAG, e.getMessage(), e);
-        }
-
-        for (VNode vnode : builder.vNodeList) {
-            setContactsValue(vnode);
-        }
-    }
-
-    private void setContactsValue(VNode vnode) {
-        String title = null;
-        String company = null;
-        int phoneContentType = -1;
-        ContentValues phoneContent = new ContentValues();
-        HashSet<String> typeList = new HashSet<String>();
-
-        for (PropertyNode prop : vnode.propList) {
-            if (prop.propName.equalsIgnoreCase("TITLE") && (prop.propValue != null)) {
-                title = prop.propValue;
-            }
-            if (prop.propName.equalsIgnoreCase("ORG") && (prop.propValue != null)) {
-                company = prop.propValue;
-            }
-
-            // People.
-            if (prop.propName.equalsIgnoreCase("N") && (prop.propValue != null)) {
-                mPeople.put(Contacts.People.NAME, prop.propValue);
-            }
-
-            // Phone
-            if (prop.propName.equalsIgnoreCase("TEL")
-                    && (prop.propValue != null)) {
-                phoneContent.clear();
-                typeList.clear();
-
-                for (String typeStr : prop.paraMap_TYPE) {
-                    typeList.add(typeStr.toUpperCase());
-                }
-                if (typeList.contains("FAX")) {
-                    phoneContentType = -1;
-                    if (typeList.contains("HOME")) {
-                        phoneContentType = Contacts.Phones.TYPE_FAX_HOME;
-                        typeList.remove("HOME");
-                    } else if (typeList.contains("WORK")) {
-                        phoneContentType = Contacts.Phones.TYPE_FAX_WORK;
-                        typeList.remove("WORK");
-                    }
-                    if (phoneContentType != -1) {
-                        phoneContent.put(Contacts.Phones.TYPE, phoneContentType);
-                        phoneContent.put(Contacts.Phones.NUMBER, prop.propValue);
-                        mPhoneList.add(phoneContent);
-                        phoneContent.clear();
-                        typeList.remove("FAX");
-                    }
-                }
-                for (String typeStr : typeList) {
-                    phoneContent.clear();
-                    // The following just to match the type that predefined in
-                    // contacts.db. If not match, we will save the phone number
-                    // with one type in phone column
-                    if (typeStr.equals("HOME")) {
-                        phoneContentType = Contacts.Phones.TYPE_HOME;
-                    } else if (typeStr.equals("WORK")) {
-                        phoneContentType = Contacts.Phones.TYPE_WORK;
-                    } else if (typeStr.equals("FAX")) {
-                        phoneContentType = Contacts.Phones.TYPE_FAX_WORK;
-                    } else if (typeStr.equals("PAGER")) {
-                        phoneContentType = Contacts.Phones.TYPE_PAGER;
-                    } else if (typeStr.equals("CELL")) {
-                        phoneContentType = Contacts.Phones.TYPE_MOBILE;
-                    } else if (typeStr.equals("X-OTHER")) {
-                        phoneContentType = Contacts.Phones.TYPE_OTHER;
-                    } else {
-                        phoneContentType = Contacts.Phones.TYPE_CUSTOM;
-                        phoneContent.put(Contacts.Phones.LABEL, typeStr);
-                    } // end if-else
-                    phoneContent.put(Contacts.Phones.TYPE, phoneContentType);
-                    phoneContent.put(Contacts.Phones.NUMBER, prop.propValue);
-                    mPhoneList.add(phoneContent);
-                } // end for
-            } // end if
-            //Contact method.
-            if (prop.propName.equalsIgnoreCase("EMAIL")
-                    && (prop.propValue != null)) {
-                ContentValues mapContactM = new ContentValues();
-                int iType;
-
-                for (String typeName : prop.paraMap_TYPE) {
-                    mapContactM.clear();
-                    mapContactM.put(Contacts.ContactMethods.DATA,
-                            prop.propValue.replaceAll(";", " ").trim());
-                    mapContactM.put(Contacts.ContactMethods.KIND,
-                            Contacts.KIND_EMAIL);
-                    iType = getEmailTypeByName(typeName);
-                    mapContactM.put(Contacts.ContactMethods.TYPE, iType);
-                    if (iType == Contacts.ContactMethods.TYPE_CUSTOM) {
-                        mapContactM.put(Contacts.ContactMethods.LABEL, typeName);
-                    }
-                    mContactMethodList.add(mapContactM);
-                }
-            }
-
-            if (prop.propName.equalsIgnoreCase("ADR") && (prop.propValue != null)) {
-                ContentValues mapContactM = new ContentValues();
-
-                mapContactM.put(Contacts.ContactMethods.DATA,
-                        prop.propValue.replaceAll(";", " ").trim());
-                mapContactM.put(Contacts.ContactMethods.KIND,
-                        Contacts.KIND_POSTAL);
-
-                String typeName = listToString(prop.paraMap_TYPE);
-                int addressType = getAddressTypeByName(typeName);
-                mapContactM.put(Contacts.ContactMethods.TYPE, addressType);
-                if (addressType == Contacts.ContactMethods.TYPE_CUSTOM) {
-                    mapContactM.put(Contacts.ContactMethods.LABEL, typeName);
-                }
-
-                mContactMethodList.add(mapContactM);
-            }
-        }
-
-        // Organization
-        if ((title != null) || (company != null)) {
-            ContentValues organization = new ContentValues();
-            organization.put(Contacts.Organizations.COMPANY, company);
-            organization.put(Contacts.Organizations.TITLE, title);
-            organization.put(Contacts.Organizations.TYPE,
-                    Contacts.Organizations.TYPE_WORK);
-            mOrganizationList.add(organization);
-        }
-    }
-
-    private int getEmailTypeByName(String typeName) {
-        if ((typeName.length() == 0) || typeName.equalsIgnoreCase("INTERNET")) {
-            return Contacts.ContactMethods.TYPE_HOME;
-        } else if (typeName.equalsIgnoreCase("HOME")) {
-            return Contacts.ContactMethods.TYPE_HOME;
-        } else if (typeName.equalsIgnoreCase("WORK")){
-            return Contacts.ContactMethods.TYPE_WORK;
-        } else if (typeName.equalsIgnoreCase("X-OTHER")){
-            return Contacts.ContactMethods.TYPE_OTHER;
-        } else {
-            return Contacts.ContactMethods.TYPE_CUSTOM;
-        }
-    }
-
-    private int getAddressTypeByName(String typeName) {
-        if (typeName.length() == 0) {
-            return Contacts.ContactMethods.TYPE_HOME;
-        } else if (typeName.equalsIgnoreCase("HOME")) {
-            return Contacts.ContactMethods.TYPE_HOME;
-        } else if (typeName.equalsIgnoreCase("WORK")){
-            return Contacts.ContactMethods.TYPE_WORK;
-        } else if (typeName.equalsIgnoreCase("X-OTHER")){
-            return Contacts.ContactMethods.TYPE_OTHER;
-        } else {
-            return Contacts.ContactMethods.TYPE_CUSTOM;
-        }
-    }
-
-
-    private String listToString(List<String> list) {
-        StringBuilder typeListB = new StringBuilder("");
-        for (String o : list) {
-            typeListB.append(o).append(";");
-        }
-
-        String typeList = typeListB.toString();
-        if (typeList.endsWith(";")) {
-            return typeList.substring(0, typeList.length() - 1);
-        } else {
-            return typeList;
-        }
-    }
-
-    private String loadData(Uri uri) {
-        Cursor contactC = SqliteWrapper.query(mContext, mResolver, uri,
-                                null, null, null, null);
-
-        ContactStruct contactStruct = new ContactStruct();
-
-        contactC.moveToFirst();
-
-        // Get people info.
-        contactStruct.name = contactC.getString(
-                contactC.getColumnIndexOrThrow(Contacts.People.NAME));
-        contactStruct.notes = contactC.getString(
-                contactC.getColumnIndexOrThrow(Contacts.People.NOTES));
-
-        // Get phone list.
-        String data, type, label, kind;
-
-        Cursor orgC = SqliteWrapper.query(mContext, mResolver,
-                            Uri.withAppendedPath(uri, "organizations"),
-                            null, "isprimary", null, null);
-
-        contactStruct.company = null;
-        contactStruct.title = null;
-        if (orgC != null) {
-            if (orgC.moveToNext()) {
-                contactStruct.company = contactC.getString(
-                        orgC.getColumnIndexOrThrow(Contacts.Organizations.COMPANY));
-                contactStruct.title = contactC.getString(
-                       orgC.getColumnIndexOrThrow(Contacts.Organizations.TITLE));
-            }
-            orgC.close();
-        }
-
-        Cursor phoneC = SqliteWrapper.query(mContext, mResolver,
-                            Uri.withAppendedPath(uri, "phones"),
-                            null, null, null, null);
-
-        if (phoneC != null) {
-            while (phoneC.moveToNext()) {
-                data = phoneC.getString(phoneC.getColumnIndexOrThrow(
-                        Contacts.Phones.NUMBER));
-                type = phoneC.getString(phoneC.getColumnIndexOrThrow(
-                        Contacts.Phones.TYPE));
-                label = phoneC.getString(phoneC.getColumnIndexOrThrow(
-                        Contacts.Phones.LABEL));
-                //contactStruct.addPhone(data, type, label);
-            }
-            phoneC.close();
-        }
-
-        // Get contact-method list.
-        Cursor contactMethodC = SqliteWrapper.query(mContext, mResolver,
-                                    Uri.withAppendedPath(uri, "contact_methods"),
-                                    null, null, null, null);
-
-        if (contactMethodC != null) {
-            while (contactMethodC.moveToNext()) {
-                kind = contactMethodC.getString(contactMethodC.getColumnIndexOrThrow(
-                        Contacts.ContactMethods.KIND));
-                data = contactMethodC.getString(contactMethodC.getColumnIndexOrThrow(
-                        Contacts.ContactMethods.DATA));
-                type = contactMethodC.getString(contactMethodC.getColumnIndexOrThrow(
-                        Contacts.ContactMethods.TYPE));
-                label = contactMethodC.getString(contactMethodC.getColumnIndexOrThrow(
-                        Contacts.ContactMethods.LABEL));
-                contactStruct.addContactmethod(kind, data, type, label);
-            }
-            contactMethodC.close();
-        }
-        // Generate vCard data.
-        try {
-            VCardComposer composer = new VCardComposer();
-            return composer.createVCard(contactStruct,
-                    VCardParser.VERSION_VCARD21_INT);
-        } catch (VCardException e) {
-            return null;
-        }
-    }
-}
diff --git a/src/com/android/mms/dom/AttrImpl.java b/src/com/android/mms/dom/AttrImpl.java
deleted file mode 100644
index b9cd714..0000000
--- a/src/com/android/mms/dom/AttrImpl.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-public class AttrImpl extends NodeImpl implements Attr {
-    private String mName;
-    private String mValue;
-	
-	/*
-     * Internal methods
-     */
-	
-	protected AttrImpl(DocumentImpl owner, String name) {
-		super(owner);
-		mName = name;
-	}
-	
-    /*
-     * Attr Interface Methods
-     */
-
-	public String getName() {
-		return mName;
-	}
-
-	public Element getOwnerElement() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	public boolean getSpecified() {
-		return mValue != null;
-	}
-
-	public String getValue() {
-		return mValue;
-	}
-
-	// Instead of setting a <code>Text></code> with the content of the
-	// String value as defined in the specs,  we directly set here the
-	// internal mValue member.
-	public void setValue(String value) throws DOMException {
-		mValue = value;
-	}
-	
-    /*
-     * Node Interface Methods
-     */
-
-	@Override
-	public String getNodeName() {
-		return mName;
-	}
-
-	@Override
-	public short getNodeType() {
-		return Node.ATTRIBUTE_NODE;
-	}
-	
-	@Override
-	public Node getParentNode() {
-		return null;
-	}
-	
-	@Override 
-	public Node getPreviousSibling() {
-		return null;
-	}
-	
-	@Override
-	public Node getNextSibling() {
-		return null;
-	}
-	
-	@Override
-	public void setNodeValue(String nodeValue) throws DOMException {
-        setValue(nodeValue);
-    }
-}
diff --git a/src/com/android/mms/dom/DocumentImpl.java b/src/com/android/mms/dom/DocumentImpl.java
deleted file mode 100644
index e9368b0..0000000
--- a/src/com/android/mms/dom/DocumentImpl.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.CDATASection;
-import org.w3c.dom.Comment;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentFragment;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.ProcessingInstruction;
-import org.w3c.dom.Text;
-
-public abstract class DocumentImpl extends NodeImpl implements Document {
-
-    /*
-     * Internal methods
-     */
-
-    public DocumentImpl() {
-        super(null);
-    }
-
-    /*
-     * Document Interface Methods
-     */
-
-    public Attr createAttribute(String name) throws DOMException {
-        return new AttrImpl(this, name);
-    }
-
-    public Attr createAttributeNS(String namespaceURI, String qualifiedName)
-            throws DOMException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public CDATASection createCDATASection(String data) throws DOMException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Comment createComment(String data) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public DocumentFragment createDocumentFragment() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public abstract Element createElement(String tagName) throws DOMException;
-
-    public Element createElementNS(String namespaceURI, String qualifiedName)
-            throws DOMException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public EntityReference createEntityReference(String name) throws DOMException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public ProcessingInstruction createProcessingInstruction(String target, String data)
-            throws DOMException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Text createTextNode(String data) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public DocumentType getDoctype() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public abstract Element getDocumentElement();
-
-    public Element getElementById(String elementId) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public NodeList getElementsByTagName(String tagname) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public DOMImplementation getImplementation() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Node importNode(Node importedNode, boolean deep) throws DOMException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    /*
-     * Node Interface methods
-     */
-
-    @Override
-    public short getNodeType() {
-        return Node.DOCUMENT_NODE;
-    }
-
-    @Override
-    public String getNodeName() {
-        // The value of nodeName is "#document" when Node is a Document
-        return "#document";
-    }
-}
diff --git a/src/com/android/mms/dom/ElementImpl.java b/src/com/android/mms/dom/ElementImpl.java
deleted file mode 100644
index 59706e3..0000000
--- a/src/com/android/mms/dom/ElementImpl.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.NodeList;
-
-public class ElementImpl extends NodeImpl implements Element {
-    private String mTagName;
-    private NamedNodeMap mAttributes = new NamedNodeMapImpl();
-
-    /*
-     * Internal methods
-     */
-
-    protected ElementImpl(DocumentImpl owner, String tagName) {
-        super(owner);
-        mTagName = tagName;
-    }
-
-    /*
-     *  Element Interface methods
-     */
-
-    public String getAttribute(String name) {
-        Attr attrNode = getAttributeNode(name);
-        String attrValue = "";
-        if (attrNode != null) {
-            attrValue = attrNode.getValue();
-        }
-        return attrValue;
-    }
-
-    public String getAttributeNS(String namespaceURI, String localName) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Attr getAttributeNode(String name) {
-        return (Attr)mAttributes.getNamedItem(name);
-    }
-
-    public Attr getAttributeNodeNS(String namespaceURI, String localName) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public NodeList getElementsByTagName(String name) {
-        return new NodeListImpl(this, name, true);
-    }
-
-    public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public String getTagName() {
-        return mTagName;
-    }
-
-    public boolean hasAttribute(String name) {
-        return (getAttributeNode(name) != null);
-    }
-
-    public boolean hasAttributeNS(String namespaceURI, String localName) {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    public void removeAttribute(String name) throws DOMException {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void removeAttributeNS(String namespaceURI, String localName)
-            throws DOMException {
-        // TODO Auto-generated method stub
-
-    }
-
-    public Attr removeAttributeNode(Attr oldAttr) throws DOMException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public void setAttribute(String name, String value) throws DOMException {
-        Attr attribute = getAttributeNode(name);
-        if (attribute == null) {
-            attribute = mOwnerDocument.createAttribute(name);
-        }
-        attribute.setNodeValue(value);
-        mAttributes.setNamedItem(attribute);
-    }
-
-    public void setAttributeNS(String namespaceURI, String qualifiedName,
-            String value) throws DOMException {
-        // TODO Auto-generated method stub
-
-    }
-
-    public Attr setAttributeNode(Attr newAttr) throws DOMException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Attr setAttributeNodeNS(Attr newAttr) throws DOMException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    /*
-     * Node Interface methods
-     */
-
-    @Override
-    public short getNodeType() {
-        return ELEMENT_NODE;
-    }
-
-    @Override
-    public String getNodeName() {
-        // The value of nodeName is tagName when Node is an Element
-        return mTagName;
-    }
-
-    @Override
-    public NamedNodeMap getAttributes() {
-        return mAttributes;
-    }
-
-    @Override
-    public boolean hasAttributes() {
-        return (mAttributes.getLength() > 0);
-    }
-}
diff --git a/src/com/android/mms/dom/NamedNodeMapImpl.java b/src/com/android/mms/dom/NamedNodeMapImpl.java
deleted file mode 100644
index 2fb0e24..0000000
--- a/src/com/android/mms/dom/NamedNodeMapImpl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom;
-
-import java.util.Vector;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-public class NamedNodeMapImpl implements NamedNodeMap {
-
-    private Vector<Node> mNodes = new Vector<Node>();
-
-    public int getLength() {
-        return mNodes.size();
-    }
-
-    public Node getNamedItem(String name) {
-        Node node = null;
-        for (int i = 0; i < mNodes.size(); i++) {
-            if (name.equals(mNodes.elementAt(i).getNodeName())) {
-                node = mNodes.elementAt(i);
-                break;
-            }
-        }
-        return node;
-    }
-
-    public Node getNamedItemNS(String namespaceURI, String localName) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Node item(int index) {
-        if (index < mNodes.size()) {
-            return mNodes.elementAt(index);
-        }
-        return null;
-    }
-
-    public Node removeNamedItem(String name) throws DOMException {
-        Node node = getNamedItem(name);
-        if (node == null) {
-            throw new DOMException(DOMException.NOT_FOUND_ERR, "Not found");
-        } else {
-            mNodes.remove(node);
-        }
-        return node;
-    }
-
-    public Node removeNamedItemNS(String namespaceURI, String localName)
-            throws DOMException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Node setNamedItem(Node arg) throws DOMException {
-        Node existing = getNamedItem(arg.getNodeName());
-        if (existing != null) {
-            mNodes.remove(existing);
-        }
-        mNodes.add(arg);
-        return existing;
-    }
-
-    public Node setNamedItemNS(Node arg) throws DOMException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-}
diff --git a/src/com/android/mms/dom/NodeImpl.java b/src/com/android/mms/dom/NodeImpl.java
deleted file mode 100644
index fac725e..0000000
--- a/src/com/android/mms/dom/NodeImpl.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom;
-
-import java.util.NoSuchElementException;
-import java.util.Vector;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.events.Event;
-import org.w3c.dom.events.EventException;
-import org.w3c.dom.events.EventListener;
-import org.w3c.dom.events.EventTarget;
-
-import com.android.mms.dom.events.EventTargetImpl;
-
-public abstract class NodeImpl implements Node, EventTarget {
-    private Node mParentNode;
-    private final Vector<Node> mChildNodes = new Vector<Node>();
-    DocumentImpl mOwnerDocument;
-    private final EventTarget mEventTarget = new EventTargetImpl(this);
-
-    /*
-     * Internal methods
-     */
-
-    protected NodeImpl(DocumentImpl owner) {
-        mOwnerDocument = owner;
-    }
-
-    /*
-     * Node Interface Methods
-     */
-
-    public Node appendChild(Node newChild) throws DOMException {
-        ((NodeImpl)newChild).setParentNode(this);
-        mChildNodes.remove(newChild);
-        mChildNodes.add(newChild);
-        return newChild;
-    }
-
-    public Node cloneNode(boolean deep) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public NamedNodeMap getAttributes() {
-        // Default. Override in Element.
-        return null;
-    }
-
-    public NodeList getChildNodes() {
-        return new NodeListImpl(this, null, false);
-    }
-
-    public Node getFirstChild() {
-        Node firstChild = null;
-        try {
-            firstChild = mChildNodes.firstElement();
-        }
-        catch (NoSuchElementException e) {
-            // Ignore and return null
-        }
-        return firstChild;
-    }
-
-    public Node getLastChild() {
-        Node lastChild = null;
-        try {
-            lastChild = mChildNodes.lastElement();
-        }
-        catch (NoSuchElementException e) {
-            // Ignore and return null
-        }
-        return lastChild;
-    }
-
-    public String getLocalName() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public String getNamespaceURI() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Node getNextSibling() {
-        if ((mParentNode != null) && (this != mParentNode.getLastChild())) {
-            Vector<Node> siblings = ((NodeImpl)mParentNode).mChildNodes;
-            int indexOfThis = siblings.indexOf(this);
-            return siblings.elementAt(indexOfThis + 1);
-        }
-        return null;
-    }
-
-    public abstract String getNodeName();
-
-    public abstract short getNodeType();
-
-    public String getNodeValue() throws DOMException {
-        // Default behaviour. Override if required.
-        return null;
-    }
-
-    public Document getOwnerDocument() {
-        return mOwnerDocument;
-    }
-
-    public Node getParentNode() {
-        return mParentNode;
-    }
-
-    public String getPrefix() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Node getPreviousSibling() {
-        if ((mParentNode != null) && (this != mParentNode.getFirstChild())) {
-            Vector<Node> siblings = ((NodeImpl)mParentNode).mChildNodes;
-            int indexOfThis = siblings.indexOf(this);
-            return siblings.elementAt(indexOfThis - 1);
-        }
-        return null;
-    }
-
-    public boolean hasAttributes() {
-        // Default. Override in Element.
-        return false;
-    }
-
-    public boolean hasChildNodes() {
-        return !(mChildNodes.isEmpty());
-    }
-
-    public Node insertBefore(Node newChild, Node refChild) throws DOMException {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public boolean isSupported(String feature, String version) {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    public void normalize() {
-        // TODO Auto-generated method stub
-    }
-
-    public Node removeChild(Node oldChild) throws DOMException {
-        if (mChildNodes.contains(oldChild)) {
-            mChildNodes.remove(oldChild);
-            ((NodeImpl)oldChild).setParentNode(null);
-        } else {
-            throw new DOMException(DOMException.NOT_FOUND_ERR, "Child does not exist");
-        }
-        return null;
-    }
-
-    public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
-        if (mChildNodes.contains(oldChild)) {
-            // Try to remove the new child if available
-            try {
-                mChildNodes.remove(newChild);
-            } catch (DOMException e) {
-                // Ignore exception
-            }
-            mChildNodes.setElementAt(newChild, mChildNodes.indexOf(oldChild));
-            ((NodeImpl)newChild).setParentNode(this);
-            ((NodeImpl)oldChild).setParentNode(null);
-        } else {
-            throw new DOMException(DOMException.NOT_FOUND_ERR, "Old child does not exist");
-        }
-        return oldChild;
-    }
-
-    public void setNodeValue(String nodeValue) throws DOMException {
-        // Default behaviour. Override if required.
-    }
-
-    public void setPrefix(String prefix) throws DOMException {
-        // TODO Auto-generated method stub
-    }
-
-    private void setParentNode(Node parentNode) {
-        mParentNode = parentNode;
-    }
-
-    /*
-     * EventTarget Interface
-     */
-
-    public void addEventListener(String type, EventListener listener, boolean useCapture) {
-        mEventTarget.addEventListener(type, listener, useCapture);
-    }
-
-    public void removeEventListener(String type, EventListener listener, boolean useCapture) {
-        mEventTarget.removeEventListener(type, listener, useCapture);
-    }
-
-    public boolean dispatchEvent(Event evt) throws EventException {
-        return mEventTarget.dispatchEvent(evt);
-    }
-}
diff --git a/src/com/android/mms/dom/NodeListImpl.java b/src/com/android/mms/dom/NodeListImpl.java
deleted file mode 100644
index 4df651a..0000000
--- a/src/com/android/mms/dom/NodeListImpl.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom;
-
-import java.util.ArrayList;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-public class NodeListImpl implements NodeList {
-    private ArrayList<Node> mSearchNodes;
-    private ArrayList<Node> mStaticNodes;
-    private Node mRootNode;
-    private String mTagName;
-    private boolean mDeepSearch;
-
-    /*
-     * Internal Interface
-     */
-
-    /**
-     * Constructs a NodeList by searching for all descendants or the direct
-     * children of a root node with a given tag name.
-     * @param rootNode The root <code>Node</code> of the search.
-     * @param tagName The tag name to be searched for. If null, all descendants
-     *              will be returned.
-     * @param deep Limit the search to the direct children of rootNode if false,
-     *              to all descendants otherwise.
-     */
-    public NodeListImpl(Node rootNode, String tagName, boolean deepSearch) {
-        mRootNode = rootNode;
-        mTagName  = tagName;
-        mDeepSearch = deepSearch;
-    }
-
-    /**
-     * Constructs a NodeList for a given static node list.
-     * @param nodes The static node list.
-     */
-    public NodeListImpl(ArrayList<Node> nodes) {
-        mStaticNodes = nodes;
-    }
-
-    /*
-     * NodeListImpl Interface
-     */
-
-    public int getLength() {
-        if (mStaticNodes == null) {
-            fillList(mRootNode);
-            return mSearchNodes.size();
-        } else {
-            return mStaticNodes.size();
-        }
-    }
-
-    public Node item(int index) {
-        Node node = null;
-        if (mStaticNodes == null) {
-            fillList(mRootNode);
-            try {
-                node = mSearchNodes.get(index);
-            } catch (IndexOutOfBoundsException e) {
-                // Do nothing and return null
-            }
-        } else {
-            try {
-                node = mStaticNodes.get(index);
-            } catch (IndexOutOfBoundsException e) {
-                // Do nothing and return null
-            }
-        }
-        return node;
-    }
-
-    /**
-     * A preorder traversal is done in the following order:
-     * <ul>
-     *   <li> Visit root.
-     *   <li> Traverse children from left to right in preorder.
-     * </ul>
-     * This method fills the live node list.
-     * @param The root of preorder traversal
-     * @return The next match
-     */
-    private void fillList(Node node) {
-        // (Re)-initialize the container if this is the start of the search.
-        // Visit the root of this iteration otherwise.
-        if (node == mRootNode) {
-            mSearchNodes = new ArrayList<Node>();
-        } else {
-            if ((mTagName == null) || node.getNodeName().equals(mTagName)) {
-                mSearchNodes.add(node);
-            }
-        }
-
-        // Descend one generation...
-        node = node.getFirstChild();
-
-        // ...and visit in preorder the children if we are in deep search
-        // or directly add the children to the list otherwise.
-        while (node != null) {
-            if (mDeepSearch) {
-                fillList(node);
-            } else {
-                if ((mTagName == null) || node.getNodeName().equals(mTagName)) {
-                    mSearchNodes.add(node);
-                }
-            }
-            node = node.getNextSibling();
-        }
-    }
-}
diff --git a/src/com/android/mms/dom/events/EventImpl.java b/src/com/android/mms/dom/events/EventImpl.java
deleted file mode 100644
index 24fc908..0000000
--- a/src/com/android/mms/dom/events/EventImpl.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.events;
-
-import org.w3c.dom.events.Event;
-import org.w3c.dom.events.EventTarget;
-
-public class EventImpl implements Event {
-
-    // Event type informations
-    private String mEventType;
-    private boolean mCanBubble;
-    private boolean mCancelable;
-
-    // Flags whether the event type information was set
-    // FIXME: Can we use mEventType for this purpose?
-    private boolean mInitialized;
-
-    // Target of this event
-    private EventTarget mTarget;
-
-    // Event status variables
-    private short mEventPhase;
-    private boolean mStopPropagation;
-    private boolean mPreventDefault;
-    private EventTarget mCurrentTarget;
-    private int mSeekTo;
-
-    private final long mTimeStamp = System.currentTimeMillis();
-
-    public boolean getBubbles() {
-        return mCanBubble;
-    }
-
-    public boolean getCancelable() {
-        return mCancelable;
-    }
-
-    public EventTarget getCurrentTarget() {
-        return mCurrentTarget;
-    }
-
-    public short getEventPhase() {
-        return mEventPhase;
-    }
-
-    public EventTarget getTarget() {
-        return mTarget;
-    }
-
-    public long getTimeStamp() {
-        return mTimeStamp;
-    }
-
-    public String getType() {
-        return mEventType;
-    }
-
-    public void initEvent(String eventTypeArg, boolean canBubbleArg,
-            boolean cancelableArg) {
-        mEventType = eventTypeArg;
-        mCanBubble = canBubbleArg;
-        mCancelable = cancelableArg;
-        mInitialized = true;
-    }
-
-    public void initEvent(String eventTypeArg, boolean canBubbleArg, boolean cancelableArg,
-            int seekTo) {
-        mSeekTo = seekTo;
-        initEvent(eventTypeArg, canBubbleArg, cancelableArg);
-    }
-
-    public void preventDefault() {
-        mPreventDefault = true;
-    }
-
-    public void stopPropagation() {
-        mStopPropagation = true;
-    }
-
-    /*
-     * Internal Interface
-     */
-
-    boolean isInitialized() {
-        return mInitialized;
-    }
-
-    boolean isPreventDefault() {
-        return mPreventDefault;
-    }
-
-    boolean isPropogationStopped() {
-        return mStopPropagation;
-    }
-
-    void setTarget(EventTarget target) {
-        mTarget = target;
-    }
-
-    void setEventPhase(short eventPhase) {
-        mEventPhase = eventPhase;
-    }
-
-    void setCurrentTarget(EventTarget currentTarget) {
-        mCurrentTarget = currentTarget;
-    }
-
-    public int getSeekTo() {
-        return mSeekTo;
-    }
-}
diff --git a/src/com/android/mms/dom/events/EventTargetImpl.java b/src/com/android/mms/dom/events/EventTargetImpl.java
deleted file mode 100644
index b254e6c..0000000
--- a/src/com/android/mms/dom/events/EventTargetImpl.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.events;
-
-import java.util.ArrayList;
-
-import org.w3c.dom.events.Event;
-import org.w3c.dom.events.EventException;
-import org.w3c.dom.events.EventListener;
-import org.w3c.dom.events.EventTarget;
-
-import android.util.Log;
-
-public class EventTargetImpl implements EventTarget {
-    private static final String TAG = "EventTargetImpl";
-    private ArrayList<EventListenerEntry> mListenerEntries;
-    private EventTarget mNodeTarget;
-
-    static class EventListenerEntry
-    {
-        final String mType;
-        final EventListener mListener;
-        final boolean mUseCapture;
-
-        EventListenerEntry(String type, EventListener listener, boolean useCapture)
-        {
-            mType = type;
-            mListener = listener;
-            mUseCapture = useCapture;
-        }
-    }
-
-    public EventTargetImpl(EventTarget target) {
-        mNodeTarget = target;
-    }
-
-    public void addEventListener(String type, EventListener listener, boolean useCapture) {
-        if ((type == null) || type.equals("") || (listener == null)) {
-            return;
-        }
-
-        // Make sure we have only one entry
-        removeEventListener(type, listener, useCapture);
-
-        if (mListenerEntries == null) {
-            mListenerEntries = new ArrayList<EventListenerEntry>();
-        }
-        mListenerEntries.add(new EventListenerEntry(type, listener, useCapture));
-    }
-
-    public boolean dispatchEvent(Event evt) throws EventException {
-        // We need to use the internal APIs to modify and access the event status
-        EventImpl eventImpl = (EventImpl)evt;
-
-        if (!eventImpl.isInitialized()) {
-            throw new EventException(EventException.UNSPECIFIED_EVENT_TYPE_ERR,
-                    "Event not initialized");
-        } else if ((eventImpl.getType() == null) || eventImpl.getType().equals("")) {
-            throw new EventException(EventException.UNSPECIFIED_EVENT_TYPE_ERR,
-                    "Unspecified even type");
-        }
-
-        // Initialize event status
-        eventImpl.setTarget(mNodeTarget);
-
-        // TODO: At this point, to support event capturing and bubbling, we should
-        // establish the chain of EventTargets from the top of the tree to this
-        // event's target.
-
-        // TODO: CAPTURING_PHASE skipped
-
-        // Handle AT_TARGET
-        // Invoke handleEvent of non-capturing listeners on this EventTarget.
-        eventImpl.setEventPhase(Event.AT_TARGET);
-        eventImpl.setCurrentTarget(mNodeTarget);
-        if (!eventImpl.isPropogationStopped() && (mListenerEntries != null)) {
-            for (int i = 0; i < mListenerEntries.size(); i++) {
-                EventListenerEntry listenerEntry = mListenerEntries.get(i);
-                if (!listenerEntry.mUseCapture
-                        && listenerEntry.mType.equals(eventImpl.getType())) {
-                    try {
-                        listenerEntry.mListener.handleEvent(eventImpl);
-                    }
-                    catch (Exception e) {
-                        // Any exceptions thrown inside an EventListener will
-                        // not stop propagation of the event
-                        Log.w(TAG, "Catched EventListener exception", e);
-                    }
-                }
-            }
-        }
-
-        if (eventImpl.getBubbles()) {
-            // TODO: BUBBLING_PHASE skipped
-        }
-
-        return eventImpl.isPreventDefault();
-    }
-
-    public void removeEventListener(String type, EventListener listener,
-            boolean useCapture) {
-        if (null == mListenerEntries) {
-            return;
-        }
-        for (int i = 0; i < mListenerEntries.size(); i ++) {
-            EventListenerEntry listenerEntry = mListenerEntries.get(i);
-            if ((listenerEntry.mUseCapture == useCapture)
-                    && (listenerEntry.mListener == listener)
-                    && listenerEntry.mType.equals(type)) {
-                mListenerEntries.remove(i);
-                break;
-            }
-        }
-    }
-
-}
diff --git a/src/com/android/mms/dom/smil/ElementParallelTimeContainerImpl.java b/src/com/android/mms/dom/smil/ElementParallelTimeContainerImpl.java
deleted file mode 100644
index bb61704..0000000
--- a/src/com/android/mms/dom/smil/ElementParallelTimeContainerImpl.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.dom.smil;
-
-import java.util.ArrayList;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.smil.ElementParallelTimeContainer;
-import org.w3c.dom.smil.ElementTime;
-import org.w3c.dom.smil.SMILElement;
-import org.w3c.dom.smil.Time;
-import org.w3c.dom.smil.TimeList;
-
-import com.android.mms.dom.NodeListImpl;
-
-public abstract class ElementParallelTimeContainerImpl extends ElementTimeContainerImpl
-        implements ElementParallelTimeContainer {
-    private final static String ENDSYNC_ATTRIBUTE_NAME = "endsync";
-    private final static String ENDSYNC_FIRST = "first";
-    private final static String ENDSYNC_LAST  = "last";
-    private final static String ENDSYNC_ALL   = "all";
-    private final static String ENDSYNC_MEDIA = "media";
-
-    /*
-     * Internal Interface
-     */
-
-    ElementParallelTimeContainerImpl(SMILElement element) {
-        super(element);
-    }
-
-    public String getEndSync() {
-        String endsync = mSmilElement.getAttribute(ENDSYNC_ATTRIBUTE_NAME);
-        if ((endsync == null) || (endsync.length() == 0)) {
-            setEndSync(ENDSYNC_LAST);
-            return ENDSYNC_LAST;
-        }
-        if (ENDSYNC_FIRST.equals(endsync) || ENDSYNC_LAST.equals(endsync) ||
-                ENDSYNC_ALL.equals(endsync) || ENDSYNC_MEDIA.equals(endsync)) {
-            return endsync;
-        }
-
-        // FIXME add the checking for ID-Value and smil1.0-Id-value.
-
-        setEndSync(ENDSYNC_LAST);
-        return ENDSYNC_LAST;
-    }
-
-    public void setEndSync(String endSync) throws DOMException {
-        if (ENDSYNC_FIRST.equals(endSync) || ENDSYNC_LAST.equals(endSync) ||
-                ENDSYNC_ALL.equals(endSync) || ENDSYNC_MEDIA.equals(endSync)) {
-            mSmilElement.setAttribute(ENDSYNC_ATTRIBUTE_NAME, endSync);
-        } else { // FIXME add the support for ID-Value and smil1.0-Id-value.
-            throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
-                    "Unsupported endsync value" + endSync);
-        }
-    }
-
-    @Override
-    public float getDur() {
-        float dur = super.getDur();
-        if (dur == 0) {
-            dur = getImplicitDuration();
-        }
-        return dur;
-    }
-
-    public float getImplicitDuration() {
-        float dur = -1.0F;
-        if (ENDSYNC_LAST.equals(getEndSync())) {
-            NodeList children = getTimeChildren();
-            for (int i = 0; i < children.getLength(); ++i) {
-                ElementTime child = (ElementTime) children.item(i);
-                TimeList endTimeList = child.getEnd();
-                for (int j = 0; j < endTimeList.getLength(); ++j) {
-                    Time endTime = endTimeList.item(j);
-                    if (endTime.getTimeType() == Time.SMIL_TIME_INDEFINITE) {
-                        // Return "indefinite" here.
-                        return -1.0F;
-                    }
-                    if (endTime.getResolved()) {
-                        float end = (float)endTime.getResolvedOffset();
-                        dur = (end > dur) ? end : dur;
-                    }
-                }
-            }
-        } // Other endsync types are not supported now.
-
-        return dur;
-    }
-
-    public NodeList getActiveChildrenAt(float instant) {
-        /*
-         * Find the closest Time of ElementTime before instant.
-         * Add ElementTime to list of active elements if the Time belongs to the begin-list,
-         * do not add it otherwise.
-         */
-        ArrayList<Node> activeChildren = new ArrayList<Node>();
-        NodeList children = getTimeChildren();
-        int childrenLen = children.getLength();
-        for (int i = 0; i < childrenLen; ++i) {
-            double maxOffset = 0.0;
-            boolean active = false;
-            ElementTime child = (ElementTime) children.item(i);
-
-            TimeList beginList = child.getBegin();
-            int len = beginList.getLength();
-            for (int j = 0; j < len; ++j) {
-                Time begin = beginList.item(j);
-                if (begin.getResolved()) {
-                    double resolvedOffset = begin.getResolvedOffset() * 1000.0;
-                    if ((resolvedOffset <= instant) && (resolvedOffset >= maxOffset)) {
-                        maxOffset = resolvedOffset;
-                        active = true;
-                    }
-                }
-            }
-
-            TimeList endList = child.getEnd();
-            len = endList.getLength();
-            for (int j = 0; j < len; ++j) {
-                Time end = endList.item(j);
-                if (end.getResolved()) {
-                    double resolvedOffset = end.getResolvedOffset() * 1000.0;
-                    if ((resolvedOffset <= instant) && (resolvedOffset >= maxOffset)) {
-                        maxOffset = resolvedOffset;
-                        active = false;
-                    }
-                }
-            }
-
-            if (active) {
-                activeChildren.add((Node) child);
-            }
-        }
-        return new NodeListImpl(activeChildren);
-    }
-}
diff --git a/src/com/android/mms/dom/smil/ElementSequentialTimeContainerImpl.java b/src/com/android/mms/dom/smil/ElementSequentialTimeContainerImpl.java
deleted file mode 100644
index 34ae719..0000000
--- a/src/com/android/mms/dom/smil/ElementSequentialTimeContainerImpl.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.smil;
-
-import java.util.ArrayList;
-
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.smil.ElementSequentialTimeContainer;
-import org.w3c.dom.smil.ElementTime;
-import org.w3c.dom.smil.SMILElement;
-
-import com.android.mms.dom.NodeListImpl;
-
-public abstract class ElementSequentialTimeContainerImpl extends
-        ElementTimeContainerImpl implements ElementSequentialTimeContainer {
-
-    /*
-     * Internal Interface
-     */
-
-    ElementSequentialTimeContainerImpl(SMILElement element) {
-        super(element);
-    }
-
-    /*
-     * ElementSequentialTimeContainer Interface
-     */
-
-    public NodeList getActiveChildrenAt(float instant) {
-        NodeList allChildren = this.getTimeChildren();
-        ArrayList<Node> nodes = new ArrayList<Node>();
-        for (int i = 0; i < allChildren.getLength(); i++) {
-            instant -= ((ElementTime) allChildren.item(i)).getDur();
-            if (instant < 0) {
-                nodes.add(allChildren.item(i));
-                return new NodeListImpl(nodes);
-            }
-        }
-        return new NodeListImpl(nodes);
-    }
-
-    public float getDur() {
-        float dur = super.getDur();
-        if (dur == 0) {
-            NodeList children = getTimeChildren();
-            for (int i = 0; i < children.getLength(); ++i) {
-                ElementTime child = (ElementTime) children.item(i);
-                if (child.getDur() < 0) {
-                    // Return "indefinite" since containing a child whose duration is indefinite.
-                    return -1.0F;
-                }
-                dur += child.getDur();
-            }
-        }
-        return dur;
-    }
-}
diff --git a/src/com/android/mms/dom/smil/ElementTimeContainerImpl.java b/src/com/android/mms/dom/smil/ElementTimeContainerImpl.java
deleted file mode 100644
index eca14cf..0000000
--- a/src/com/android/mms/dom/smil/ElementTimeContainerImpl.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.smil;
-
-import org.w3c.dom.smil.ElementTimeContainer;
-import org.w3c.dom.smil.SMILElement;
-
-public abstract class ElementTimeContainerImpl extends ElementTimeImpl implements
-        ElementTimeContainer {
-
-    /*
-     * Internal Interface
-     */
-
-    ElementTimeContainerImpl(SMILElement element) {
-        super(element);
-    }
-}
diff --git a/src/com/android/mms/dom/smil/ElementTimeImpl.java b/src/com/android/mms/dom/smil/ElementTimeImpl.java
deleted file mode 100644
index 70c38c5..0000000
--- a/src/com/android/mms/dom/smil/ElementTimeImpl.java
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.dom.smil;
-
-import java.util.ArrayList;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.smil.ElementTime;
-import org.w3c.dom.smil.SMILElement;
-import org.w3c.dom.smil.Time;
-import org.w3c.dom.smil.TimeList;
-
-import android.util.Log;
-
-public abstract class ElementTimeImpl implements ElementTime {
-    private static final String TAG = "ElementTimeImpl";
-
-    private static final String FILL_REMOVE_ATTRIBUTE = "remove";
-    private static final String FILL_FREEZE_ATTRIBUTE = "freeze";
-    private static final String FILL_HOLD_ATTRIBUTE = "hold";
-    private static final String FILL_TRANSITION_ATTRIBUTE = "transition";
-    private static final String FILL_AUTO_ATTRIBUTE   = "auto";
-    private static final String FILL_ATTRIBUTE_NAME   = "fill";
-    private static final String FILLDEFAULT_ATTRIBUTE_NAME   = "fillDefault";
-
-    final SMILElement mSmilElement;
-
-    /*
-     * Internal Interface
-     */
-    ElementTimeImpl(SMILElement element) {
-        mSmilElement = element;
-    }
-
-    // Default implementation. Override if required.
-    int getBeginConstraints() {
-        return TimeImpl.ALLOW_ALL;
-    }
-
-    // Default implementation. Override if required
-    int getEndConstraints() {
-        return TimeImpl.ALLOW_ALL;
-    }
-
-    /**
-     * To get the parent node on the ElementTime tree. It is in opposition to getTimeChildren.
-     * @return the parent ElementTime. Returns <code>null</code> if there is no parent.
-     */
-    abstract ElementTime getParentElementTime();
-
-    /*
-     * ElementTime Interface
-     */
-
-    public TimeList getBegin() {
-        String[] beginTimeStringList = mSmilElement.getAttribute("begin").split(";");
-
-        // TODO: Check other constraints on parsed values, e.g., "single, non-negative offset values
-        ArrayList<Time> beginTimeList = new ArrayList<Time>();
-        // Initialize Time instances and add them to Vector
-        for (int i = 0; i < beginTimeStringList.length; i++) {
-            try {
-                beginTimeList.add(new TimeImpl(beginTimeStringList[i], getBeginConstraints()));
-            } catch (IllegalArgumentException e) {
-                // Ignore badly formatted times
-            }
-        }
-        if (beginTimeList.size() == 0) {
-            /*
-             * What is the right default value?
-             *
-             * In MMS SMIL, this method may be called either on an instance of:
-             *
-             * 1 - ElementSequentialTimeContainer (The SMILDocument)
-             * 2 - ElementParallelTimeContainer (A Time-Child of the SMILDocument, which is a seq)
-             * 3 - ElementTime (A SMILMediaElement).
-             *
-             * 1 - In the first case, the default start time is obviously 0.
-             * 2 - In the second case, the specifications mentions that
-             *      "For children of a sequence, the only legal value for begin is
-             *      a (single) non-negative offset value. The default begin value is 0."
-             * 3 - In the third case, the specification mentions that
-             *      "The default value of begin for children of a par is 0."
-             *
-             * In short, if no value is specified, the default is always 0.
-             */
-
-            beginTimeList.add(new TimeImpl("0", TimeImpl.ALLOW_ALL));
-        }
-        return new TimeListImpl(beginTimeList);
-    }
-
-    public float getDur() {
-        float dur = 0;
-        try {
-            String durString = mSmilElement.getAttribute("dur");
-            if (durString != null) {
-                dur = TimeImpl.parseClockValue(durString) / 1000f;
-            }
-        } catch (IllegalArgumentException e) {
-            // Do nothing and return 0
-        }
-        return dur;
-    }
-
-    public TimeList getEnd() {
-        ArrayList<Time> endTimeList = new ArrayList<Time>();
-
-        String[] endTimeStringList = mSmilElement.getAttribute("end").split(";");
-        int len = endTimeStringList.length;
-        if (!((len == 1) && (endTimeStringList[0].length() == 0))) {  // Ensure the end field is set.
-            // Initialize Time instances and add them to Vector
-            for (int i = 0; i < len; i++) {
-                try {
-                    endTimeList.add(new TimeImpl(endTimeStringList[i],
-                            getEndConstraints()));
-                } catch (IllegalArgumentException e) {
-                    // Ignore badly formatted times
-                    Log.e(TAG, "Malformed time value.", e);
-                }
-            }
-        }
-
-        // "end" time is not specified
-        if (endTimeList.size() == 0) {
-            // Get duration
-            float duration = getDur();
-
-            if (duration < 0) {
-                endTimeList.add(new TimeImpl("indefinite", getEndConstraints()));
-            } else {
-                // Get begin
-                TimeList begin = getBegin();
-                for (int i = 0; i < begin.getLength(); i++) {
-                    endTimeList.add(new TimeImpl(
-                            // end = begin + dur
-                            begin.item(i).getResolvedOffset() + duration + "s",
-                            getEndConstraints()));
-                }
-            }
-        }
-
-        return new TimeListImpl(endTimeList);
-    }
-
-    public short getFill() {
-        String fill = mSmilElement.getAttribute(FILL_ATTRIBUTE_NAME);
-        if (fill.equalsIgnoreCase(FILL_FREEZE_ATTRIBUTE)) {
-            return FILL_FREEZE;
-        } else if (fill.equalsIgnoreCase(FILL_REMOVE_ATTRIBUTE)) {
-            return FILL_REMOVE;
-        } else if (fill.equalsIgnoreCase(FILL_HOLD_ATTRIBUTE)) {
-            // FIXME handle it as freeze for now
-            return FILL_FREEZE;
-        } else if (fill.equalsIgnoreCase(FILL_TRANSITION_ATTRIBUTE)) {
-            // FIXME handle it as freeze for now
-            return FILL_FREEZE;
-        } else if (!fill.equalsIgnoreCase(FILL_AUTO_ATTRIBUTE)) {
-            /*
-             * fill = default
-             * The fill behavior for the element is determined by the value of the fillDefault
-             * attribute.  This is the default value.
-             */
-            short fillDefault = getFillDefault();
-            if (fillDefault != FILL_AUTO) {
-                return fillDefault;
-            }
-        }
-
-        /*
-         * fill = auto
-         * The fill behavior for this element depends on whether the element specifies any of
-         * the attributes that define the simple or active duration:
-         *  - If none of the attributes dur, end, repeatCount or repeatDur are specified on
-         *    the element, then the element will have a fill behavior identical to that if it were
-         *    specified as "freeze".
-         *  - Otherwise, the element will have a fill behavior identical to that if it were
-         *    specified as "remove".
-         */
-        if ((mSmilElement.getAttribute("dur").length() == 0) &&
-                (mSmilElement.getAttribute("end").length() == 0) &&
-                (mSmilElement.getAttribute("repeatCount").length() == 0) &&
-                (mSmilElement.getAttribute("repeatDur").length() == 0)) {
-            return FILL_FREEZE;
-        } else {
-            return FILL_REMOVE;
-        }
-    }
-
-    public short getFillDefault() {
-        String fillDefault = mSmilElement.getAttribute(FILLDEFAULT_ATTRIBUTE_NAME);
-        if (fillDefault.equalsIgnoreCase(FILL_REMOVE_ATTRIBUTE)) {
-            return FILL_REMOVE;
-        } else if (fillDefault.equalsIgnoreCase(FILL_FREEZE_ATTRIBUTE)) {
-            return FILL_FREEZE;
-        } else if (fillDefault.equalsIgnoreCase(FILL_AUTO_ATTRIBUTE)) {
-            return FILL_AUTO;
-        } else if (fillDefault.equalsIgnoreCase(FILL_HOLD_ATTRIBUTE)) {
-            // FIXME handle it as freeze for now
-            return FILL_FREEZE;
-        } else if (fillDefault.equalsIgnoreCase(FILL_TRANSITION_ATTRIBUTE)) {
-            // FIXME handle it as freeze for now
-            return FILL_FREEZE;
-        } else {
-            /*
-             * fillDefault = inherit
-             * Specifies that the value of this attribute (and of the fill behavior) are
-             * inherited from the fillDefault value of the parent element.
-             * This is the default value.
-             */
-            ElementTime parent = getParentElementTime();
-            if (parent == null) {
-                /*
-                 * fillDefault = auto
-                 * If there is no parent element, the value is "auto".
-                 */
-                return FILL_AUTO;
-            } else {
-                return ((ElementTimeImpl) parent).getFillDefault();
-            }
-        }
-    }
-
-    public float getRepeatCount() {
-        String repeatCount = mSmilElement.getAttribute("repeatCount");
-        try {
-            float value = Float.parseFloat(repeatCount);
-            if (value > 0) {
-                return value;
-            } else {
-                return 0; // default
-            }
-        } catch (NumberFormatException e) {
-            return 0; // default
-        }
-    }
-
-    public float getRepeatDur() {
-        try {
-            float repeatDur =
-                TimeImpl.parseClockValue(mSmilElement.getAttribute("repeatDur"));
-            if (repeatDur > 0) {
-                return repeatDur;
-            } else {
-                return 0; // default
-            }
-        } catch (IllegalArgumentException e) {
-            return 0; // default
-        }
-    }
-
-    public short getRestart() {
-        String restart = mSmilElement.getAttribute("restart");
-        if (restart.equalsIgnoreCase("never")) {
-            return RESTART_NEVER;
-        } else if (restart.equalsIgnoreCase("whenNotActive")) {
-            return RESTART_WHEN_NOT_ACTIVE;
-        } else {
-            return RESTART_ALWAYS; // default
-        }
-    }
-
-    public void setBegin(TimeList begin) throws DOMException {
-        // TODO Implement this
-        mSmilElement.setAttribute("begin", "indefinite");
-    }
-
-    public void setDur(float dur) throws DOMException {
-        // In SMIL 3.0, the dur could be a timecount-value which may contain fractions.
-        // However, in MMS 1.3, the dur SHALL be expressed in integer milliseconds.
-        mSmilElement.setAttribute("dur", Integer.toString((int)(dur * 1000)) + "ms");
-    }
-
-    public void setEnd(TimeList end) throws DOMException {
-        // TODO Implement this
-        mSmilElement.setAttribute("end", "indefinite");
-    }
-
-    public void setFill(short fill) throws DOMException {
-        if (fill == FILL_FREEZE) {
-            mSmilElement.setAttribute(FILL_ATTRIBUTE_NAME, FILL_FREEZE_ATTRIBUTE);
-        } else {
-            mSmilElement.setAttribute(FILL_ATTRIBUTE_NAME, FILL_REMOVE_ATTRIBUTE); // default
-        }
-    }
-
-    public void setFillDefault(short fillDefault) throws DOMException {
-        if (fillDefault == FILL_FREEZE) {
-            mSmilElement.setAttribute(FILLDEFAULT_ATTRIBUTE_NAME, FILL_FREEZE_ATTRIBUTE);
-        } else {
-            mSmilElement.setAttribute(FILLDEFAULT_ATTRIBUTE_NAME, FILL_REMOVE_ATTRIBUTE);
-        }
-    }
-
-    public void setRepeatCount(float repeatCount) throws DOMException {
-        String repeatCountString = "indefinite";
-        if (repeatCount > 0) {
-            repeatCountString = Float.toString(repeatCount);
-        }
-        mSmilElement.setAttribute("repeatCount", repeatCountString);
-    }
-
-    public void setRepeatDur(float repeatDur) throws DOMException {
-        String repeatDurString = "indefinite";
-        if (repeatDur > 0) {
-            repeatDurString = Float.toString(repeatDur) + "ms";
-        }
-        mSmilElement.setAttribute("repeatDur", repeatDurString);
-    }
-
-    public void setRestart(short restart) throws DOMException {
-        if (restart == RESTART_NEVER) {
-            mSmilElement.setAttribute("restart", "never");
-        } else if (restart == RESTART_WHEN_NOT_ACTIVE) {
-            mSmilElement.setAttribute("restart", "whenNotActive");
-        } else {
-            mSmilElement.setAttribute("restart", "always");
-        }
-    }
-}
diff --git a/src/com/android/mms/dom/smil/SmilDocumentImpl.java b/src/com/android/mms/dom/smil/SmilDocumentImpl.java
deleted file mode 100644
index bb042d4..0000000
--- a/src/com/android/mms/dom/smil/SmilDocumentImpl.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.smil;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.events.DocumentEvent;
-import org.w3c.dom.events.Event;
-import org.w3c.dom.smil.ElementSequentialTimeContainer;
-import org.w3c.dom.smil.ElementTime;
-import org.w3c.dom.smil.SMILDocument;
-import org.w3c.dom.smil.SMILElement;
-import org.w3c.dom.smil.SMILLayoutElement;
-import org.w3c.dom.smil.TimeList;
-
-import com.android.mms.dom.DocumentImpl;
-import com.android.mms.dom.events.EventImpl;
-
-public class SmilDocumentImpl extends DocumentImpl implements SMILDocument, DocumentEvent {
-    /*
-     * The sequential time container cannot be initialized here because the real container
-     * is body, which hasn't been created yet. It will be initialized when the body has
-     * already been created. Please see getBody().
-     */
-    ElementSequentialTimeContainer mSeqTimeContainer;
-
-    public final static String SMIL_DOCUMENT_START_EVENT = "SmilDocumentStart";
-    public final static String SMIL_DOCUMENT_END_EVENT = "SimlDocumentEnd";
-
-    /*
-     * Internal methods
-     */
-    public SmilDocumentImpl() {
-        super();
-    }
-
-    /*
-     * ElementSequentialTimeContainer stuff
-     */
-
-    public NodeList getActiveChildrenAt(float instant) {
-        return mSeqTimeContainer.getActiveChildrenAt(instant);
-    }
-
-    public NodeList getTimeChildren() {
-        return mSeqTimeContainer.getTimeChildren();
-    }
-
-    public boolean beginElement() {
-        return mSeqTimeContainer.beginElement();
-    }
-
-    public boolean endElement() {
-        return mSeqTimeContainer.endElement();
-    }
-
-    public TimeList getBegin() {
-        return mSeqTimeContainer.getBegin();
-    }
-
-    public float getDur() {
-        return mSeqTimeContainer.getDur();
-    }
-
-    public TimeList getEnd() {
-        return mSeqTimeContainer.getEnd();
-    }
-
-    public short getFill() {
-        return mSeqTimeContainer.getFill();
-    }
-
-    public short getFillDefault() {
-        return mSeqTimeContainer.getFillDefault();
-    }
-
-    public float getRepeatCount() {
-        return mSeqTimeContainer.getRepeatCount();
-    }
-
-    public float getRepeatDur() {
-        return mSeqTimeContainer.getRepeatDur();
-    }
-
-    public short getRestart() {
-        return mSeqTimeContainer.getRestart();
-    }
-
-    public void pauseElement() {
-        mSeqTimeContainer.pauseElement();
-    }
-
-    public void resumeElement() {
-        mSeqTimeContainer.resumeElement();
-    }
-
-    public void seekElement(float seekTo) {
-        mSeqTimeContainer.seekElement(seekTo);
-    }
-
-    public void setBegin(TimeList begin) throws DOMException {
-        mSeqTimeContainer.setBegin(begin);
-    }
-
-    public void setDur(float dur) throws DOMException {
-        mSeqTimeContainer.setDur(dur);
-    }
-
-    public void setEnd(TimeList end) throws DOMException {
-        mSeqTimeContainer.setEnd(end);
-    }
-
-    public void setFill(short fill) throws DOMException {
-        mSeqTimeContainer.setFill(fill);
-    }
-
-    public void setFillDefault(short fillDefault) throws DOMException {
-        mSeqTimeContainer.setFillDefault(fillDefault);
-    }
-
-    public void setRepeatCount(float repeatCount) throws DOMException {
-        mSeqTimeContainer.setRepeatCount(repeatCount);
-    }
-
-    public void setRepeatDur(float repeatDur) throws DOMException {
-        mSeqTimeContainer.setRepeatDur(repeatDur);
-    }
-
-    public void setRestart(short restart) throws DOMException {
-        mSeqTimeContainer.setRestart(restart);
-    }
-
-    /*
-     * Document Interface
-     */
-
-    @Override
-    public Element createElement(String tagName) throws DOMException {
-        // Find the appropriate class for this element
-        tagName = tagName.toLowerCase();
-        if (tagName.equals("text") ||
-                tagName.equals("img") ||
-                tagName.equals("video")) {
-            return new SmilRegionMediaElementImpl(this, tagName);
-        } else if (tagName.equals("audio")) {
-            return new SmilMediaElementImpl(this, tagName);
-        } else if (tagName.equals("layout")) {
-            return new SmilLayoutElementImpl(this, tagName);
-        } else if (tagName.equals("root-layout")) {
-            return new SmilRootLayoutElementImpl(this, tagName);
-        } else if (tagName.equals("region")) {
-            return new SmilRegionElementImpl(this, tagName);
-        } else if (tagName.equals("ref")) {
-            return new SmilRefElementImpl(this, tagName);
-        } else if (tagName.equals("par")) {
-            return new SmilParElementImpl(this, tagName);
-        } else {
-            // This includes also the structural nodes SMIL,
-            // HEAD, BODY, for which no specific types are defined.
-            return new SmilElementImpl(this, tagName);
-        }
-    }
-
-    @Override
-    public SMILElement getDocumentElement() {
-        Node rootElement = getFirstChild();
-        if (rootElement == null || !(rootElement instanceof SMILElement)) {
-            // The root doesn't exist. Create a new one.
-            rootElement = createElement("smil");
-            appendChild(rootElement);
-        }
-
-        return (SMILElement) rootElement;
-    }
-
-    /*
-     * SMILElement Interface
-     */
-
-    public SMILElement getHead() {
-        Node rootElement = getDocumentElement();
-        Node headElement = rootElement.getFirstChild();
-        if (headElement == null || !(headElement instanceof SMILElement)) {
-            // The head doesn't exist. Create a new one.
-            headElement = createElement("head");
-            rootElement.appendChild(headElement);
-        }
-
-        return (SMILElement) headElement;
-    }
-
-    public SMILElement getBody() {
-        Node rootElement = getDocumentElement();
-        Node headElement = getHead();
-        Node bodyElement = headElement.getNextSibling();
-        if (bodyElement == null || !(bodyElement instanceof SMILElement)) {
-            // The body doesn't exist. Create a new one.
-            bodyElement = createElement("body");
-            rootElement.appendChild(bodyElement);
-        }
-
-        // Initialize the real sequential time container, which is body.
-        mSeqTimeContainer = new ElementSequentialTimeContainerImpl((SMILElement) bodyElement) {
-            public NodeList getTimeChildren() {
-                return getBody().getElementsByTagName("par");
-            }
-
-            public boolean beginElement() {
-                Event startEvent = createEvent("Event");
-                startEvent.initEvent(SMIL_DOCUMENT_START_EVENT, false, false);
-                dispatchEvent(startEvent);
-                return true;
-            }
-
-            public boolean endElement() {
-                Event endEvent = createEvent("Event");
-                endEvent.initEvent(SMIL_DOCUMENT_END_EVENT, false, false);
-                dispatchEvent(endEvent);
-                return true;
-            }
-
-            public void pauseElement() {
-                // TODO Auto-generated method stub
-
-            }
-
-            public void resumeElement() {
-                // TODO Auto-generated method stub
-
-            }
-
-            public void seekElement(float seekTo) {
-                // TODO Auto-generated method stub
-
-            }
-
-            ElementTime getParentElementTime() {
-                return null;
-            }
-        };
-
-        return (SMILElement) bodyElement;
-    }
-
-    public SMILLayoutElement getLayout() {
-        Node headElement = getHead();
-        Node layoutElement = null;
-
-        // Find the layout element under <code>HEAD</code>
-        layoutElement = headElement.getFirstChild();
-        while ((layoutElement != null) && !(layoutElement instanceof SMILLayoutElement)) {
-            layoutElement = layoutElement.getNextSibling();
-        }
-
-        if (layoutElement == null) {
-            // The layout doesn't exist. Create a default one.
-            layoutElement = new SmilLayoutElementImpl(this, "layout");
-            headElement.appendChild(layoutElement);
-        }
-        return (SMILLayoutElement) layoutElement;
-    }
-
-    /*
-     * DocumentEvent Interface
-     */
-    public Event createEvent(String eventType) throws DOMException {
-        if ("Event".equals(eventType)) {
-            return new EventImpl();
-        } else {
-            throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
-                       "Not supported interface");
-        }
-    }
-}
diff --git a/src/com/android/mms/dom/smil/SmilElementImpl.java b/src/com/android/mms/dom/smil/SmilElementImpl.java
deleted file mode 100644
index 8944dfa..0000000
--- a/src/com/android/mms/dom/smil/SmilElementImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.smil;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.smil.SMILElement;
-
-import com.android.mms.dom.ElementImpl;
-
-public class SmilElementImpl extends ElementImpl implements SMILElement {
-    /**
-     * This constructor is used by the factory methods of the SmilDocument.
-     *
-     * @param owner The SMIL document to which this element belongs to
-     * @param tagName The tag name of the element
-     */
-    SmilElementImpl(SmilDocumentImpl owner, String tagName)
-    {
-        super(owner, tagName.toLowerCase());
-    }
-
-    public String getId() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public void setId(String id) throws DOMException {
-        // TODO Auto-generated method stub
-
-    }
-
-}
diff --git a/src/com/android/mms/dom/smil/SmilLayoutElementImpl.java b/src/com/android/mms/dom/smil/SmilLayoutElementImpl.java
deleted file mode 100644
index 99edbb8..0000000
--- a/src/com/android/mms/dom/smil/SmilLayoutElementImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.smil;
-
-import com.android.mms.layout.LayoutManager;
-
-import org.w3c.dom.NodeList;
-import org.w3c.dom.smil.SMILLayoutElement;
-import org.w3c.dom.smil.SMILRootLayoutElement;
-
-public class SmilLayoutElementImpl extends SmilElementImpl implements
-        SMILLayoutElement {
-    SmilLayoutElementImpl(SmilDocumentImpl owner, String tagName) {
-        super(owner, tagName);
-    }
-
-    public boolean getResolved() {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    public String getType() {
-        return this.getAttribute("type");
-    }
-
-    public NodeList getRegions() {
-        return this.getElementsByTagName("region");
-    }
-
-    public SMILRootLayoutElement getRootLayout() {
-        NodeList childNodes = this.getChildNodes();
-        SMILRootLayoutElement rootLayoutNode = null;
-        int childrenCount = childNodes.getLength();
-        for (int i = 0; i < childrenCount; i++) {
-            if (childNodes.item(i).getNodeName().equals("root-layout")) {
-                rootLayoutNode = (SMILRootLayoutElement)childNodes.item(i);
-            }
-        }
-        if (null == rootLayoutNode) {
-            // root-layout node is not set. Create a default one.
-            rootLayoutNode = (SMILRootLayoutElement) getOwnerDocument().createElement("root-layout");
-            rootLayoutNode.setWidth(LayoutManager.getInstance().getLayoutParameters().getWidth());
-            rootLayoutNode.setHeight(LayoutManager.getInstance().getLayoutParameters().getHeight());
-            appendChild(rootLayoutNode);
-        }
-        return rootLayoutNode;
-    }
-
-}
diff --git a/src/com/android/mms/dom/smil/SmilMediaElementImpl.java b/src/com/android/mms/dom/smil/SmilMediaElementImpl.java
deleted file mode 100644
index 79e7430..0000000
--- a/src/com/android/mms/dom/smil/SmilMediaElementImpl.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.dom.smil;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.events.DocumentEvent;
-import org.w3c.dom.events.Event;
-import org.w3c.dom.smil.ElementTime;
-import org.w3c.dom.smil.SMILMediaElement;
-import org.w3c.dom.smil.TimeList;
-
-import android.util.Config;
-import android.util.Log;
-
-public class SmilMediaElementImpl extends SmilElementImpl implements
-        SMILMediaElement {
-    public final static String SMIL_MEDIA_START_EVENT = "SmilMediaStart";
-    public final static String SMIL_MEDIA_END_EVENT = "SmilMediaEnd";
-    public final static String SMIL_MEDIA_PAUSE_EVENT = "SmilMediaPause";
-    public final static String SMIL_MEDIA_SEEK_EVENT = "SmilMediaSeek";
-    private final static String TAG = "SmilMediaElementImpl";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    ElementTime mElementTime = new ElementTimeImpl(this) {
-            private Event createEvent(String eventType) {
-                DocumentEvent doc =
-                    (DocumentEvent)SmilMediaElementImpl.this.getOwnerDocument();
-                Event event = doc.createEvent("Event");
-                event.initEvent(eventType, false, false);
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "Dispatching 'begin' event to "
-                            + SmilMediaElementImpl.this.getTagName() + " "
-                            + SmilMediaElementImpl.this.getSrc() + " at "
-                            + System.currentTimeMillis());
-                }
-                return event;
-            }
-
-            private Event createEvent(String eventType, int seekTo) {
-                DocumentEvent doc =
-                    (DocumentEvent)SmilMediaElementImpl.this.getOwnerDocument();
-                Event event = doc.createEvent("Event");
-                event.initEvent(eventType, false, false, seekTo);
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "Dispatching 'begin' event to "
-                            + SmilMediaElementImpl.this.getTagName() + " "
-                            + SmilMediaElementImpl.this.getSrc() + " at "
-                            + System.currentTimeMillis());
-                }
-                return event;
-            }
-
-            public boolean beginElement() {
-                Event startEvent = createEvent(SMIL_MEDIA_START_EVENT);
-                dispatchEvent(startEvent);
-                return true;
-            }
-
-            public boolean endElement() {
-                Event endEvent = createEvent(SMIL_MEDIA_END_EVENT);
-                dispatchEvent(endEvent);
-                return true;
-            }
-
-            public void resumeElement() {
-                Event resumeEvent = createEvent(SMIL_MEDIA_START_EVENT);
-                dispatchEvent(resumeEvent);
-            }
-
-            public void pauseElement() {
-                Event pauseEvent = createEvent(SMIL_MEDIA_PAUSE_EVENT);
-                dispatchEvent(pauseEvent);
-            }
-
-            public void seekElement(float seekTo) {
-                Event seekEvent = createEvent(SMIL_MEDIA_SEEK_EVENT, (int) seekTo);
-                dispatchEvent(seekEvent);
-            }
-
-            @Override
-            public float getDur() {
-                float dur = super.getDur();
-                if (dur == 0) {
-                    // Duration is not specified, So get the implicit duration.
-                    String tag = getTagName();
-                    if (tag.equals("video") || tag.equals("audio")) {
-                        // Continuous media
-                        // FIXME Should get the duration of the media. "indefinite" instead here.
-                        dur = -1.0F;
-                    } else if (tag.equals("text") || tag.equals("img")) {
-                        // Discrete media
-                        dur = 0;
-                    } else {
-                        Log.w(TAG, "Unknown media type");
-                    }
-                }
-                return dur;
-            }
-
-            @Override
-            ElementTime getParentElementTime() {
-                return ((SmilParElementImpl) mSmilElement.getParentNode()).mParTimeContainer;
-            }
-    };
-
-    /*
-     * Internal Interface
-     */
-
-    SmilMediaElementImpl(SmilDocumentImpl owner, String tagName) {
-        super(owner, tagName);
-    }
-
-    /*
-     * SMILMediaElement Interface
-     */
-
-    public String getAbstractAttr() {
-        return this.getAttribute("abstract");
-    }
-
-    public String getAlt() {
-        return this.getAttribute("alt");
-    }
-
-    public String getAuthor() {
-        return this.getAttribute("author");
-    }
-
-    public String getClipBegin() {
-        return this.getAttribute("clipBegin");
-    }
-
-    public String getClipEnd() {
-        return this.getAttribute("clipEnd");
-    }
-
-    public String getCopyright() {
-        return this.getAttribute("copyright");
-    }
-
-    public String getLongdesc() {
-        return this.getAttribute("longdesc");
-    }
-
-    public String getPort() {
-        return this.getAttribute("port");
-    }
-
-    public String getReadIndex() {
-        return this.getAttribute("readIndex");
-    }
-
-    public String getRtpformat() {
-        return this.getAttribute("rtpformat");
-    }
-
-    public String getSrc() {
-        return this.getAttribute("src");
-    }
-
-    public String getStripRepeat() {
-        return this.getAttribute("stripRepeat");
-    }
-
-    public String getTitle() {
-        return this.getAttribute("title");
-    }
-
-    public String getTransport() {
-        return this.getAttribute("transport");
-    }
-
-    public String getType() {
-        return this.getAttribute("type");
-    }
-
-    public void setAbstractAttr(String abstractAttr) throws DOMException {
-        this.setAttribute("abstract", abstractAttr);
-    }
-
-    public void setAlt(String alt) throws DOMException {
-        this.setAttribute("alt", alt);
-    }
-
-    public void setAuthor(String author) throws DOMException {
-        this.setAttribute("author", author);
-    }
-
-    public void setClipBegin(String clipBegin) throws DOMException {
-        this.setAttribute("clipBegin", clipBegin);
-    }
-
-    public void setClipEnd(String clipEnd) throws DOMException {
-        this.setAttribute("clipEnd", clipEnd);
-    }
-
-    public void setCopyright(String copyright) throws DOMException {
-        this.setAttribute("copyright", copyright);
-    }
-
-    public void setLongdesc(String longdesc) throws DOMException {
-        this.setAttribute("longdesc", longdesc);
-
-    }
-
-    public void setPort(String port) throws DOMException {
-        this.setAttribute("port", port);
-    }
-
-    public void setReadIndex(String readIndex) throws DOMException {
-        this.setAttribute("readIndex", readIndex);
-    }
-
-    public void setRtpformat(String rtpformat) throws DOMException {
-        this.setAttribute("rtpformat", rtpformat);
-    }
-
-    public void setSrc(String src) throws DOMException {
-        this.setAttribute("src", src);
-    }
-
-    public void setStripRepeat(String stripRepeat) throws DOMException {
-        this.setAttribute("stripRepeat", stripRepeat);
-    }
-
-    public void setTitle(String title) throws DOMException {
-        this.setAttribute("title", title);
-    }
-
-    public void setTransport(String transport) throws DOMException {
-        this.setAttribute("transport", transport);
-    }
-
-    public void setType(String type) throws DOMException {
-        this.setAttribute("type", type);
-    }
-
-    /*
-     * TimeElement Interface
-     */
-
-    public boolean beginElement() {
-        return mElementTime.beginElement();
-    }
-
-    public boolean endElement() {
-        return mElementTime.endElement();
-    }
-
-    public TimeList getBegin() {
-        return mElementTime.getBegin();
-    }
-
-    public float getDur() {
-        return mElementTime.getDur();
-    }
-
-    public TimeList getEnd() {
-        return mElementTime.getEnd();
-    }
-
-    public short getFill() {
-        return mElementTime.getFill();
-    }
-
-    public short getFillDefault() {
-        return mElementTime.getFillDefault();
-    }
-
-    public float getRepeatCount() {
-        return mElementTime.getRepeatCount();
-    }
-
-    public float getRepeatDur() {
-        return mElementTime.getRepeatDur();
-    }
-
-    public short getRestart() {
-        return mElementTime.getRestart();
-    }
-
-    public void pauseElement() {
-        mElementTime.pauseElement();
-    }
-
-    public void resumeElement() {
-        mElementTime.resumeElement();
-    }
-
-    public void seekElement(float seekTo) {
-        mElementTime.seekElement(seekTo);
-    }
-
-    public void setBegin(TimeList begin) throws DOMException {
-        mElementTime.setBegin(begin);
-    }
-
-    public void setDur(float dur) throws DOMException {
-        mElementTime.setDur(dur);
-    }
-
-    public void setEnd(TimeList end) throws DOMException {
-        mElementTime.setEnd(end);
-    }
-
-    public void setFill(short fill) throws DOMException {
-        mElementTime.setFill(fill);
-    }
-
-    public void setFillDefault(short fillDefault) throws DOMException {
-        mElementTime.setFillDefault(fillDefault);
-    }
-
-    public void setRepeatCount(float repeatCount) throws DOMException {
-        mElementTime.setRepeatCount(repeatCount);
-    }
-
-    public void setRepeatDur(float repeatDur) throws DOMException {
-        mElementTime.setRepeatDur(repeatDur);
-    }
-
-    public void setRestart(short restart) throws DOMException {
-        mElementTime.setRestart(restart);
-    }
-}
diff --git a/src/com/android/mms/dom/smil/SmilParElementImpl.java b/src/com/android/mms/dom/smil/SmilParElementImpl.java
deleted file mode 100644
index 258e9ab..0000000
--- a/src/com/android/mms/dom/smil/SmilParElementImpl.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.smil;
-
-import java.util.ArrayList;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.NodeList;
-import org.w3c.dom.events.DocumentEvent;
-import org.w3c.dom.events.Event;
-import org.w3c.dom.smil.ElementParallelTimeContainer;
-import org.w3c.dom.smil.ElementTime;
-import org.w3c.dom.smil.SMILParElement;
-import org.w3c.dom.smil.Time;
-import org.w3c.dom.smil.TimeList;
-
-public class SmilParElementImpl extends SmilElementImpl implements SMILParElement {
-    public final static String SMIL_SLIDE_START_EVENT = "SmilSlideStart";
-    public final static String SMIL_SLIDE_END_EVENT = "SmilSlideEnd";
-
-    ElementParallelTimeContainer mParTimeContainer =
-        new ElementParallelTimeContainerImpl(this) {
-        @Override
-        public TimeList getBegin() {
-            /*
-             * For children of a sequence, the only legal value for begin is
-             * a (single) non-negative offset value.
-             */
-            TimeList beginTimeList = super.getBegin();
-            if (beginTimeList.getLength() > 1) {
-                ArrayList<Time> singleTimeContainer = new ArrayList<Time>();
-                singleTimeContainer.add(beginTimeList.item(0));
-                beginTimeList = new TimeListImpl(singleTimeContainer);
-            }
-            return beginTimeList;
-        }
-
-        public NodeList getTimeChildren() {
-            return getChildNodes();
-        }
-
-        public boolean beginElement() {
-            DocumentEvent doc = (DocumentEvent) SmilParElementImpl.this.getOwnerDocument();
-            Event startEvent = doc.createEvent("Event");
-            startEvent.initEvent(SMIL_SLIDE_START_EVENT, false, false);
-            dispatchEvent(startEvent);
-            return true;
-        }
-
-        public boolean endElement() {
-            DocumentEvent doc = (DocumentEvent) SmilParElementImpl.this.getOwnerDocument();
-            Event endEvent = doc.createEvent("Event");
-            endEvent.initEvent(SMIL_SLIDE_END_EVENT, false, false);
-            dispatchEvent(endEvent);
-            return true;
-        }
-
-        public void pauseElement() {
-            // TODO Auto-generated method stub
-
-        }
-
-        public void resumeElement() {
-            // TODO Auto-generated method stub
-
-        }
-
-        public void seekElement(float seekTo) {
-            // TODO Auto-generated method stub
-
-        }
-
-        ElementTime getParentElementTime() {
-            return ((SmilDocumentImpl) mSmilElement.getOwnerDocument()).mSeqTimeContainer;
-        }
-    };
-
-    /*
-     * Internal Interface
-     */
-
-    SmilParElementImpl(SmilDocumentImpl owner, String tagName)
-    {
-        super(owner, tagName.toUpperCase());
-    }
-
-    int getBeginConstraints() {
-        /*
-         * For children of a sequence, the only legal value for begin is
-         * a (single) non-negative offset value.
-         */
-        return (TimeImpl.ALLOW_OFFSET_VALUE); // Do not set ALLOW_NEGATIVE_VALUE
-    }
-
-    /*
-     * ElementParallelTimeContainer
-     */
-
-    public String getEndSync() {
-        return mParTimeContainer.getEndSync();
-    }
-
-    public float getImplicitDuration() {
-        return mParTimeContainer.getImplicitDuration();
-    }
-
-    public void setEndSync(String endSync) throws DOMException {
-        mParTimeContainer.setEndSync(endSync);
-    }
-
-    public NodeList getActiveChildrenAt(float instant) {
-        return mParTimeContainer.getActiveChildrenAt(instant);
-    }
-
-    public NodeList getTimeChildren() {
-        return mParTimeContainer.getTimeChildren();
-    }
-
-    public boolean beginElement() {
-        return mParTimeContainer.beginElement();
-    }
-
-    public boolean endElement() {
-        return mParTimeContainer.endElement();
-    }
-
-    public TimeList getBegin() {
-        return mParTimeContainer.getBegin();
-    }
-
-    public float getDur() {
-        return mParTimeContainer.getDur();
-    }
-
-    public TimeList getEnd() {
-        return mParTimeContainer.getEnd();
-    }
-
-    public short getFill() {
-        return mParTimeContainer.getFill();
-    }
-
-    public short getFillDefault() {
-        return mParTimeContainer.getFillDefault();
-    }
-
-    public float getRepeatCount() {
-        return mParTimeContainer.getRepeatCount();
-    }
-
-    public float getRepeatDur() {
-        return mParTimeContainer.getRepeatDur();
-    }
-
-    public short getRestart() {
-        return mParTimeContainer.getRestart();
-    }
-
-    public void pauseElement() {
-        mParTimeContainer.pauseElement();
-    }
-
-    public void resumeElement() {
-        mParTimeContainer.resumeElement();
-    }
-
-    public void seekElement(float seekTo) {
-        mParTimeContainer.seekElement(seekTo);
-    }
-
-    public void setBegin(TimeList begin) throws DOMException {
-        mParTimeContainer.setBegin(begin);
-    }
-
-    public void setDur(float dur) throws DOMException {
-        mParTimeContainer.setDur(dur);
-    }
-
-    public void setEnd(TimeList end) throws DOMException {
-        mParTimeContainer.setEnd(end);
-    }
-
-    public void setFill(short fill) throws DOMException {
-        mParTimeContainer.setFill(fill);
-    }
-
-    public void setFillDefault(short fillDefault) throws DOMException {
-        mParTimeContainer.setFillDefault(fillDefault);
-    }
-
-    public void setRepeatCount(float repeatCount) throws DOMException {
-        mParTimeContainer.setRepeatCount(repeatCount);
-    }
-
-    public void setRepeatDur(float repeatDur) throws DOMException {
-        mParTimeContainer.setRepeatDur(repeatDur);
-    }
-
-    public void setRestart(short restart) throws DOMException {
-        mParTimeContainer.setRestart(restart);
-    }
-}
diff --git a/src/com/android/mms/dom/smil/SmilPlayer.java b/src/com/android/mms/dom/smil/SmilPlayer.java
deleted file mode 100644
index b41727c..0000000
--- a/src/com/android/mms/dom/smil/SmilPlayer.java
+++ /dev/null
@@ -1,609 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.dom.smil;
-
-import org.w3c.dom.NodeList;
-import org.w3c.dom.events.DocumentEvent;
-import org.w3c.dom.events.Event;
-import org.w3c.dom.events.EventTarget;
-import org.w3c.dom.smil.ElementParallelTimeContainer;
-import org.w3c.dom.smil.ElementSequentialTimeContainer;
-import org.w3c.dom.smil.ElementTime;
-import org.w3c.dom.smil.Time;
-import org.w3c.dom.smil.TimeList;
-
-import android.util.Config;
-import android.util.Log;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-
-/**
- * The SmilPlayer is responsible for playing, stopping, pausing and resuming a SMIL tree.
- * <li>It creates a whole timeline before playing.</li>
- * <li>The player runs in a different thread which intends not to block the main thread.</li>
- */
-public class SmilPlayer implements Runnable {
-    private static final String TAG = "SmilPlayer";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-    private static final int TIMESLICE = 200;
-
-    private static enum SmilPlayerState {
-        INITIALIZED,
-        PLAYING,
-        PLAYED,
-        PAUSED,
-        STOPPED,
-    }
-
-    private static enum SmilPlayerAction {
-        NO_ACTIVE_ACTION,
-        RELOAD,
-        STOP,
-        PAUSE,
-        START,
-    }
-
-    public static final String MEDIA_TIME_UPDATED_EVENT = "mediaTimeUpdated";
-
-    private static final Comparator<TimelineEntry> sTimelineEntryComparator =
-        new Comparator<TimelineEntry>() {
-        public int compare(TimelineEntry o1, TimelineEntry o2) {
-            return Double.compare(o1.getOffsetTime(), o2.getOffsetTime());
-        }
-    };
-
-    private static SmilPlayer sPlayer;
-
-    private long mCurrentTime;
-    private int mCurrentElement;
-    private int mCurrentSlide;
-    private ArrayList<TimelineEntry> mAllEntries;
-    private ElementTime mRoot;
-    private Thread mPlayerThread;
-    private SmilPlayerState mState = SmilPlayerState.INITIALIZED;
-    private SmilPlayerAction mAction = SmilPlayerAction.NO_ACTIVE_ACTION;
-    private ArrayList<ElementTime> mActiveElements;
-    private Event mMediaTimeUpdatedEvent;
-
-    private static ArrayList<TimelineEntry> getParTimeline(
-            ElementParallelTimeContainer par, double offset, double maxOffset) {
-        ArrayList<TimelineEntry> timeline = new ArrayList<TimelineEntry>();
-
-        // Set my begin at first
-        TimeList myBeginList = par.getBegin();
-        /*
-         * Begin list only contain 1 begin time which has been resolved.
-         * @see com.android.mms.dom.smil.ElementParallelTimeContainerImpl#getBegin()
-         */
-        Time begin = myBeginList.item(0);
-        double beginOffset = begin.getResolvedOffset() + offset;
-        if (beginOffset > maxOffset) {
-            // This element can't be started.
-            return timeline;
-        }
-        TimelineEntry myBegin = new TimelineEntry(beginOffset, par, TimelineEntry.ACTION_BEGIN);
-        timeline.add(myBegin);
-
-        TimeList myEndList = par.getEnd();
-        /*
-         * End list only contain 1 end time which has been resolved.
-         * @see com.android.mms.dom.smil.ElementParallelTimeContainerImpl#getEnd()
-         */
-        Time end = myEndList.item(0);
-        double endOffset = end.getResolvedOffset() + offset;
-        if (endOffset > maxOffset) {
-            endOffset = maxOffset;
-        }
-        TimelineEntry myEnd = new TimelineEntry(endOffset, par, TimelineEntry.ACTION_END);
-
-        maxOffset = endOffset;
-
-        NodeList children = par.getTimeChildren();
-        for (int i = 0; i < children.getLength(); ++i) {
-            ElementTime child = (ElementTime) children.item(i);
-            ArrayList<TimelineEntry> childTimeline = getTimeline(child, offset, maxOffset);
-            timeline.addAll(childTimeline);
-        }
-
-        Collections.sort(timeline, sTimelineEntryComparator);
-
-        // Add end-event to timeline for all active children
-        NodeList activeChildrenAtEnd = par.getActiveChildrenAt(
-                (float) (endOffset - offset) * 1000);
-        for (int i = 0; i < activeChildrenAtEnd.getLength(); ++i) {
-            timeline.add(new TimelineEntry(endOffset,
-                    (ElementTime) activeChildrenAtEnd.item(i),
-                    TimelineEntry.ACTION_END));
-        }
-
-        // Set my end at last
-        timeline.add(myEnd);
-
-        return timeline;
-    }
-
-    private static ArrayList<TimelineEntry> getSeqTimeline(
-            ElementSequentialTimeContainer seq, double offset, double maxOffset) {
-        ArrayList<TimelineEntry> timeline = new ArrayList<TimelineEntry>();
-        double orgOffset = offset;
-
-        // Set my begin at first
-        TimeList myBeginList = seq.getBegin();
-        /*
-         * Begin list only contain 1 begin time which has been resolved.
-         * @see com.android.mms.dom.smil.ElementSequentialTimeContainerImpl#getBegin()
-         */
-        Time begin = myBeginList.item(0);
-        double beginOffset = begin.getResolvedOffset() + offset;
-        if (beginOffset > maxOffset) {
-            // This element can't be started.
-            return timeline;
-        }
-        TimelineEntry myBegin = new TimelineEntry(beginOffset, seq, TimelineEntry.ACTION_BEGIN);
-        timeline.add(myBegin);
-
-        TimeList myEndList = seq.getEnd();
-        /*
-         * End list only contain 1 end time which has been resolved.
-         * @see com.android.mms.dom.smil.ElementSequentialTimeContainerImpl#getEnd()
-         */
-        Time end = myEndList.item(0);
-        double endOffset = end.getResolvedOffset() + offset;
-        if (endOffset > maxOffset) {
-            endOffset = maxOffset;
-        }
-        TimelineEntry myEnd = new TimelineEntry(endOffset, seq, TimelineEntry.ACTION_END);
-
-        maxOffset = endOffset;
-
-        // Get children's timelines
-        NodeList children = seq.getTimeChildren();
-        for (int i = 0; i < children.getLength(); ++i) {
-            ElementTime child = (ElementTime) children.item(i);
-            ArrayList<TimelineEntry> childTimeline = getTimeline(child, offset, maxOffset);
-            timeline.addAll(childTimeline);
-
-            // Since the child timeline has been sorted, the offset of the last one is the biggest.
-            offset = childTimeline.get(childTimeline.size() - 1).getOffsetTime();
-        }
-
-        // Add end-event to timeline for all active children
-        NodeList activeChildrenAtEnd = seq.getActiveChildrenAt(
-                (float) (endOffset - orgOffset));
-        for (int i = 0; i < activeChildrenAtEnd.getLength(); ++i) {
-            timeline.add(new TimelineEntry(endOffset,
-                    (ElementTime) activeChildrenAtEnd.item(i),
-                    TimelineEntry.ACTION_END));
-        }
-
-        // Set my end at last
-        timeline.add(myEnd);
-
-        return timeline;
-    }
-
-    private static ArrayList<TimelineEntry> getTimeline(ElementTime element,
-            double offset, double maxOffset) {
-        if (element instanceof ElementParallelTimeContainer) {
-            return getParTimeline((ElementParallelTimeContainer) element, offset, maxOffset);
-        } else if (element instanceof ElementSequentialTimeContainer) {
-            return getSeqTimeline((ElementSequentialTimeContainer) element, offset, maxOffset);
-        } else {
-            // Not ElementTimeContainer here
-            ArrayList<TimelineEntry> timeline = new ArrayList<TimelineEntry>();
-
-            TimeList beginList = element.getBegin();
-            for (int i = 0; i < beginList.getLength(); ++i) {
-                Time begin = beginList.item(i);
-                if (begin.getResolved()) {
-                    double beginOffset = begin.getResolvedOffset() + offset;
-                    if (beginOffset <= maxOffset) {
-                        TimelineEntry entry = new TimelineEntry(beginOffset,
-                                element, TimelineEntry.ACTION_BEGIN);
-                        timeline.add(entry);
-                    }
-                }
-            }
-
-            TimeList endList = element.getEnd();
-            for (int i = 0; i < endList.getLength(); ++i) {
-                Time end = endList.item(i);
-                if (end.getResolved()) {
-                    double endOffset = end.getResolvedOffset() + offset;
-                    if (endOffset <= maxOffset) {
-                        TimelineEntry entry = new TimelineEntry(endOffset,
-                                element, TimelineEntry.ACTION_END);
-                        timeline.add(entry);
-                    }
-                }
-            }
-
-            Collections.sort(timeline, sTimelineEntryComparator);
-
-            return timeline;
-        }
-    }
-
-    private SmilPlayer() {
-        // Private constructor
-    }
-
-    public static SmilPlayer getPlayer() {
-        if (sPlayer == null) {
-            sPlayer = new SmilPlayer();
-        }
-        return sPlayer;
-    }
-
-    public synchronized boolean isPlayingState() {
-        return mState == SmilPlayerState.PLAYING;
-    }
-
-    public synchronized boolean isPlayedState() {
-        return mState == SmilPlayerState.PLAYED;
-    }
-
-    public synchronized boolean isPausedState() {
-        return mState == SmilPlayerState.PAUSED;
-    }
-
-    public synchronized boolean isStoppedState() {
-        return mState == SmilPlayerState.STOPPED;
-    }
-
-    private synchronized boolean isPauseAction() {
-        return mAction == SmilPlayerAction.PAUSE;
-    }
-
-    private synchronized boolean isStartAction() {
-        return mAction == SmilPlayerAction.START;
-    }
-
-    private synchronized boolean isStopAction() {
-        return mAction == SmilPlayerAction.STOP;
-    }
-
-    private synchronized boolean isReloadAction() {
-        return mAction == SmilPlayerAction.RELOAD;
-    }
-
-    public synchronized void init(ElementTime root) {
-        mRoot = root;
-        mAllEntries = getTimeline(mRoot, 0, Long.MAX_VALUE);
-        mMediaTimeUpdatedEvent = ((DocumentEvent) mRoot).createEvent("Event");
-        mMediaTimeUpdatedEvent.initEvent(MEDIA_TIME_UPDATED_EVENT, false, false);
-        mActiveElements = new ArrayList<ElementTime>();
-    }
-
-    public synchronized void play() {
-        if (!isPlayingState()) {
-            mCurrentTime = 0;
-            mCurrentElement = 0;
-            mCurrentSlide = 0;
-            mPlayerThread = new Thread(this);
-            mState = SmilPlayerState.PLAYING;
-            mPlayerThread.start();
-        } else {
-            Log.w(TAG, "Error State: Playback is playing!");
-        }
-    }
-
-    public synchronized void pause() {
-        if (isPlayingState()) {
-            mAction = SmilPlayerAction.PAUSE;
-            notifyAll();
-        } else {
-            Log.w(TAG, "Error State: Playback is not playing!");
-        }
-    }
-
-    public synchronized void start() {
-        if (isPausedState()) {
-            resumeActiveElements();
-            mAction = SmilPlayerAction.START;
-            notifyAll();
-        } else if (isPlayedState()) {
-            play();
-        } else {
-            Log.w(TAG, "Error State: Playback can not be started!");
-        }
-    }
-
-    public synchronized void stop() {
-        if (isPlayingState() || isPausedState()) {
-            mAction = SmilPlayerAction.STOP;
-            notifyAll();
-        } else if (isPlayedState()) {
-            actionStop();
-        }
-    }
-
-    public synchronized void stopWhenReload() {
-        endActiveElements();
-    }
-
-    public synchronized void reload() {
-        if (isPlayingState() || isPausedState()) {
-            mAction = SmilPlayerAction.RELOAD;
-            notifyAll();
-        } else if (isPlayedState()) {
-            actionReload();
-        }
-    }
-
-    private synchronized boolean isBeginOfSlide(TimelineEntry entry) {
-        return (TimelineEntry.ACTION_BEGIN == entry.getAction())
-                    && (entry.getElement() instanceof SmilParElementImpl);
-    }
-
-    private synchronized void reloadActiveSlide() {
-        mActiveElements.clear();
-        beginSmilDocument();
-
-        for (int i = mCurrentSlide; i < mCurrentElement; i++) {
-            TimelineEntry entry = mAllEntries.get(i);
-            actionEntry(entry);
-        }
-        seekActiveMedia();
-    }
-
-    private synchronized void beginSmilDocument() {
-        TimelineEntry entry = mAllEntries.get(0);
-        actionEntry(entry);
-    }
-
-    private synchronized double getOffsetTime(ElementTime element) {
-        for (int i = mCurrentSlide; i < mCurrentElement; i++) {
-            TimelineEntry entry = mAllEntries.get(i);
-            if (element.equals(entry.getElement())) {
-                return entry.getOffsetTime() * 1000;  // in ms
-            }
-        }
-        return -1;
-    }
-
-    private synchronized void seekActiveMedia() {
-        for (int i = mActiveElements.size() - 1; i >= 0; i--) {
-            ElementTime element = mActiveElements.get(i);
-            if (element instanceof SmilParElementImpl) {
-                return;
-            }
-            double offset = getOffsetTime(element);
-            if ((offset >= 0) && (offset <= mCurrentTime)) {
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "[SEEK]  " + " at " + mCurrentTime
-                            + " " + element);
-                }
-                element.seekElement( (float) (mCurrentTime - offset) );
-            }
-        }
-    }
-
-    private synchronized void waitForEntry(long interval)
-            throws InterruptedException {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Waiting for " + interval + "ms.");
-        }
-
-        long overhead = 0;
-
-        while (interval > 0) {
-            long startAt = System.currentTimeMillis();
-            long sleep = Math.min(interval, TIMESLICE);
-            if (overhead < sleep) {
-                wait(sleep - overhead);
-                mCurrentTime += sleep;
-            } else {
-                sleep = 0;
-                mCurrentTime += overhead;
-            }
-
-            if (isStopAction() || isReloadAction() || isPauseAction()) {
-                return;
-            }
-
-            ((EventTarget) mRoot).dispatchEvent(mMediaTimeUpdatedEvent);
-
-            interval -= TIMESLICE;
-            overhead = System.currentTimeMillis() - startAt - sleep;
-        }
-    }
-
-    public synchronized int getDuration() {
-         if ((mAllEntries != null) && !mAllEntries.isEmpty()) {
-             return (int) mAllEntries.get(mAllEntries.size() - 1).mOffsetTime * 1000;
-         }
-         return 0;
-    }
-
-    public synchronized int getCurrentPosition() {
-        return (int) mCurrentTime;
-    }
-
-    private synchronized void endActiveElements() {
-        for (int i = mActiveElements.size() - 1; i >= 0; i--) {
-            ElementTime element = mActiveElements.get(i);
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "[STOP]  " + " at " + mCurrentTime
-                        + " " + element);
-            }
-            element.endElement();
-        }
-    }
-
-    private synchronized void pauseActiveElements() {
-        for (int i = mActiveElements.size() - 1; i >= 0; i--) {
-            ElementTime element = mActiveElements.get(i);
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "[PAUSE]  " + " at " + mCurrentTime
-                        + " " + element);
-            }
-            element.pauseElement();
-        }
-    }
-
-    private synchronized void resumeActiveElements() {
-        int size = mActiveElements.size();
-        for (int i = 0; i < size; i++) {
-            ElementTime element = mActiveElements.get(i);
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "[RESUME]  " + " at " + mCurrentTime
-                        + " " + element);
-            }
-            element.resumeElement();
-        }
-    }
-
-    private synchronized void waitForWakeUp() {
-        try {
-            while ( !(isStartAction() || isStopAction() || isReloadAction()) ) {
-                wait(TIMESLICE);
-            }
-            if (isStartAction()) {
-                mAction = SmilPlayerAction.NO_ACTIVE_ACTION;
-                mState = SmilPlayerState.PLAYING;
-            }
-        } catch (InterruptedException e) {
-            Log.e(TAG, "Unexpected InterruptedException.", e);
-        }
-    }
-
-    private synchronized void actionEntry(TimelineEntry entry) {
-        switch (entry.getAction()) {
-            case TimelineEntry.ACTION_BEGIN:
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "[START] " + " at " + mCurrentTime + " "
-                            + entry.getElement());
-                }
-                entry.getElement().beginElement();
-                mActiveElements.add(entry.getElement());
-                break;
-            case TimelineEntry.ACTION_END:
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "[STOP]  " + " at " + mCurrentTime + " "
-                            + entry.getElement());
-                }
-                entry.getElement().endElement();
-                mActiveElements.remove(entry.getElement());
-                break;
-            default:
-                break;
-        }
-    }
-
-    private synchronized TimelineEntry reloadCurrentEntry() {
-        return mAllEntries.get(mCurrentElement);
-    }
-
-    private synchronized void actionPause() {
-        pauseActiveElements();
-        mState = SmilPlayerState.PAUSED;
-        mAction = SmilPlayerAction.NO_ACTIVE_ACTION;
-    }
-
-    private synchronized void actionStop() {
-        endActiveElements();
-        mCurrentTime = 0;
-        mCurrentElement = 0;
-        mCurrentSlide = 0;
-        mState = SmilPlayerState.STOPPED;
-        mAction = SmilPlayerAction.NO_ACTIVE_ACTION;
-    }
-
-    private synchronized void actionReload() {
-        reloadActiveSlide();
-        mAction = SmilPlayerAction.NO_ACTIVE_ACTION;
-    }
-
-    public void run() {
-        if (isStoppedState()) {
-            return;
-        }
-
-        // Play the Element by following the timeline
-        int size = mAllEntries.size();
-        for (mCurrentElement = 0; mCurrentElement < size; mCurrentElement++) {
-            TimelineEntry entry = mAllEntries.get(mCurrentElement);
-            if (isBeginOfSlide(entry)) {
-                mCurrentSlide = mCurrentElement;
-            }
-            long offset = (long) (entry.getOffsetTime() * 1000); // in ms.
-            while (offset > mCurrentTime) {
-                try {
-                    waitForEntry(offset - mCurrentTime);
-                } catch (InterruptedException e) {
-                    Log.e(TAG, "Unexpected InterruptedException.", e);
-                }
-
-                while (isPauseAction() || isStopAction() || isReloadAction()) {
-                    if (isPauseAction()) {
-                        actionPause();
-                        waitForWakeUp();
-                    }
-
-                    if (isStopAction()) {
-                        actionStop();
-                        return;
-                    }
-
-                    if (isReloadAction()) {
-                        actionReload();
-                        entry = reloadCurrentEntry();
-                        if (isPausedState()) {
-                            mAction = SmilPlayerAction.PAUSE;
-                        }
-                    }
-                }
-            }
-            mCurrentTime = offset;
-            actionEntry(entry);
-        }
-
-        mState = SmilPlayerState.PLAYED;
-    }
-
-    private static final class TimelineEntry {
-        final static int ACTION_BEGIN = 0;
-        final static int ACTION_END   = 1;
-
-        private final double mOffsetTime;
-        private final ElementTime mElement;
-        private final int mAction;
-
-        public TimelineEntry(double offsetTime, ElementTime element, int action) {
-            mOffsetTime = offsetTime;
-            mElement = element;
-            mAction  = action;
-        }
-
-        public double getOffsetTime() {
-            return mOffsetTime;
-        }
-
-        public ElementTime getElement() {
-            return mElement;
-        }
-
-        public int getAction() {
-            return mAction;
-        }
-    }
-}
diff --git a/src/com/android/mms/dom/smil/SmilRefElementImpl.java b/src/com/android/mms/dom/smil/SmilRefElementImpl.java
deleted file mode 100644
index 48be34b..0000000
--- a/src/com/android/mms/dom/smil/SmilRefElementImpl.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.smil;
-
-import org.w3c.dom.smil.SMILRefElement;
-
-public class SmilRefElementImpl extends SmilRegionMediaElementImpl implements
-        SMILRefElement {
-
-    SmilRefElementImpl(SmilDocumentImpl owner, String tagName) {
-        super(owner, tagName);
-    }
-
-}
diff --git a/src/com/android/mms/dom/smil/SmilRegionElementImpl.java b/src/com/android/mms/dom/smil/SmilRegionElementImpl.java
deleted file mode 100644
index 3841488..0000000
--- a/src/com/android/mms/dom/smil/SmilRegionElementImpl.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.dom.smil;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.smil.SMILDocument;
-import org.w3c.dom.smil.SMILRegionElement;
-
-import android.util.Config;
-import android.util.Log;
-
-public class SmilRegionElementImpl extends SmilElementImpl implements
-        SMILRegionElement {
-
-    /*
-     * Internal Interface
-     */
-
-    private static final String HIDDEN_ATTRIBUTE = "hidden";
-    private static final String SLICE_ATTRIBUTE = "slice";
-    private static final String SCROLL_ATTRIBUTE = "scroll";
-    private static final String MEET_ATTRIBUTE = "meet";
-    private static final String FILL_ATTRIBUTE = "fill";
-    private static final String ID_ATTRIBUTE_NAME = "id";
-    private static final String WIDTH_ATTRIBUTE_NAME = "width";
-    private static final String TITLE_ATTRIBUTE_NAME = "title";
-    private static final String HEIGHT_ATTRIBUTE_NAME = "height";
-    private static final String BACKGROUND_COLOR_ATTRIBUTE_NAME = "backgroundColor";
-    private static final String Z_INDEX_ATTRIBUTE_NAME = "z-index";
-    private static final String TOP_ATTRIBUTE_NAME = "top";
-    private static final String LEFT_ATTRIBUTE_NAME = "left";
-    private static final String RIGHT_ATTRIBUTE_NAME = "right";
-    private static final String BOTTOM_ATTRIBUTE_NAME = "bottom";
-    private static final String FIT_ATTRIBUTE_NAME = "fit";
-    private static final String TAG = "SmilRegionElementImpl";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    SmilRegionElementImpl(SmilDocumentImpl owner, String tagName) {
-        super(owner, tagName);
-    }
-
-    /*
-     * SMILRegionElement Interface
-     */
-
-    public String getFit() {
-        String fit = getAttribute(FIT_ATTRIBUTE_NAME);
-        if (FILL_ATTRIBUTE.equalsIgnoreCase(fit)) {
-            return FILL_ATTRIBUTE;
-        } else if (MEET_ATTRIBUTE.equalsIgnoreCase(fit)) {
-            return MEET_ATTRIBUTE;
-        } else if (SCROLL_ATTRIBUTE.equalsIgnoreCase(fit)) {
-            return SCROLL_ATTRIBUTE;
-        } else if (SLICE_ATTRIBUTE.equalsIgnoreCase(fit)) {
-            return SLICE_ATTRIBUTE;
-        } else {
-            return HIDDEN_ATTRIBUTE;
-        }
-    }
-
-    public int getLeft() {
-        try {
-            return parseRegionLength(getAttribute(LEFT_ATTRIBUTE_NAME), true);
-        } catch (NumberFormatException _) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Left attribute is not set or incorrect.");
-            }
-        }
-        try {
-            int bbw = ((SMILDocument) getOwnerDocument()).getLayout().getRootLayout().getWidth();
-            int right = parseRegionLength(getAttribute(RIGHT_ATTRIBUTE_NAME), true);
-            int width = parseRegionLength(getAttribute(WIDTH_ATTRIBUTE_NAME), true);
-            return bbw - right - width;
-        } catch (NumberFormatException _) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Right or width attribute is not set or incorrect.");
-            }
-        }
-        return 0;
-    }
-
-    public int getTop() {
-        try {
-            return parseRegionLength(getAttribute(TOP_ATTRIBUTE_NAME), false);
-        } catch (NumberFormatException _) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Top attribute is not set or incorrect.");
-            }
-        }
-        try {
-            int bbh = ((SMILDocument) getOwnerDocument()).getLayout().getRootLayout().getHeight();
-            int bottom = parseRegionLength(getAttribute(BOTTOM_ATTRIBUTE_NAME), false);
-            int height = parseRegionLength(getAttribute(HEIGHT_ATTRIBUTE_NAME), false);
-            return bbh - bottom - height;
-        } catch (NumberFormatException _) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Bottom or height attribute is not set or incorrect.");
-            }
-        }
-        return 0;
-    }
-
-    public int getZIndex() {
-        try {
-            return Integer.parseInt(this.getAttribute(Z_INDEX_ATTRIBUTE_NAME));
-        } catch (NumberFormatException _) {
-            return 0;
-        }
-    }
-
-    public void setFit(String fit) throws DOMException {
-        if (fit.equalsIgnoreCase(FILL_ATTRIBUTE)
-                || fit.equalsIgnoreCase(MEET_ATTRIBUTE)
-                || fit.equalsIgnoreCase(SCROLL_ATTRIBUTE)
-                || fit.equalsIgnoreCase(SLICE_ATTRIBUTE)) {
-            this.setAttribute(FIT_ATTRIBUTE_NAME, fit.toLowerCase());
-        } else {
-            this.setAttribute(FIT_ATTRIBUTE_NAME, HIDDEN_ATTRIBUTE);
-        }
-    }
-
-    public void setLeft(int left) throws DOMException {
-        this.setAttribute(LEFT_ATTRIBUTE_NAME, String.valueOf(left));
-    }
-
-    public void setTop(int top) throws DOMException {
-        this.setAttribute(TOP_ATTRIBUTE_NAME, String.valueOf(top));
-    }
-
-    public void setZIndex(int zIndex) throws DOMException {
-        if (zIndex > 0) {
-            this.setAttribute(Z_INDEX_ATTRIBUTE_NAME, Integer.toString(zIndex));
-        } else {
-            this.setAttribute(Z_INDEX_ATTRIBUTE_NAME, Integer.toString(0));
-        }
-    }
-
-    public String getBackgroundColor() {
-        return this.getAttribute(BACKGROUND_COLOR_ATTRIBUTE_NAME);
-    }
-
-    public int getHeight() {
-        try {
-            return parseRegionLength(getAttribute(HEIGHT_ATTRIBUTE_NAME), false);
-        } catch (NumberFormatException _) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Height attribute is not set or incorrect.");
-            }
-        }
-        int bbh = ((SMILDocument) getOwnerDocument()).getLayout().getRootLayout().getHeight();
-        try {
-            bbh -= parseRegionLength(getAttribute(TOP_ATTRIBUTE_NAME), false);
-        } catch (NumberFormatException _) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Top attribute is not set or incorrect.");
-            }
-        }
-        try {
-            bbh -= parseRegionLength(getAttribute(BOTTOM_ATTRIBUTE_NAME), false);
-        } catch (NumberFormatException _) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Bottom attribute is not set or incorrect.");
-            }
-        }
-        return bbh;
-    }
-
-    public String getTitle() {
-        return this.getAttribute(TITLE_ATTRIBUTE_NAME);
-    }
-
-    public int getWidth() {
-        try {
-            return parseRegionLength(getAttribute(WIDTH_ATTRIBUTE_NAME), true);
-        } catch (NumberFormatException _) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Width attribute is not set or incorrect.");
-            }
-        }
-        int bbw = ((SMILDocument) getOwnerDocument()).getLayout().getRootLayout().getWidth();
-        try {
-            bbw -= parseRegionLength(getAttribute(LEFT_ATTRIBUTE_NAME), true);
-        } catch (NumberFormatException _) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Left attribute is not set or incorrect.");
-            }
-        }
-        try {
-            bbw -= parseRegionLength(getAttribute(RIGHT_ATTRIBUTE_NAME), true);
-        } catch (NumberFormatException _) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Right attribute is not set or incorrect.");
-            }
-        }
-        return bbw;
-    }
-
-    public void setBackgroundColor(String backgroundColor) throws DOMException {
-        this.setAttribute(BACKGROUND_COLOR_ATTRIBUTE_NAME, backgroundColor);
-    }
-
-    public void setHeight(int height) throws DOMException {
-        this.setAttribute(HEIGHT_ATTRIBUTE_NAME, String.valueOf(height) + "px");
-    }
-
-    public void setTitle(String title) throws DOMException {
-        this.setAttribute(TITLE_ATTRIBUTE_NAME, title);
-    }
-
-    public void setWidth(int width) throws DOMException {
-        this.setAttribute(WIDTH_ATTRIBUTE_NAME, String.valueOf(width) + "px");
-    }
-
-    /*
-     * SMILElement Interface
-     */
-
-    @Override
-    public String getId() {
-        return this.getAttribute(ID_ATTRIBUTE_NAME);
-    }
-
-    @Override
-    public void setId(String id) throws DOMException {
-        this.setAttribute(ID_ATTRIBUTE_NAME, id);
-    }
-
-    /*
-     * Internal Interface
-     */
-
-    private int parseRegionLength(String length, boolean horizontal) {
-        if (length.endsWith("px")) {
-            length = length.substring(0, length.indexOf("px"));
-            return Integer.parseInt(length);
-        } else if (length.endsWith("%")) {
-            double value = 0.01*Integer.parseInt(length.substring(0, length.length() - 1));
-            if (horizontal) {
-                value *= ((SMILDocument) getOwnerDocument()).getLayout().getRootLayout().getWidth();
-            } else {
-                value *= ((SMILDocument) getOwnerDocument()).getLayout().getRootLayout().getHeight();
-            }
-            return (int) Math.round(value);
-        } else {
-            return Integer.parseInt(length);
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see java.lang.Object#toString()
-     */
-    @Override
-    public String toString() {
-        return super.toString()
-                + ": id=" + getId()
-                + ", width=" + getWidth()
-                + ", height=" + getHeight()
-                + ", left=" + getLeft()
-                + ", top=" + getTop();
-    }
-}
diff --git a/src/com/android/mms/dom/smil/SmilRegionMediaElementImpl.java b/src/com/android/mms/dom/smil/SmilRegionMediaElementImpl.java
deleted file mode 100644
index 21a70e3..0000000
--- a/src/com/android/mms/dom/smil/SmilRegionMediaElementImpl.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.smil;
-
-import org.w3c.dom.NodeList;
-import org.w3c.dom.smil.SMILDocument;
-import org.w3c.dom.smil.SMILRegionElement;
-import org.w3c.dom.smil.SMILRegionMediaElement;
-
-public class SmilRegionMediaElementImpl extends SmilMediaElementImpl implements
-        SMILRegionMediaElement {
-    private SMILRegionElement mRegion;
-
-    SmilRegionMediaElementImpl(SmilDocumentImpl owner, String tagName) {
-        super(owner, tagName);
-    }
-
-    public SMILRegionElement getRegion() {
-        if (mRegion == null) {
-            SMILDocument doc = (SMILDocument)this.getOwnerDocument();
-            NodeList regions = doc.getLayout().getElementsByTagName("region");
-            SMILRegionElement region = null;
-            for (int i = 0; i < regions.getLength(); i++) {
-                region = (SMILRegionElement)regions.item(i);
-                if (region.getId().equals(this.getAttribute("region"))) {
-                    mRegion = region;
-                }
-            }
-        }
-        return mRegion;
-    }
-
-    public void setRegion(SMILRegionElement region) {
-        this.setAttribute("region", region.getId());
-        mRegion = region;
-    }
-
-}
diff --git a/src/com/android/mms/dom/smil/SmilRootLayoutElementImpl.java b/src/com/android/mms/dom/smil/SmilRootLayoutElementImpl.java
deleted file mode 100644
index 109ae07..0000000
--- a/src/com/android/mms/dom/smil/SmilRootLayoutElementImpl.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.smil;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.smil.SMILRootLayoutElement;
-
-public class SmilRootLayoutElementImpl extends SmilElementImpl implements
-        SMILRootLayoutElement {
-
-    private static final String WIDTH_ATTRIBUTE_NAME = "width";
-    private static final String HEIGHT_ATTRIBUTE_NAME = "height";
-    private static final String BACKGROUND_COLOR_ATTRIBUTE_NAME = "backgroundColor";
-    private static final String TITLE_ATTRIBUTE_NAME = "title";
-
-    SmilRootLayoutElementImpl(SmilDocumentImpl owner, String tagName) {
-        super(owner, tagName);
-    }
-
-    public String getBackgroundColor() {
-        return this.getAttribute(BACKGROUND_COLOR_ATTRIBUTE_NAME);
-    }
-
-    public int getHeight() {
-        String heightString = this.getAttribute(HEIGHT_ATTRIBUTE_NAME);
-        return parseAbsoluteLength(heightString);
-    }
-
-    public String getTitle() {
-        return this.getAttribute(TITLE_ATTRIBUTE_NAME);
-    }
-
-    public int getWidth() {
-        String widthString = this.getAttribute(WIDTH_ATTRIBUTE_NAME);
-        return parseAbsoluteLength(widthString);
-    }
-
-    public void setBackgroundColor(String backgroundColor) throws DOMException {
-        this.setAttribute(BACKGROUND_COLOR_ATTRIBUTE_NAME, backgroundColor);
-    }
-
-    public void setHeight(int height) throws DOMException {
-        this.setAttribute(HEIGHT_ATTRIBUTE_NAME, String.valueOf(height) + "px");
-
-    }
-
-    public void setTitle(String title) throws DOMException {
-        this.setAttribute(TITLE_ATTRIBUTE_NAME, title);
-    }
-
-    public void setWidth(int width) throws DOMException {
-        this.setAttribute(WIDTH_ATTRIBUTE_NAME, String.valueOf(width) + "px");
-    }
-
-    /*
-     * Internal Interface
-     */
-
-    private int parseAbsoluteLength(String length) {
-        if (length.endsWith("px")) {
-            length = length.substring(0, length.indexOf("px"));
-        }
-        try {
-            return Integer.parseInt(length);
-        } catch (NumberFormatException e) {
-            return 0;
-        }
-    }
-}
diff --git a/src/com/android/mms/dom/smil/TimeImpl.java b/src/com/android/mms/dom/smil/TimeImpl.java
deleted file mode 100644
index f945c71..0000000
--- a/src/com/android/mms/dom/smil/TimeImpl.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.dom.smil;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.smil.Time;
-
-public class TimeImpl implements Time {
-    static final int ALLOW_INDEFINITE_VALUE = (1 << 0);
-    static final int ALLOW_OFFSET_VALUE     = (1 << 1);
-    static final int ALLOW_SYNCBASE_VALUE   = (1 << 2);
-    static final int ALLOW_SYNCTOPREV_VALUE = (1 << 3);
-    static final int ALLOW_EVENT_VALUE      = (1 << 4);
-    static final int ALLOW_MARKER_VALUE     = (1 << 5);
-    static final int ALLOW_WALLCLOCK_VALUE  = (1 << 6);
-    static final int ALLOW_NEGATIVE_VALUE   = (1 << 7);
-    static final int ALLOW_ALL              = 0xFF;
-
-    short mTimeType;
-    boolean mResolved;
-    double mResolvedOffset;
-
-    /**
-     * Creates a TimeImpl representation of a time-value represented as a String.
-     * Time-values have the following syntax:
-     * <p>
-     * <pre>
-     * Time-val ::= ( smil-1.0-syncbase-value
-     *                          | "indefinite"
-     *                          | offset-value
-     *                          | syncbase-value
-     *                          | syncToPrev-value
-     *                          | event-value
-     *                          | media-marker-value
-     *                          | wallclock-sync-value )
-     * Smil-1.0-syncbase-value ::=
-     *          "id(" id-ref ")" ( "(" ( "begin" | "end" | clock-value ) ")" )?
-     * Offset-value         ::= ( "+" | "-" )? clock-value
-     * Syncbase-value       ::= ( id-ref "." ( "begin" | "end" ) ) ( ( "+" | "-" ) clock-value )?
-     * SyncToPrev-value     ::= ( "prev.begin" | "prev.end" ) ( ( "+" | "-" ) clock-value )?
-     * Event-value          ::= ( id-ref "." )? ( event-ref  ) ( ( "+" | "-" ) clock-value )?
-     * Media-marker-value   ::= id-ref ".marker(" marker-name ")"
-     * Wallclock-sync-value ::= "wallclock(" wallclock-value ")"
-     * </pre>
-     *
-     * @param timeValue A String in the representation specified above
-     * @param constraints Any combination of the #ALLOW_* flags
-     * @return  A TimeImpl instance representing
-     * @exception java.lang.IllegalArgumentException if the timeValue input
-     *          parameter does not comply with the defined syntax
-     * @exception java.lang.NullPointerException if the timekValue string is
-     *          <code>null</code>
-     */
-    TimeImpl(String timeValue, int constraints) {
-        /*
-         * We do not support yet:
-         *      - smil-1.0-syncbase-value
-         *      - syncbase-value
-         *      - syncToPrev-value
-         *      - event-value
-         *      - Media-marker-value
-         *      - Wallclock-sync-value
-         */
-        // Will throw NullPointerException if timeValue is null
-        if (timeValue.equals("indefinite")
-                && ((constraints & ALLOW_INDEFINITE_VALUE) != 0) ) {
-            mTimeType = SMIL_TIME_INDEFINITE;
-        } else if ((constraints & ALLOW_OFFSET_VALUE) != 0) {
-            int sign = 1;
-            if (timeValue.startsWith("+")) {
-                timeValue = timeValue.substring(1);
-            } else if (timeValue.startsWith("-")) {
-                timeValue = timeValue.substring(1);
-                sign = -1;
-            }
-            mResolvedOffset = sign*parseClockValue(timeValue)/1000.0;
-            mResolved = true;
-            mTimeType = SMIL_TIME_OFFSET;
-        } else {
-            throw new IllegalArgumentException("Unsupported time value");
-        }
-    }
-
-    /**
-     * Converts a String representation of a clock value into the float
-     * representation used in this API.
-     * <p>
-     * Clock values have the following syntax:
-     * </p>
-     * <p>
-     * <pre>
-     * Clock-val         ::= ( Full-clock-val | Partial-clock-val | Timecount-val )
-     * Full-clock-val    ::= Hours ":" Minutes ":" Seconds ("." Fraction)?
-     * Partial-clock-val ::= Minutes ":" Seconds ("." Fraction)?
-     * Timecount-val     ::= Timecount ("." Fraction)? (Metric)?
-     * Metric            ::= "h" | "min" | "s" | "ms"
-     * Hours             ::= DIGIT+; any positive number
-     * Minutes           ::= 2DIGIT; range from 00 to 59
-     * Seconds           ::= 2DIGIT; range from 00 to 59
-     * Fraction          ::= DIGIT+
-     * Timecount         ::= DIGIT+
-     * 2DIGIT            ::= DIGIT DIGIT
-     * DIGIT             ::= [0-9]
-     * </pre>
-     *
-     * @param clockValue A String in the representation specified above
-     * @return  A float value in milliseconds that matches the string
-     *          representation given as the parameter
-     * @exception java.lang.IllegalArgumentException if the clockValue input
-     *          parameter does not comply with the defined syntax
-     * @exception java.lang.NullPointerException if the clockValue string is
-     *          <code>null</code>
-     */
-    public static float parseClockValue(String clockValue) {
-        try {
-            float result = 0;
-
-            // Will throw NullPointerException if clockValue is null
-            clockValue = clockValue.trim();
-
-            // Handle first 'Timecount-val' cases with metric
-            if (clockValue.endsWith("ms")) {
-                result = parseFloat(clockValue, 2, true);
-            } else if (clockValue.endsWith("s")) {
-                result = 1000*parseFloat(clockValue, 1, true);
-            } else if (clockValue.endsWith("min")) {
-                result = 60000*parseFloat(clockValue, 3, true);
-            } else if (clockValue.endsWith("h")) {
-                result = 3600000*parseFloat(clockValue, 1, true);
-            } else {
-                // Handle Timecount-val without metric
-                try {
-                    return parseFloat(clockValue, 0, true) * 1000;
-                } catch (NumberFormatException _) {
-                    // Ignore
-                }
-
-                // Split in {[Hours], Minutes, Seconds}
-                String[] timeValues = clockValue.split(":");
-
-                // Read Hours if present and remember location of Minutes
-                int indexOfMinutes;
-                if (timeValues.length == 2) {
-                    indexOfMinutes = 0;
-                } else if (timeValues.length == 3) {
-                    result = 3600000*(int)parseFloat(timeValues[0], 0, false);
-                    indexOfMinutes = 1;
-                } else {
-                    throw new IllegalArgumentException();
-                }
-
-                // Read Minutes
-                int minutes = (int)parseFloat(timeValues[indexOfMinutes], 0, false);
-                if ((minutes >= 00) && (minutes <= 59)) {
-                    result += 60000*minutes;
-                } else {
-                    throw new IllegalArgumentException();
-                }
-
-                // Read Seconds
-                float seconds = parseFloat(timeValues[indexOfMinutes + 1], 0, true);
-                if ((seconds >= 00) && (seconds < 60)) {
-                    result += 60000*seconds;
-                } else {
-                    throw new IllegalArgumentException();
-                }
-
-            }
-            return result;
-        } catch (NumberFormatException e) {
-            throw new IllegalArgumentException();
-        }
-    }
-
-    /**
-     * Parse a value formatted as follows:
-     * <p>
-     * <pre>
-     * Value    ::= Number ("." Decimal)? (Text)?
-     * Number   ::= DIGIT+; any positive number
-     * Decimal  ::= DIGIT+; any positive number
-     * Text     ::= CHAR*;   any sequence of chars
-     * DIGIT    ::= [0-9]
-     * </pre>
-     * @param value The Value to parse
-     * @param ignoreLast The size of Text to ignore
-     * @param parseDecimal Whether Decimal is expected
-     * @return The float value without Text, rounded to 3 digits after '.'
-     * @throws IllegalArgumentException if Decimal was not expected but encountered
-     */
-    private static float parseFloat(String value, int ignoreLast, boolean parseDecimal) {
-        // Ignore last characters
-        value = value.substring(0, value.length() - ignoreLast);
-
-        float result;
-        int indexOfComma = value.indexOf('.');
-        if (indexOfComma != -1) {
-            if (!parseDecimal) {
-                throw new IllegalArgumentException("int value contains decimal");
-            }
-            // Ensure that there are at least 3 decimals
-            value = value + "000";
-            // Read value up to 3 decimals and cut the rest
-            result = Float.parseFloat(value.substring(0, indexOfComma));
-            result += Float.parseFloat(
-                    value.substring(indexOfComma + 1, indexOfComma + 4))/1000;
-        } else {
-            result = Integer.parseInt(value);
-        }
-
-        return result;
-    }
-
-    /*
-     * Time Interface
-     */
-
-    public boolean getBaseBegin() {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    public Element getBaseElement() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public String getEvent() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public String getMarker() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public double getOffset() {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    public boolean getResolved() {
-        return mResolved;
-    }
-
-    public double getResolvedOffset() {
-        return mResolvedOffset;
-    }
-
-    public short getTimeType() {
-        return mTimeType;
-    }
-
-    public void setBaseBegin(boolean baseBegin) throws DOMException {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setBaseElement(Element baseElement) throws DOMException {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setEvent(String event) throws DOMException {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setMarker(String marker) throws DOMException {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setOffset(double offset) throws DOMException {
-        // TODO Auto-generated method stub
-
-    }
-}
diff --git a/src/com/android/mms/dom/smil/TimeListImpl.java b/src/com/android/mms/dom/smil/TimeListImpl.java
deleted file mode 100644
index a844df1..0000000
--- a/src/com/android/mms/dom/smil/TimeListImpl.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.smil;
-
-import java.util.ArrayList;
-
-import org.w3c.dom.smil.Time;
-import org.w3c.dom.smil.TimeList;
-
-public class TimeListImpl implements TimeList {
-    private final ArrayList<Time> mTimes;
-
-    /*
-     * Internal Interface
-     */
-    TimeListImpl(ArrayList<Time> times) {
-        mTimes = times;
-    }
-
-    /*
-     * TimeList Interface
-     */
-
-    public int getLength() {
-        return mTimes.size();
-    }
-
-    public Time item(int index) {
-        Time time = null;
-        try {
-            time = mTimes.get(index);
-        } catch (IndexOutOfBoundsException e) {
-            // Do nothing and return null
-        }
-        return time;
-    }
-
-}
diff --git a/src/com/android/mms/dom/smil/parser/SmilContentHandler.java b/src/com/android/mms/dom/smil/parser/SmilContentHandler.java
deleted file mode 100644
index 7bdc5d3..0000000
--- a/src/com/android/mms/dom/smil/parser/SmilContentHandler.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.dom.smil.parser;
-
-import android.util.Config;
-import android.util.Log;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.helpers.DefaultHandler;
-import org.w3c.dom.smil.SMILDocument;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-import com.android.mms.dom.smil.SmilDocumentImpl;
-
-public class SmilContentHandler extends DefaultHandler {
-    private static final String TAG = "SmilContentHandler";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private SMILDocument mSmilDocument;
-    private Node mCurrentNode;
-
-    /**
-     * Resets this handler.
-     *
-     */
-    public void reset() {
-        mSmilDocument = new SmilDocumentImpl();
-        mCurrentNode = mSmilDocument;
-    }
-
-    /**
-     * Returns the SMILDocument.
-     * @return The SMILDocument instance
-     */
-    public SMILDocument getSmilDocument() {
-        return mSmilDocument;
-    }
-
-    @Override
-    public void startElement(String uri, String localName, String qName, Attributes attributes) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "SmilContentHandler.startElement. Creating element " + localName);
-        }
-        Element element = mSmilDocument.createElement(localName);
-        if (attributes != null) {
-            for (int i = 0; i < attributes.getLength(); i++) {
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "Attribute " + i +
-                        " lname = " + attributes.getLocalName(i) +
-                        " value = " + attributes.getValue(i));
-                }
-                element.setAttribute(attributes.getLocalName(i),
-                        attributes.getValue(i));
-            }
-        }
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Appending " + localName + " to " + mCurrentNode.getNodeName());
-        }
-        mCurrentNode.appendChild(element);
-
-        mCurrentNode = element;
-    }
-
-    @Override
-    public void endElement(String uri, String localName, String qName) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "SmilContentHandler.endElement. localName " + localName);
-        }
-        mCurrentNode = mCurrentNode.getParentNode();
-    }
-
-    @Override
-    public void characters(char[] ch, int start, int length) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "SmilContentHandler.characters. ch = " + new String(ch, start, length));
-        }
-    }
-}
diff --git a/src/com/android/mms/dom/smil/parser/SmilXmlParser.java b/src/com/android/mms/dom/smil/parser/SmilXmlParser.java
deleted file mode 100644
index d342ccd..0000000
--- a/src/com/android/mms/dom/smil/parser/SmilXmlParser.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.smil.parser;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
-import org.w3c.dom.smil.SMILDocument;
-
-import com.google.android.mms.MmsException;
-import com.android.mms.dom.smil.parser.SmilContentHandler;
-
-public class SmilXmlParser {
-    private XMLReader mXmlReader;
-    private SmilContentHandler mContentHandler;
-
-    public SmilXmlParser() throws MmsException {
-        //FIXME: Now we don't have the SAXParser wrapped inside,
-        //       use the Driver class temporarily.
-        System.setProperty("org.xml.sax.driver", "org.xmlpull.v1.sax2.Driver");
-
-        try {
-            mXmlReader = XMLReaderFactory.createXMLReader();
-            mContentHandler = new SmilContentHandler();
-            mXmlReader.setContentHandler(mContentHandler);
-        } catch (SAXException e) {
-            throw new MmsException(e);
-        }
-    }
-
-    public SMILDocument parse(InputStream in) throws IOException, SAXException {
-        mContentHandler.reset();
-
-        mXmlReader.parse(new InputSource(in));
-
-        SMILDocument doc = mContentHandler.getSmilDocument();
-        validateDocument(doc);
-
-        return doc;
-    }
-
-    private void validateDocument(SMILDocument doc) {
-        /*
-         * Calling getBody() will create "smil", "head", and "body" elements if they
-         * are not present. It will also initialize the SequentialTimeElementContainer
-         * member of SMILDocument, which could not be set on creation of the document.
-         * @see com.android.mms.dom.smil.SmilDocumentImpl#getBody()
-         */
-        doc.getBody();
-
-        /*
-         * Calling getLayout() will create "layout" element if it is not present.
-         * @see com.android.mms.dom.smil.SmilDocumentImpl#getLayout()
-         */
-        doc.getLayout();
-    }
-}
diff --git a/src/com/android/mms/dom/smil/parser/SmilXmlSerializer.java b/src/com/android/mms/dom/smil/parser/SmilXmlSerializer.java
deleted file mode 100644
index 05e3703..0000000
--- a/src/com/android/mms/dom/smil/parser/SmilXmlSerializer.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.dom.smil.parser;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.smil.SMILDocument;
-import org.w3c.dom.smil.SMILElement;
-
-public class SmilXmlSerializer {
-    public static void serialize(SMILDocument smilDoc, OutputStream out) {
-        try {
-            Writer writer = new BufferedWriter(new OutputStreamWriter(out, "UTF-8"), 2048);
-
-            writeElement(writer, smilDoc.getDocumentElement());
-            writer.flush();
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-    private static void writeElement(Writer writer, Element element)
-            throws IOException {
-        writer.write('<');
-        writer.write(element.getTagName());
-
-        if (element.hasAttributes()) {
-            NamedNodeMap attributes = element.getAttributes();
-            for (int i = 0; i < attributes.getLength(); i++) {
-                Attr attribute = (Attr)attributes.item(i);
-                writer.write(" " + attribute.getName());
-                writer.write("=\"" + attribute.getValue() + "\"");
-            }
-        }
-
-        // FIXME: Might throw ClassCastException
-        SMILElement childElement = (SMILElement) element.getFirstChild();
-
-        if (childElement != null) {
-            writer.write('>');
-
-            do {
-                writeElement(writer, childElement);
-                childElement = (SMILElement) childElement.getNextSibling();
-            } while (childElement != null);
-
-            writer.write("</");
-            writer.write(element.getTagName());
-            writer.write('>');
-        } else {
-            writer.write("/>");
-        }
-    }
-}
-
diff --git a/src/com/android/mms/drm/DrmUtils.java b/src/com/android/mms/drm/DrmUtils.java
deleted file mode 100644
index 087818e..0000000
--- a/src/com/android/mms/drm/DrmUtils.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.drm;
-
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.net.Uri;
-import android.util.Log;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class DrmUtils {
-    private static final String TAG = "DrmUtils";
-    private static final Uri DRM_TEMP_URI = Uri.parse("content://mms/drm");
-
-    private DrmUtils() {
-    }
-
-    public static void cleanupStorage(Context context) {
-        SqliteWrapper.delete(context, context.getContentResolver(),
-                DRM_TEMP_URI, null, null);
-    }
-
-    public static Uri insert(Context context, DrmWrapper drmObj)
-            throws IOException {
-        ContentResolver cr = context.getContentResolver();
-        Uri uri = SqliteWrapper.insert(context, cr, DRM_TEMP_URI,
-                                       new ContentValues(0));
-        OutputStream os = null;
-        try {
-            os = cr.openOutputStream(uri);
-            byte[] data = drmObj.getDecryptedData();
-            if (data != null) {
-                os.write(data);
-            }
-            return uri;
-        } finally {
-            if (os != null) {
-                try {
-                    os.close();
-                } catch (IOException e) {
-                    Log.e(TAG, e.getMessage(), e);
-                }
-            }
-        }
-    }
-}
diff --git a/src/com/android/mms/drm/DrmWrapper.java b/src/com/android/mms/drm/DrmWrapper.java
deleted file mode 100644
index 305ed6e..0000000
--- a/src/com/android/mms/drm/DrmWrapper.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.drm;
-
-import com.google.android.mms.ContentType;
-
-import android.drm.mobile1.DrmException;
-import android.drm.mobile1.DrmRawContent;
-import android.drm.mobile1.DrmRights;
-import android.drm.mobile1.DrmRightsManager;
-import android.net.Uri;
-import android.util.Config;
-import android.util.Log;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * The Drm Wrapper.
- */
-public class DrmWrapper {
-    /**
-     * The DRM right object.
-     */
-    private DrmRights mRight;
-
-    /**
-     * The DrmRawContent.
-     */
-    private final DrmRawContent mDrmObject;
-
-    private final Uri mDataUri;
-    private final byte[] mData;
-    /**
-     * The decrypted data.
-     */
-    private byte[] mDecryptedData;
-
-    /**
-     * The log tag.
-     */
-    private static final String LOG_TAG = "DrmWrapper";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    /**
-     * Constructor.
-     * @param uri
-     */
-    public DrmWrapper(String drmContentType, Uri uri, byte[] drmData)
-            throws DrmException, IOException {
-        if ((drmContentType == null) || (drmData == null)) {
-            throw new IllegalArgumentException(
-                    "Content-Type or data may not be null.");
-        }
-
-        mDataUri = uri;
-        mData = drmData;
-
-        ByteArrayInputStream drmDataStream = new ByteArrayInputStream(drmData);
-        mDrmObject = new DrmRawContent(drmDataStream, drmDataStream.available(),
-                                       drmContentType);
-        // Install rights if necessary.
-        if (!isRightsInstalled()) {
-            if (LOCAL_LOGV) {
-                Log.v(LOG_TAG, "DRM rights not installed yet.");
-            }
-            installRights(drmData);
-        }
-    }
-
-    /**
-     * Get permission type for the decrypted content-type.
-     *
-     * @return the permission
-     */
-    private int getPermission() {
-        String contentType = mDrmObject.getContentType();
-
-        if (ContentType.isAudioType(contentType) ||
-                ContentType.isVideoType(contentType)) {
-            return DrmRights.DRM_PERMISSION_PLAY;
-        }
-        return DrmRights.DRM_PERMISSION_DISPLAY;
-    }
-
-    /**
-     * Get decrypted data.
-     *
-     * @return the decrypted content if decryption was successful.
-     * @throws IOException
-     */
-    public byte[] getDecryptedData() throws IOException {
-        if ((mDecryptedData == null) && (mRight != null)) {
-            // Decrypt it.
-            InputStream decryptedDataStream = mDrmObject.getContentInputStream(mRight);
-            try {
-                ByteArrayOutputStream baos = new ByteArrayOutputStream();
-                byte[] buffer = new byte[256];
-                int len;
-                while ((len = decryptedDataStream.read(buffer)) > 0) {
-                    baos.write(buffer, 0, len);
-                }
-                mDecryptedData = baos.toByteArray();
-            } finally {
-                try {
-                    decryptedDataStream.close();
-                } catch (IOException e) {
-                    Log.e(LOG_TAG, e.getMessage(), e);
-                }
-            }
-        }
-
-        if (mDecryptedData != null) {
-            byte[] decryptedData = new byte[mDecryptedData.length];
-            System.arraycopy(mDecryptedData, 0, decryptedData, 0, mDecryptedData.length);
-            return decryptedData;
-        }
-        return null;
-    }
-
-    /**
-     * Consume the rights.
-     *
-     * @return true if consume success
-     *         false if consume failure
-     */
-    public boolean consumeRights() {
-        if (mRight == null) {
-            return false;
-        }
-
-        return mRight.consumeRights(getPermission());
-    }
-
-    /**
-     * Install Right.
-     *
-     * @param rightData right's data
-     * @throws IOException
-     * @throws DrmException
-     */
-    public void installRights(byte[] rightData) throws DrmException, IOException {
-        if (rightData == null) {
-            throw new DrmException("Right data may not be null.");
-        }
-
-        if (LOCAL_LOGV) {
-            Log.v(LOG_TAG, "Installing DRM rights.");
-        }
-
-        ByteArrayInputStream rightDataStream = new ByteArrayInputStream(rightData);
-        mRight = DrmRightsManager.getInstance().installRights(
-                rightDataStream, rightData.length,
-                DrmRawContent.DRM_MIMETYPE_MESSAGE_STRING);
-    }
-
-    /**
-     * Check whether the DRM object's right is existed. If not, we should
-     * download it.
-     *
-     * @return true if it is existed
-     *         false if not
-     */
-    public boolean isRightsInstalled() {
-        if (mRight != null) {
-            return true;
-        }
-
-        mRight = DrmRightsManager.getInstance().queryRights(mDrmObject);
-        return mRight != null ? true : false;
-    }
-
-    /**
-     * Check whether this DRM object can be forwarded.
-     *
-     * @return true if this object can be forwarded
-     *         false if not
-     */
-    public boolean isAllowedToForward() {
-        if (DrmRawContent.DRM_SEPARATE_DELIVERY != mDrmObject.getRawType()) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Check whether a object is DRM object.
-     *
-     * @param contentType the mimetype of the object
-     * @return true if it is
-     *         false if not
-     */
-    public static boolean isDrmObject(String contentType) {
-        if (contentType == null) {
-            return false;
-        }
-
-        if (contentType.equalsIgnoreCase(DrmRawContent.DRM_MIMETYPE_CONTENT_STRING) ||
-                contentType.equalsIgnoreCase(DrmRawContent.DRM_MIMETYPE_MESSAGE_STRING)) {
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * Get URL of right.
-     *
-     * @return the right's URL
-     */
-    public String getRightsAddress() {
-        if (mDrmObject == null) {
-            return null;
-        }
-        return mDrmObject.getRightsAddress();
-    }
-
-    /**
-     * Get the decrypted object's content-type.
-     *
-     * @return the content-type
-     */
-    public String getContentType() {
-        return mDrmObject.getContentType();
-    }
-
-    public Uri getOriginalUri() {
-        return mDataUri;
-    }
-
-    public byte[] getOriginalData() {
-        return mData;
-    }
-}
diff --git a/src/com/android/mms/layout/HVGALayoutParameters.java b/src/com/android/mms/layout/HVGALayoutParameters.java
deleted file mode 100644
index 4d99a68..0000000
--- a/src/com/android/mms/layout/HVGALayoutParameters.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.layout;
-
-import android.util.Config;
-import android.util.Log;
-
-public class HVGALayoutParameters implements LayoutParameters {
-    private static final String TAG = "HVGALayoutParameters";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private int mType = -1;
-
-    private static final int IMAGE_HEIGHT_LANDSCAPE = 240;
-    private static final int TEXT_HEIGHT_LANDSCAPE  = 80;
-    private static final int IMAGE_HEIGHT_PORTRAIT  = 320;
-    private static final int TEXT_HEIGHT_PORTRAIT   = 160;
-
-    public HVGALayoutParameters(int type) {
-        if ((type != HVGA_LANDSCAPE) && (type != HVGA_PORTRAIT)) {
-            throw new IllegalArgumentException(
-                    "Bad layout type detected: " + type);
-        }
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "HVGALayoutParameters.<init>(" + type + ").");
-        }
-        mType = type;
-    }
-
-    public int getWidth() {
-        return mType == HVGA_LANDSCAPE ? HVGA_LANDSCAPE_WIDTH
-                                       : HVGA_PORTRAIT_WIDTH;
-    }
-
-    public int getHeight() {
-        return mType == HVGA_LANDSCAPE ? HVGA_LANDSCAPE_HEIGHT
-                                       : HVGA_PORTRAIT_HEIGHT;
-    }
-
-    public int getImageHeight() {
-        return mType == HVGA_LANDSCAPE ? IMAGE_HEIGHT_LANDSCAPE
-                                       : IMAGE_HEIGHT_PORTRAIT;
-    }
-
-    public int getTextHeight() {
-        return mType == HVGA_LANDSCAPE ? TEXT_HEIGHT_LANDSCAPE
-                                       : TEXT_HEIGHT_PORTRAIT;
-    }
-
-    public int getType() {
-        return mType;
-    }
-
-    public String getTypeDescription() {
-        return mType == HVGA_LANDSCAPE ? "HVGA-L" : "HVGA-P";
-    }
-}
diff --git a/src/com/android/mms/layout/LayoutManager.java b/src/com/android/mms/layout/LayoutManager.java
deleted file mode 100644
index 0de0103..0000000
--- a/src/com/android/mms/layout/LayoutManager.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.layout;
-
-import android.content.Context;
-import android.content.res.Configuration;
-import android.util.Config;
-import android.util.Log;
-import android.view.Display;
-import android.view.WindowManager;
-
-/**
- * MMS presentation layout management.
- */
-public class LayoutManager {
-    private static final String TAG = "LayoutManager";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private final Context mContext;
-    private LayoutParameters mLayoutParams;
-
-    private static LayoutManager sInstance;
-
-    private LayoutManager(Context context) {
-        mContext = context;
-        initLayoutParameters(context.getResources().getConfiguration());
-    }
-
-    private void initLayoutParameters(Configuration configuration) {
-        mLayoutParams = getLayoutParameters(
-                configuration.orientation == Configuration.ORIENTATION_PORTRAIT
-                ? LayoutParameters.HVGA_PORTRAIT
-                : LayoutParameters.HVGA_LANDSCAPE);
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "LayoutParameters: " + mLayoutParams.getTypeDescription()
-                    + ": " + mLayoutParams.getWidth() + "x" + mLayoutParams.getHeight());
-        }
-    }
-
-    private static LayoutParameters getLayoutParameters(int displayType) {
-        switch (displayType) {
-            case LayoutParameters.HVGA_LANDSCAPE:
-                return new HVGALayoutParameters(LayoutParameters.HVGA_LANDSCAPE);
-            case LayoutParameters.HVGA_PORTRAIT:
-                return new HVGALayoutParameters(LayoutParameters.HVGA_PORTRAIT);
-        }
-
-        throw new IllegalArgumentException(
-                "Unsupported display type: " + displayType);
-    }
-
-    public static void init(Context context) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "DefaultLayoutManager.init()");
-        }
-
-        if (sInstance != null) {
-            Log.w(TAG, "Already initialized.");
-        }
-        sInstance = new LayoutManager(context);
-    }
-
-    public static LayoutManager getInstance() {
-        if (sInstance == null) {
-            throw new IllegalStateException("Uninitialized.");
-        }
-        return sInstance;
-    }
-
-    public void onConfigurationChanged(Configuration newConfig) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "-> LayoutManager.onConfigurationChanged().");
-        }
-        initLayoutParameters(newConfig);
-    }
-
-    public int getLayoutType() {
-        return mLayoutParams.getType();
-    }
-
-    public int getLayoutWidth() {
-        return mLayoutParams.getWidth();
-    }
-
-    public int getLayoutHeight() {
-        return mLayoutParams.getHeight();
-    }
-
-    public LayoutParameters getLayoutParameters() {
-        return mLayoutParams;
-    }
-}
diff --git a/src/com/android/mms/layout/LayoutParameters.java b/src/com/android/mms/layout/LayoutParameters.java
deleted file mode 100644
index e9711db..0000000
--- a/src/com/android/mms/layout/LayoutParameters.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.layout;
-
-public interface LayoutParameters {
-    /* Layouts type definition */
-    public static final int UNKNOWN        = -1;
-    public static final int HVGA_LANDSCAPE = 10;
-    public static final int HVGA_PORTRAIT  = 11;
-
-    /* Parameters for known layouts */
-    public static final int HVGA_LANDSCAPE_WIDTH  = 480;
-    public static final int HVGA_LANDSCAPE_HEIGHT = 320;
-    public static final int HVGA_PORTRAIT_WIDTH   = 320;
-    public static final int HVGA_PORTRAIT_HEIGHT  = 480;
-
-    /**
-     * Get the width of current layout.
-     */
-    int getWidth();
-    /**
-     * Get the height of current layout.
-     */
-    int getHeight();
-    /**
-     * Get the width of the image region of current layout.
-     */
-    int getImageHeight();
-    /**
-     * Get the height of the text region of current layout.
-     */
-    int getTextHeight();
-    /**
-     * Get the type of current layout.
-     */
-    int getType();
-    /**
-     * Get the type description of current layout.
-     */
-    String getTypeDescription();
-}
diff --git a/src/com/android/mms/model/AudioModel.java b/src/com/android/mms/model/AudioModel.java
deleted file mode 100644
index 7e67be7..0000000
--- a/src/com/android/mms/model/AudioModel.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-import com.android.mms.ContentRestrictionException;
-import com.android.mms.dom.smil.SmilMediaElementImpl;
-import com.android.mms.drm.DrmWrapper;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.util.SqliteWrapper;
-
-import org.w3c.dom.events.Event;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.database.Cursor;
-import android.net.Uri;
-import android.provider.MediaStore.Audio;
-import android.provider.Telephony.Mms.Part;
-import android.text.TextUtils;
-import android.util.Config;
-import android.util.Log;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-public class AudioModel extends MediaModel {
-    private static final String TAG = "AudioModel";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private final HashMap<String, String> mExtras;
-
-    public AudioModel(Context context, Uri uri) throws MmsException {
-        this(context, null, null, uri);
-        initModelFromUri(uri);
-        checkContentRestriction();
-    }
-
-    public AudioModel(Context context, String contentType, String src, Uri uri) throws MmsException {
-        super(context, SmilHelper.ELEMENT_TAG_AUDIO, contentType, src, uri);
-        mExtras = new HashMap<String, String>();
-    }
-
-    public AudioModel(Context context, String contentType, String src,
-            DrmWrapper wrapper) throws IOException {
-        super(context, SmilHelper.ELEMENT_TAG_AUDIO, contentType, src, wrapper);
-        mExtras = new HashMap<String, String>();
-    }
-
-    private void initModelFromUri(Uri uri) throws MmsException {
-        ContentResolver cr = mContext.getContentResolver();
-        Cursor c = SqliteWrapper.query(mContext, cr, uri, null, null, null, null);
-
-        if (c != null) {
-            try {
-                if (c.moveToFirst()) {
-                    String path;
-                    boolean isFromMms = isMmsUri(uri);
-
-                    // FIXME We suppose that there should be only two sources
-                    // of the audio, one is the media store, the other is
-                    // our MMS database.
-                    if (isFromMms) {
-                        path = c.getString(c.getColumnIndexOrThrow(Part._DATA));
-                        mContentType = c.getString(c.getColumnIndexOrThrow(Part.CONTENT_TYPE));
-                    } else {
-                        path = c.getString(c.getColumnIndexOrThrow(Audio.Media.DATA));
-                        mContentType = c.getString(c.getColumnIndexOrThrow(
-                                Audio.Media.MIME_TYPE));
-                        // Get more extras information which would be useful
-                        // to the user.
-                        String album = c.getString(c.getColumnIndexOrThrow("album"));
-                        if (!TextUtils.isEmpty(album)) {
-                            mExtras.put("album", album);
-                        }
-
-                        String artist = c.getString(c.getColumnIndexOrThrow("artist"));
-                        if (!TextUtils.isEmpty(artist)) {
-                            mExtras.put("artist", artist);
-                        }
-                    }
-                    mSrc = path.substring(path.lastIndexOf('/') + 1);
-
-                    if (TextUtils.isEmpty(mContentType)) {
-                        throw new MmsException("Type of media is unknown.");
-                    }
-
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, "New AudioModel created:"
-                                + " mSrc=" + mSrc
-                                + " mContentType=" + mContentType
-                                + " mUri=" + uri
-                                + " mExtras=" + mExtras);
-                    }
-                } else {
-                    throw new MmsException("Nothing found: " + uri);
-                }
-            } finally {
-                c.close();
-            }
-        } else {
-            throw new MmsException("Bad URI: " + uri);
-        }
-
-        initMediaDuration();
-    }
-
-    public void stop() {
-        appendAction(MediaAction.STOP);
-        notifyModelChanged(false);
-    }
-
-    public void handleEvent(Event evt) {
-        String evtType = evt.getType();
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Handling event: " + evtType + " on " + this);
-        }
-
-        MediaAction action = MediaAction.NO_ACTIVE_ACTION;
-        if (evtType.equals(SmilMediaElementImpl.SMIL_MEDIA_START_EVENT)) {
-            action = MediaAction.START;
-        } else if (evtType.equals(SmilMediaElementImpl.SMIL_MEDIA_END_EVENT)) {
-            action = MediaAction.STOP;
-        } else if (evtType.equals(SmilMediaElementImpl.SMIL_MEDIA_PAUSE_EVENT)) {
-            action = MediaAction.PAUSE;
-        } else if (evtType.equals(SmilMediaElementImpl.SMIL_MEDIA_SEEK_EVENT)) {
-            action = MediaAction.SEEK;
-            mSeekTo = evt.getSeekTo();
-        }
-
-        appendAction(action);
-        notifyModelChanged(false);
-    }
-
-    public Map<String, ?> getExtras() {
-        return mExtras;
-    }
-
-    protected void checkContentRestriction() throws ContentRestrictionException {
-        ContentRestriction cr = ContentRestrictionFactory.getContentRestriction();
-        cr.checkAudioContentType(mContentType);
-    }
-
-    @Override
-    protected boolean isPlayable() {
-        return true;
-    }
-}
diff --git a/src/com/android/mms/model/CarrierContentRestriction.java b/src/com/android/mms/model/CarrierContentRestriction.java
deleted file mode 100644
index 21dca27..0000000
--- a/src/com/android/mms/model/CarrierContentRestriction.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-package com.android.mms.model;
-
-import java.util.ArrayList;
-
-import android.content.ContentResolver;
-import android.provider.Settings;
-
-import com.google.android.mms.ContentType;
-import com.android.mms.ContentRestrictionException;
-import com.android.mms.ExceedMessageSizeException;
-import com.android.mms.ResolutionException;
-import com.android.mms.UnsupportContentTypeException;
-
-public class CarrierContentRestriction implements ContentRestriction {
-    public static final int IMAGE_WIDTH_LIMIT  = 640;
-    public static final int IMAGE_HEIGHT_LIMIT = 480;
-    public static final int MESSAGE_SIZE_LIMIT = 300 * 1024;
-
-    private static final ArrayList<String> sSupportedImageTypes;
-    private static final ArrayList<String> sSupportedAudioTypes;
-    private static final ArrayList<String> sSupportedVideoTypes;
-
-    static {
-        sSupportedImageTypes = ContentType.getImageTypes();
-        sSupportedAudioTypes = ContentType.getAudioTypes();
-        sSupportedVideoTypes = ContentType.getVideoTypes();
-    }
-
-    public CarrierContentRestriction() {
-    }
-
-    public void checkMessageSize(int messageSize, int increaseSize, ContentResolver resolver)
-            throws ContentRestrictionException {
-        if ( (messageSize < 0) || (increaseSize < 0) ) {
-            throw new ContentRestrictionException("Negative message size"
-                    + " or increase size");
-        }
-        int messageSizeLimit;
-        try {
-            // Don't cache the max message size. Grab it each time so we'll dynamically
-            // respond to changes made on the server.
-            messageSizeLimit = Integer.parseInt(
-                    Settings.Gservices.getString(resolver,
-                            Settings.Gservices.MMS_MAXIMUM_MESSAGE_SIZE));
-        } catch (java.lang.NumberFormatException e) {
-            messageSizeLimit = MESSAGE_SIZE_LIMIT;
-        }
-        int newSize = messageSize + increaseSize;
-        if ( (newSize < 0) || (newSize > messageSizeLimit) ) {
-            throw new ExceedMessageSizeException("Exceed message size limitation");
-        }
-    }
-
-    public void checkResolution(int width, int height) throws ContentRestrictionException {
-        if ( (width > IMAGE_WIDTH_LIMIT) || (height > IMAGE_HEIGHT_LIMIT) ) {
-            throw new ResolutionException("content resolution exceeds restriction.");
-        }
-    }
-
-    public void checkImageContentType(String contentType)
-            throws ContentRestrictionException {
-        if (null == contentType) {
-            throw new ContentRestrictionException("Null content type to be check");
-        }
-
-        if (!sSupportedImageTypes.contains(contentType)) {
-            throw new UnsupportContentTypeException("Unsupported image content type : "
-                    + contentType);
-        }
-    }
-
-    public void checkAudioContentType(String contentType)
-            throws ContentRestrictionException {
-        if (null == contentType) {
-            throw new ContentRestrictionException("Null content type to be check");
-        }
-
-        if (!sSupportedAudioTypes.contains(contentType)) {
-            throw new UnsupportContentTypeException("Unsupported audio content type : "
-                    + contentType);
-        }
-    }
-
-    public void checkVideoContentType(String contentType)
-            throws ContentRestrictionException {
-        if (null == contentType) {
-            throw new ContentRestrictionException("Null content type to be check");
-        }
-
-        if (!sSupportedVideoTypes.contains(contentType)) {
-            throw new UnsupportContentTypeException("Unsupported video content type : "
-                    + contentType);
-        }
-    }
-}
diff --git a/src/com/android/mms/model/ContentRestriction.java b/src/com/android/mms/model/ContentRestriction.java
deleted file mode 100644
index 8aae771..0000000
--- a/src/com/android/mms/model/ContentRestriction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-package com.android.mms.model;
-
-import android.content.ContentResolver;
-
-import com.android.mms.ContentRestrictionException;
-
-public interface ContentRestriction {
-    void checkMessageSize(int messageSize, int increaseSize, ContentResolver resolver)
-            throws ContentRestrictionException;
-
-    void checkImageContentType(String contentType) throws ContentRestrictionException;
-
-    void checkAudioContentType(String contentType) throws ContentRestrictionException;
-
-    void checkVideoContentType(String contentType) throws ContentRestrictionException;
-
-    void checkResolution(int width, int height) throws ContentRestrictionException;
-}
diff --git a/src/com/android/mms/model/ContentRestrictionFactory.java b/src/com/android/mms/model/ContentRestrictionFactory.java
deleted file mode 100644
index c6d281e..0000000
--- a/src/com/android/mms/model/ContentRestrictionFactory.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-package com.android.mms.model;
-
-public class ContentRestrictionFactory {
-    private static ContentRestriction sContentRestriction;
-
-    private ContentRestrictionFactory() {
-    }
-
-    public static ContentRestriction getContentRestriction() {
-        if (null == sContentRestriction) {
-            sContentRestriction = new CarrierContentRestriction();
-        }
-        return sContentRestriction;
-    }
-}
diff --git a/src/com/android/mms/model/IModelChangedObserver.java b/src/com/android/mms/model/IModelChangedObserver.java
deleted file mode 100644
index deff470..0000000
--- a/src/com/android/mms/model/IModelChangedObserver.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-public interface IModelChangedObserver {
-    void onModelChanged(Model model, boolean dataChanged);
-}
diff --git a/src/com/android/mms/model/ImageModel.java b/src/com/android/mms/model/ImageModel.java
deleted file mode 100644
index c9a1828..0000000
--- a/src/com/android/mms/model/ImageModel.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-import com.android.mms.ContentRestrictionException;
-import com.android.mms.dom.smil.SmilMediaElementImpl;
-import com.android.mms.drm.DrmWrapper;
-import com.android.mms.ui.UriImage;
-import com.google.android.mms.MmsException;
-
-import org.w3c.dom.events.Event;
-import org.w3c.dom.smil.ElementTime;
-
-import android.content.Context;
-import android.drm.mobile1.DrmException;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.net.Uri;
-import android.text.TextUtils;
-import android.util.Config;
-import android.util.Log;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.ref.SoftReference;
-
-
-public class ImageModel extends RegionMediaModel {
-    private static final String TAG = "ImageModel";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private static final int THUMBNAIL_BOUNDS_LIMIT = 480;
-
-    private int mWidth;
-    private int mHeight;
-    private SoftReference<Bitmap> mBitmapCache = new SoftReference<Bitmap>(null);
-
-    public ImageModel(Context context, Uri uri, RegionModel region)
-            throws MmsException {
-        super(context, SmilHelper.ELEMENT_TAG_IMAGE, uri, region);
-        initModelFromUri(uri);
-        checkContentRestriction();
-    }
-
-    public ImageModel(Context context, String contentType, String src,
-            Uri uri, RegionModel region) throws DrmException, MmsException {
-        super(context, SmilHelper.ELEMENT_TAG_IMAGE,
-                contentType, src, uri, region);
-        decodeImageBounds();
-    }
-
-    public ImageModel(Context context, String contentType, String src,
-            DrmWrapper wrapper, RegionModel regionModel) throws IOException {
-        super(context, SmilHelper.ELEMENT_TAG_IMAGE, contentType, src,
-                wrapper, regionModel);
-    }
-
-    private void initModelFromUri(Uri uri) throws MmsException {
-        UriImage uriImage = new UriImage(mContext, uri);
-
-        mContentType = uriImage.getContentType();
-        if (TextUtils.isEmpty(mContentType)) {
-            throw new MmsException("Type of media is unknown.");
-        }
-        mSrc = uriImage.getSrc();
-        mWidth = uriImage.getWidth();
-        mHeight = uriImage.getHeight();
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "New ImageModel created:"
-                    + " mSrc=" + mSrc
-                    + " mContentType=" + mContentType
-                    + " mUri=" + uri);
-        }
-    }
-
-    private void decodeImageBounds() throws DrmException {
-        UriImage uriImage = new UriImage(mContext, getUriWithDrmCheck());
-        mWidth = uriImage.getWidth();
-        mHeight = uriImage.getHeight();
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Image bounds: " + mWidth + "x" + mHeight);
-        }
-    }
-
-    // EventListener Interface
-    public void handleEvent(Event evt) {
-        if (evt.getType().equals(SmilMediaElementImpl.SMIL_MEDIA_START_EVENT)) {
-            mVisible = true;
-        } else if (mFill != ElementTime.FILL_FREEZE) {
-            mVisible = false;
-        }
-
-        notifyModelChanged(false);
-    }
-
-    public int getWidth() {
-        return mWidth;
-    }
-
-    public int getHeight() {
-        return mHeight;
-    }
-
-    protected void checkContentRestriction() throws ContentRestrictionException {
-        ContentRestriction cr = ContentRestrictionFactory.getContentRestriction();
-        cr.checkImageContentType(mContentType);
-        cr.checkResolution(mWidth, mHeight);
-    }
-
-    public Bitmap getBitmap() {
-        Bitmap bm = mBitmapCache.get();
-        if (bm == null) {
-            bm = createThumbnailBitmap(THUMBNAIL_BOUNDS_LIMIT, getUri());
-            mBitmapCache = new SoftReference<Bitmap>(bm);
-        }
-        return bm;
-    }
-
-    public Bitmap getBitmapWithDrmCheck() throws DrmException {
-        Bitmap bm = mBitmapCache.get();
-        if (bm == null) {
-            bm = createThumbnailBitmap(THUMBNAIL_BOUNDS_LIMIT, getUriWithDrmCheck());
-            mBitmapCache = new SoftReference<Bitmap>(bm);
-        }
-        return bm;
-    }
-
-    private Bitmap createThumbnailBitmap(int thumbnailBoundsLimit, Uri uri) {
-        int outWidth = mWidth;
-        int outHeight = mHeight;
-
-        int s = 1;
-        while ((outWidth / s > thumbnailBoundsLimit)
-                || (outHeight / s > thumbnailBoundsLimit)) {
-            s *= 2;
-        }
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "outWidth=" + outWidth / s
-                    + " outHeight=" + outHeight / s);
-        }
-        BitmapFactory.Options options = new BitmapFactory.Options();
-        options.inSampleSize = s;
-
-        InputStream input = null;
-        try {
-            input = mContext.getContentResolver().openInputStream(uri);
-            return BitmapFactory.decodeStream(input, null, options);
-        } catch (FileNotFoundException e) {
-            Log.e(TAG, e.getMessage(), e);
-            return null;
-        } finally {
-            if (input != null) {
-                try {
-                    input.close();
-                } catch (IOException e) {
-                    Log.e(TAG, e.getMessage(), e);
-                }
-            }
-        }
-    }
-}
diff --git a/src/com/android/mms/model/LayoutModel.java b/src/com/android/mms/model/LayoutModel.java
deleted file mode 100644
index 531bbce..0000000
--- a/src/com/android/mms/model/LayoutModel.java
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-import com.android.mms.layout.LayoutManager;
-import com.android.mms.layout.LayoutParameters;
-
-import android.util.Config;
-import android.util.Log;
-
-import java.util.ArrayList;
-
-public class LayoutModel extends Model {
-    private static final String TAG = "LayoutModel";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    public static final String IMAGE_REGION_ID = "Image";
-    public static final String TEXT_REGION_ID  = "Text";
-
-    public static final int LAYOUT_BOTTOM_TEXT = 0;
-    public static final int LAYOUT_TOP_TEXT    = 1;
-    public static final int DEFAULT_LAYOUT_TYPE = LAYOUT_BOTTOM_TEXT;
-
-    private int mLayoutType = DEFAULT_LAYOUT_TYPE;
-    private RegionModel mRootLayout;
-    private RegionModel mImageRegion;
-    private RegionModel mTextRegion;
-    private ArrayList<RegionModel> mNonStdRegions;
-    private LayoutParameters mLayoutParams;
-
-    public LayoutModel() {
-        mLayoutParams = LayoutManager.getInstance().getLayoutParameters();
-        // Create default root-layout and regions.
-        createDefaultRootLayout();
-        createDefaultImageRegion();
-        createDefaultTextRegion();
-    }
-
-    public LayoutModel(ArrayList<RegionModel> layouts) {
-        mLayoutParams = LayoutManager.getInstance().getLayoutParameters();
-        // Root-Layout must be always provided as the first element.
-        mRootLayout = layouts.get(0);
-        mNonStdRegions = new ArrayList<RegionModel>();
-
-        int size = layouts.size();
-        if (size > 1) {
-            for (int i = 1; i < size; i++) {
-                RegionModel r = layouts.get(i);
-                String rId = r.getRegionId();
-                if (rId.equals(IMAGE_REGION_ID)) {
-                    mImageRegion = r;
-                } else if (rId.equals(TEXT_REGION_ID)) {
-                    mTextRegion = r;
-                } else {
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, "Found non-standard region: " + rId);
-                    }
-                    mNonStdRegions.add(r);
-                }
-            }
-        }
-
-        validateLayouts();
-    }
-
-    public LayoutModel(RegionModel rootLayout, ArrayList<RegionModel> regions) {
-        mLayoutParams = LayoutManager.getInstance().getLayoutParameters();
-        mRootLayout = rootLayout;
-        mNonStdRegions = new ArrayList<RegionModel>();
-
-        for (RegionModel r : regions) {
-            String rId = r.getRegionId();
-            if (rId.equals(IMAGE_REGION_ID)) {
-                mImageRegion = r;
-            } else if (rId.equals(TEXT_REGION_ID)) {
-                mTextRegion = r;
-            } else {
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "Found non-standard region: " + rId);
-                }
-                mNonStdRegions.add(r);
-            }
-        }
-
-        validateLayouts();
-    }
-
-    private void createDefaultRootLayout() {
-        mRootLayout = new RegionModel(null, 0, 0, mLayoutParams.getWidth(),
-                                                  mLayoutParams.getHeight());
-    }
-
-    private void createDefaultImageRegion() {
-        if (mRootLayout == null) {
-            throw new IllegalStateException("Root-Layout uninitialized.");
-        }
-
-        mImageRegion = new RegionModel(IMAGE_REGION_ID, 0, 0,
-                mRootLayout.getWidth(), mLayoutParams.getImageHeight());
-    }
-
-    private void createDefaultTextRegion() {
-        if (mRootLayout == null) {
-            throw new IllegalStateException("Root-Layout uninitialized.");
-        }
-
-        mTextRegion = new RegionModel(
-                TEXT_REGION_ID, 0, mLayoutParams.getImageHeight(),
-                mRootLayout.getWidth(), mLayoutParams.getTextHeight());
-    }
-
-    private void validateLayouts() {
-        if (mRootLayout == null) {
-            createDefaultRootLayout();
-        }
-
-        if (mImageRegion == null) {
-            createDefaultImageRegion();
-        }
-
-        if (mTextRegion == null) {
-            createDefaultTextRegion();
-        }
-    }
-
-    public RegionModel getRootLayout() {
-        return mRootLayout;
-    }
-
-    public void setRootLayout(RegionModel rootLayout) {
-        mRootLayout = rootLayout;
-    }
-
-    public RegionModel getImageRegion() {
-        return mImageRegion;
-    }
-
-    public void setImageRegion(RegionModel imageRegion) {
-        mImageRegion = imageRegion;
-    }
-
-    public RegionModel getTextRegion() {
-        return mTextRegion;
-    }
-
-    public void setTextRegion(RegionModel textRegion) {
-        mTextRegion = textRegion;
-    }
-
-    /**
-     * Get all regions except root-layout. The result is READ-ONLY.
-     */
-    public ArrayList<RegionModel> getRegions() {
-        ArrayList<RegionModel> regions = new ArrayList<RegionModel>();
-        if (mImageRegion != null) {
-            regions.add(mImageRegion);
-        }
-        if (mTextRegion != null) {
-            regions.add(mTextRegion);
-        }
-        return regions;
-    }
-
-    public RegionModel findRegionById(String rId) {
-        if (IMAGE_REGION_ID.equals(rId)) {
-            return mImageRegion;
-        } else if (TEXT_REGION_ID.equals(rId)) {
-            return mTextRegion;
-        } else {
-            for (RegionModel r : mNonStdRegions) {
-                if (r.getRegionId().equals(rId)) {
-                    return r;
-                }
-            }
-
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Region not found: " + rId);
-            }
-            return null;
-        }
-    }
-
-    public int getLayoutWidth() {
-        return mRootLayout.getWidth();
-    }
-
-    public int getLayoutHeight() {
-        return mRootLayout.getHeight();
-    }
-
-    public String getBackgroundColor() {
-        return mRootLayout.getBackgroundColor();
-    }
-
-    public void changeTo(int layout) {
-        if (mRootLayout == null) {
-            throw new IllegalStateException("Root-Layout uninitialized.");
-        }
-
-        if (mLayoutParams == null) {
-            mLayoutParams = LayoutManager.getInstance().getLayoutParameters();
-        }
-
-        if (mLayoutType != layout) {
-            switch (layout) {
-                case LAYOUT_BOTTOM_TEXT: {
-                    mImageRegion.setTop(0);
-                    mTextRegion.setTop(mLayoutParams.getImageHeight());
-                    mLayoutType = layout;
-                    notifyModelChanged(true);
-                }
-                break;
-                case LAYOUT_TOP_TEXT: {
-                    mImageRegion.setTop(mLayoutParams.getTextHeight());
-                    mTextRegion.setTop(0);
-                    mLayoutType = layout;
-                    notifyModelChanged(true);
-                }
-                break;
-                default: {
-                    Log.w(TAG, "Unknown layout type: " + layout);
-                }
-            }
-        } else {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Skip changing layout.");
-            }
-        }
-    }
-
-    public int getLayoutType() {
-        return mLayoutType;
-    }
-
-    @Override
-    protected void registerModelChangedObserverInDescendants(
-            IModelChangedObserver observer) {
-        if (mRootLayout != null) {
-            mRootLayout.registerModelChangedObserver(observer);
-        }
-
-        if (mImageRegion != null) {
-            mImageRegion.registerModelChangedObserver(observer);
-        }
-
-        if (mTextRegion != null) {
-            mTextRegion.registerModelChangedObserver(observer);
-        }
-    }
-
-    @Override
-    protected void unregisterModelChangedObserverInDescendants(
-            IModelChangedObserver observer) {
-        if (mRootLayout != null) {
-            mRootLayout.unregisterModelChangedObserver(observer);
-        }
-
-        if (mImageRegion != null) {
-            mImageRegion.unregisterModelChangedObserver(observer);
-        }
-
-        if (mTextRegion != null) {
-            mTextRegion.unregisterModelChangedObserver(observer);
-        }
-    }
-
-    @Override
-    protected void unregisterAllModelChangedObserversInDescendants() {
-        if (mRootLayout != null) {
-            mRootLayout.unregisterAllModelChangedObservers();
-        }
-
-        if (mImageRegion != null) {
-            mImageRegion.unregisterAllModelChangedObservers();
-        }
-
-        if (mTextRegion != null) {
-            mTextRegion.unregisterAllModelChangedObservers();
-        }
-    }
-
-    public boolean hasNonStdRegions() {
-        return mNonStdRegions.size() > 0;
-    }
-}
diff --git a/src/com/android/mms/model/MediaModel.java b/src/com/android/mms/model/MediaModel.java
deleted file mode 100644
index 0d5c466..0000000
--- a/src/com/android/mms/model/MediaModel.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-import com.android.mms.R;
-import com.android.mms.drm.DrmUtils;
-import com.android.mms.drm.DrmWrapper;
-import com.google.android.mms.MmsException;
-
-import org.w3c.dom.events.EventListener;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.drm.mobile1.DrmException;
-import android.media.MediaPlayer;
-import android.net.Uri;
-import android.util.Log;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-
-public abstract class MediaModel extends Model implements EventListener {
-    private static final String TAG = "MediaModel";
-
-    protected Context mContext;
-    protected int mBegin;
-    protected int mDuration;
-    protected String mTag;
-    protected String mSrc;
-    protected String mContentType;
-    private Uri mUri;
-    private byte[] mData;
-    protected short mFill;
-    protected int mSize;
-    protected int mSeekTo;
-    protected DrmWrapper mDrmObjectWrapper;
-
-    private final ArrayList<MediaAction> mMediaActions;
-    public static enum MediaAction {
-        NO_ACTIVE_ACTION,
-        START,
-        STOP,
-        PAUSE,
-        SEEK,
-    }
-
-    public MediaModel(Context context, String tag, Uri uri) throws MmsException{
-        this(context, tag, null, null, uri);
-    }
-
-    public MediaModel(Context context, String tag, String contentType,
-            String src, Uri uri) throws MmsException {
-        mContext = context;
-        mTag = tag;
-        mContentType = contentType;
-        mSrc = src;
-        mUri = uri;
-        initMediaSize();
-        mMediaActions = new ArrayList<MediaAction>();
-    }
-
-    public MediaModel(Context context, String tag, String contentType,
-            String src, byte[] data) {
-        if (data == null) {
-            throw new IllegalArgumentException("data may not be null.");
-        }
-
-        mContext = context;
-        mTag = tag;
-        mContentType = contentType;
-        mSrc = src;
-        mData = data;
-        mSize = data.length;
-        mMediaActions = new ArrayList<MediaAction>();
-    }
-
-    public MediaModel(Context context, String tag, String contentType,
-            String src, DrmWrapper wrapper) throws IOException {
-        mContext = context;
-        mTag = tag;
-        mContentType = contentType;
-        mSrc = src;
-        mDrmObjectWrapper = wrapper;
-        mUri = DrmUtils.insert(context, wrapper);
-        mSize = wrapper.getOriginalData().length;
-        mMediaActions = new ArrayList<MediaAction>();
-    }
-
-    public int getBegin() {
-        return mBegin;
-    }
-
-    public void setBegin(int begin) {
-        mBegin = begin;
-        notifyModelChanged(true);
-    }
-
-    public int getDuration() {
-        return mDuration;
-    }
-
-    public void setDuration(int duration) {
-        if (isPlayable() && (duration < 0)) {
-            // 'indefinite' duration, we should try to find its exact value;
-            try {
-                initMediaDuration();
-            } catch (MmsException e) {
-                // On error, keep default duration.
-                Log.e(TAG, e.getMessage(), e);
-                return;
-            }
-        } else {
-            mDuration = duration;
-        }
-        notifyModelChanged(true);
-    }
-
-    public String getTag() {
-        return mTag;
-    }
-
-    public String getContentType() {
-        return mContentType;
-    }
-
-    /**
-     * Get the URI of the media without checking DRM rights. Use this method
-     * only if the media is NOT DRM protected.
-     *
-     * @return The URI of the media.
-     */
-    public Uri getUri() {
-        return mUri;
-    }
-
-    /**
-     * Get the URI of the media with checking DRM rights. Use this method
-     * if the media is probably DRM protected.
-     *
-     * @return The URI of the media.
-     * @throws DrmException Insufficient DRM rights detected.
-     */
-    public Uri getUriWithDrmCheck() throws DrmException {
-        if (mUri != null) {
-            if (isDrmProtected() && !mDrmObjectWrapper.consumeRights()) {
-                throw new DrmException("Insufficient DRM rights.");
-            }
-        }
-        return mUri;
-    }
-
-    public byte[] getData() throws DrmException {
-        if (mData != null) {
-            if (isDrmProtected() && !mDrmObjectWrapper.consumeRights()) {
-                throw new DrmException(
-                        mContext.getString(R.string.insufficient_drm_rights));
-            }
-
-            byte[] data = new byte[mData.length];
-            System.arraycopy(mData, 0, data, 0, mData.length);
-            return data;
-        }
-        return null;
-    }
-
-    /**
-     * @param uri the mUri to set
-     */
-    void setUri(Uri uri) {
-        mUri = uri;
-    }
-
-    /**
-     * @return the mSrc
-     */
-    public String getSrc() {
-        return mSrc;
-    }
-
-    /**
-     * @return the mFill
-     */
-    public short getFill() {
-        return mFill;
-    }
-
-    /**
-     * @param fill the mFill to set
-     */
-    public void setFill(short fill) {
-        mFill = fill;
-        notifyModelChanged(true);
-    }
-
-    public int getMediaSize() {
-        return mSize;
-    }
-
-    public boolean isText() {
-        return mTag.equals(SmilHelper.ELEMENT_TAG_TEXT);
-    }
-
-    public boolean isImage() {
-        return mTag.equals(SmilHelper.ELEMENT_TAG_IMAGE);
-    }
-
-    public boolean isVideo() {
-        return mTag.equals(SmilHelper.ELEMENT_TAG_VIDEO);
-    }
-
-    public boolean isAudio() {
-        return mTag.equals(SmilHelper.ELEMENT_TAG_AUDIO);
-    }
-
-    public boolean isDrmProtected() {
-        return mDrmObjectWrapper != null;
-    }
-
-    public boolean isAllowedToForward() {
-        return mDrmObjectWrapper.isAllowedToForward();
-    }
-
-    protected void initMediaDuration() throws MmsException {
-        if (mUri == null) {
-            throw new IllegalArgumentException("Uri may not be null.");
-        }
-
-        MediaPlayer mediaPlayer = new MediaPlayer();
-        try {
-            mediaPlayer.setDataSource(mContext, mUri);
-            mediaPlayer.prepare();
-            mDuration = mediaPlayer.getDuration();
-        } catch (IOException e) {
-            Log.e(TAG, "Unexpected IOException.", e);
-            throw new MmsException(e);
-        } finally {
-            mediaPlayer.release();
-        }
-    }
-
-    private void initMediaSize() throws MmsException {
-        ContentResolver cr = mContext.getContentResolver();
-        InputStream input = null;
-        try {
-            input = cr.openInputStream(mUri);
-            if (input instanceof FileInputStream) {
-                // avoid reading the whole stream to get its length
-                FileInputStream f = (FileInputStream) input;
-                mSize = (int) f.getChannel().size();
-            } else {
-                while (-1 != input.read()) {
-                    mSize++;
-                }
-            }
-
-        } catch (IOException e) {
-            // Ignore
-            Log.e(TAG, "IOException caught while opening or reading stream", e);
-            if (e instanceof FileNotFoundException) {
-                throw new MmsException(e.getMessage());
-            }
-        } finally {
-            if (null != input) {
-                try {
-                    input.close();
-                } catch (IOException e) {
-                    // Ignore
-                    Log.e(TAG, "IOException caught while closing stream", e);
-                }
-            }
-        }
-    }
-
-    public static boolean isMmsUri(Uri uri) {
-        return uri.getAuthority().startsWith("mms");
-    }
-
-    public int getSeekTo() {
-        return mSeekTo;
-    }
-
-    public void appendAction(MediaAction action) {
-        mMediaActions.add(action);
-    }
-
-    public MediaAction getCurrentAction() {
-        if (0 == mMediaActions.size()) {
-            return MediaAction.NO_ACTIVE_ACTION;
-        }
-        return mMediaActions.remove(0);
-    }
-
-    protected boolean isPlayable() {
-        return false;
-    }
-
-    public DrmWrapper getDrmObject() {
-        return mDrmObjectWrapper;
-    }
-}
diff --git a/src/com/android/mms/model/MediaModelFactory.java b/src/com/android/mms/model/MediaModelFactory.java
deleted file mode 100644
index 98dedb0..0000000
--- a/src/com/android/mms/model/MediaModelFactory.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-import com.android.mms.UnsupportContentTypeException;
-import com.android.mms.drm.DrmWrapper;
-import com.google.android.mms.ContentType;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.PduBody;
-import com.google.android.mms.pdu.PduPart;
-
-import org.w3c.dom.smil.SMILMediaElement;
-import org.w3c.dom.smil.SMILRegionElement;
-import org.w3c.dom.smil.SMILRegionMediaElement;
-import org.w3c.dom.smil.Time;
-import org.w3c.dom.smil.TimeList;
-
-import android.content.Context;
-import android.drm.mobile1.DrmException;
-
-import java.io.IOException;
-
-public class MediaModelFactory {
-    private static final String TAG = "MediaModelFactory";
-
-    public static MediaModel getMediaModel(Context context,
-            SMILMediaElement sme, LayoutModel layouts, PduBody pb)
-            throws DrmException, IOException, IllegalArgumentException, MmsException {
-        String tag = sme.getTagName();
-        String src = sme.getSrc();
-        PduPart part = findPart(pb, src);
-
-        if (sme instanceof SMILRegionMediaElement) {
-            return getRegionMediaModel(
-                    context, tag, src, (SMILRegionMediaElement) sme, layouts, part);
-        } else {
-            return getGenericMediaModel(
-                    context, tag, src, sme, part, null);
-        }
-    }
-
-    private static PduPart findPart(PduBody pb, String src) {
-        PduPart part = null;
-
-        if (src != null) {
-            if (src.startsWith("cid:")) {
-                part = pb.getPartByContentId("<" + src.substring("cid:".length()) + ">");
-            } else {
-                part = pb.getPartByName(src);
-                if (part == null) {
-                    part = pb.getPartByFileName(src);
-                    if (part == null) {
-                        part = pb.getPartByContentLocation(src);
-                    }
-                }
-            }
-        }
-
-        if (part != null) {
-            return part;
-        }
-
-        throw new IllegalArgumentException("No part found for the model.");
-    }
-
-    private static MediaModel getRegionMediaModel(Context context,
-            String tag, String src, SMILRegionMediaElement srme,
-            LayoutModel layouts, PduPart part) throws DrmException, IOException, MmsException {
-        SMILRegionElement sre = srme.getRegion();
-        if (sre != null) {
-            RegionModel region = layouts.findRegionById(sre.getId());
-            if (region != null) {
-                return getGenericMediaModel(context, tag, src, srme, part, region);
-            }
-        } else {
-            String rId = null;
-
-            if (tag.equals(SmilHelper.ELEMENT_TAG_TEXT)) {
-                rId = LayoutModel.TEXT_REGION_ID;
-            } else {
-                rId = LayoutModel.IMAGE_REGION_ID;
-            }
-
-            RegionModel region = layouts.findRegionById(rId);
-            if (region != null) {
-                return getGenericMediaModel(context, tag, src, srme, part, region);
-            }
-        }
-
-        throw new IllegalArgumentException("Region not found or bad region ID.");
-    }
-
-    private static MediaModel getGenericMediaModel(Context context,
-            String tag, String src, SMILMediaElement sme, PduPart part,
-            RegionModel regionModel) throws DrmException, IOException, MmsException {
-        byte[] bytes = part.getContentType();
-        if (bytes == null) {
-            throw new IllegalArgumentException(
-                    "Content-Type of the part may not be null.");
-        }
-
-        String contentType = new String(bytes);
-        MediaModel media = null;
-        if (ContentType.isDrmType(contentType)) {
-            DrmWrapper wrapper = new DrmWrapper(
-                    contentType, part.getDataUri(), part.getData());
-            if (tag.equals(SmilHelper.ELEMENT_TAG_TEXT)) {
-                media = new TextModel(context, contentType, src,
-                        part.getCharset(), wrapper, regionModel);
-            } else if (tag.equals(SmilHelper.ELEMENT_TAG_IMAGE)) {
-                media = new ImageModel(context, contentType, src,
-                        wrapper, regionModel);
-            } else if (tag.equals(SmilHelper.ELEMENT_TAG_VIDEO)) {
-                media = new VideoModel(context, contentType, src,
-                        wrapper, regionModel);
-            } else if (tag.equals(SmilHelper.ELEMENT_TAG_AUDIO)) {
-                media = new AudioModel(context, contentType, src,
-                        wrapper);
-            } else if (tag.equals(SmilHelper.ELEMENT_TAG_REF)) {
-                String drmContentType = wrapper.getContentType();
-                if (ContentType.isTextType(drmContentType)) {
-                    media = new TextModel(context, contentType, src,
-                            part.getCharset(), wrapper, regionModel);
-                } else if (ContentType.isImageType(drmContentType)) {
-                    media = new ImageModel(context, contentType, src,
-                            wrapper, regionModel);
-                } else if (ContentType.isVideoType(drmContentType)) {
-                    media = new VideoModel(context, contentType, src,
-                            wrapper, regionModel);
-                } else if (ContentType.isAudioType(drmContentType)) {
-                    media = new AudioModel(context, contentType, src,
-                            wrapper);
-                } else {
-                    throw new UnsupportContentTypeException(
-                        "Unsupported Content-Type: " + drmContentType);
-                }
-            } else {
-                throw new IllegalArgumentException("Unsupported TAG: " + tag);
-            }
-        } else {
-            if (tag.equals(SmilHelper.ELEMENT_TAG_TEXT)) {
-                media = new TextModel(context, contentType, src,
-                        part.getCharset(), part.getData(), regionModel);
-            } else if (tag.equals(SmilHelper.ELEMENT_TAG_IMAGE)) {
-                media = new ImageModel(context, contentType, src,
-                        part.getDataUri(), regionModel);
-            } else if (tag.equals(SmilHelper.ELEMENT_TAG_VIDEO)) {
-                media = new VideoModel(context, contentType, src,
-                        part.getDataUri(), regionModel);
-            } else if (tag.equals(SmilHelper.ELEMENT_TAG_AUDIO)) {
-                media = new AudioModel(context, contentType, src,
-                        part.getDataUri());
-            } else if (tag.equals(SmilHelper.ELEMENT_TAG_REF)) {
-                if (ContentType.isTextType(contentType)) {
-                    media = new TextModel(context, contentType, src,
-                            part.getCharset(), part.getData(), regionModel);
-                } else if (ContentType.isImageType(contentType)) {
-                    media = new ImageModel(context, contentType, src,
-                            part.getDataUri(), regionModel);
-                } else if (ContentType.isVideoType(contentType)) {
-                    media = new VideoModel(context, contentType, src,
-                            part.getDataUri(), regionModel);
-                } else if (ContentType.isAudioType(contentType)) {
-                    media = new AudioModel(context, contentType, src,
-                            part.getDataUri());
-                } else {
-                    throw new UnsupportContentTypeException(
-                        "Unsupported Content-Type: " + contentType);
-                }
-            } else {
-                throw new IllegalArgumentException("Unsupported TAG: " + tag);
-            }
-        }
-
-        // Set 'begin' property.
-        int begin = 0;
-        TimeList tl = sme.getBegin();
-        if ((tl != null) && (tl.getLength() > 0)) {
-            // We only support a single begin value.
-            Time t = tl.item(0);
-            begin = (int) (t.getResolvedOffset() * 1000);
-        }
-        media.setBegin(begin);
-
-        // Set 'duration' property.
-        int duration = (int) (sme.getDur() * 1000);
-        if (duration <= 0) {
-            tl = sme.getEnd();
-            if ((tl != null) && (tl.getLength() > 0)) {
-                // We only support a single end value.
-                Time t = tl.item(0);
-                if (t.getTimeType() != Time.SMIL_TIME_INDEFINITE) {
-                    duration = (int) (t.getResolvedOffset() * 1000) - begin;
-                }
-            }
-        }
-        media.setDuration(duration);
-
-        // Set 'fill' property.
-        media.setFill(sme.getFill());
-        return media;
-    }
-}
diff --git a/src/com/android/mms/model/Model.java b/src/com/android/mms/model/Model.java
deleted file mode 100644
index 55c6b48..0000000
--- a/src/com/android/mms/model/Model.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-import java.util.ArrayList;
-
-public class Model {
-    protected ArrayList<IModelChangedObserver> mModelChangedObservers =
-            new ArrayList<IModelChangedObserver>();
-
-    public void registerModelChangedObserver(IModelChangedObserver observer) {
-        if (!mModelChangedObservers.contains(observer)) {
-            mModelChangedObservers.add(observer);
-            registerModelChangedObserverInDescendants(observer);
-        }
-    }
-
-    public void unregisterModelChangedObserver(IModelChangedObserver observer) {
-        mModelChangedObservers.remove(observer);
-        unregisterModelChangedObserverInDescendants(observer);
-    }
-
-    public void unregisterAllModelChangedObservers() {
-        unregisterAllModelChangedObserversInDescendants();
-        mModelChangedObservers.clear();
-    }
-
-    protected void notifyModelChanged(boolean dataChanged) {
-        for (IModelChangedObserver observer : mModelChangedObservers) {
-            observer.onModelChanged(this, dataChanged);
-        }
-    }
-
-    protected void registerModelChangedObserverInDescendants(
-            IModelChangedObserver observer) {
-        // Dummy method.
-    }
-
-    protected void unregisterModelChangedObserverInDescendants(
-            IModelChangedObserver observer) {
-        // Dummy method.
-    }
-
-    protected void unregisterAllModelChangedObserversInDescendants() {
-        // Dummy method.
-    }
-}
diff --git a/src/com/android/mms/model/RegionMediaModel.java b/src/com/android/mms/model/RegionMediaModel.java
deleted file mode 100644
index 2173d4c..0000000
--- a/src/com/android/mms/model/RegionMediaModel.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-import com.android.mms.drm.DrmWrapper;
-
-import com.google.android.mms.MmsException;
-
-import android.content.Context;
-import android.net.Uri;
-
-import java.io.IOException;
-
-public abstract class RegionMediaModel extends MediaModel {
-    protected RegionModel mRegion;
-    protected boolean mVisible = true;
-
-    public RegionMediaModel(Context context, String tag, Uri uri,
-            RegionModel region) throws MmsException {
-        this(context, tag, null, null, uri, region);
-    }
-
-    public RegionMediaModel(Context context, String tag, String contentType,
-            String src, Uri uri, RegionModel region) throws MmsException {
-        super(context, tag, contentType, src, uri);
-        mRegion = region;
-    }
-
-    public RegionMediaModel(Context context, String tag, String contentType,
-            String src, byte[] data, RegionModel region) {
-        super(context, tag, contentType, src, data);
-        mRegion = region;
-    }
-
-    public RegionMediaModel(Context context, String tag, String contentType,
-            String src, DrmWrapper wrapper, RegionModel region)
-            throws IOException {
-        super(context, tag, contentType, src, wrapper);
-        mRegion = region;
-    }
-
-    public RegionModel getRegion() {
-        return mRegion;
-    }
-
-    public void setRegion(RegionModel region) {
-        mRegion = region;
-        notifyModelChanged(true);
-    }
-
-    /**
-     * @return the mVisible
-     */
-    public boolean isVisible() {
-        return mVisible;
-    }
-
-    /**
-     * @param visible the mVisible to set
-     */
-    public void setVisible(boolean visible) {
-        mVisible = visible;
-    }
-}
diff --git a/src/com/android/mms/model/RegionModel.java b/src/com/android/mms/model/RegionModel.java
deleted file mode 100644
index dd2e3ed..0000000
--- a/src/com/android/mms/model/RegionModel.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-public class RegionModel extends Model {
-    private static final String DEFAULT_FIT = "meet";
-    private final String mRegionId;
-    private String mFit;
-    private int mLeft;
-    private int mTop;
-    private int mWidth;
-    private int mHeight;
-    private String mBackgroundColor;
-
-    public RegionModel(String regionId, int left, int top,
-            int width, int height) {
-        this(regionId, DEFAULT_FIT, left, top, width, height);
-    }
-
-    public RegionModel(String regionId, String fit, int left, int top,
-            int width, int height) {
-        this(regionId, fit, left, top, width, height, null);
-    }
-
-    public RegionModel(String regionId, String fit, int left, int top,
-            int width, int height, String bgColor) {
-        mRegionId = regionId;
-        mFit = fit;
-        mLeft = left;
-        mTop = top;
-        mWidth = width;
-        mHeight = height;
-        mBackgroundColor = bgColor;
-    }
-
-    /**
-     * @return the mRegionId
-     */
-    public String getRegionId() {
-        return mRegionId;
-    }
-
-    /**
-     * @return the mFit
-     */
-    public String getFit() {
-        return mFit;
-    }
-
-    /**
-     * @param fit the mFit to set
-     */
-    public void setFit(String fit) {
-        mFit = fit;
-        notifyModelChanged(true);
-    }
-
-    /**
-     * @return the mLeft
-     */
-    public int getLeft() {
-        return mLeft;
-    }
-
-    /**
-     * @param left the mLeft to set
-     */
-    public void setLeft(int left) {
-        mLeft = left;
-        notifyModelChanged(true);
-    }
-
-    /**
-     * @return the mTop
-     */
-    public int getTop() {
-        return mTop;
-    }
-
-    /**
-     * @param top the mTop to set
-     */
-    public void setTop(int top) {
-        mTop = top;
-        notifyModelChanged(true);
-    }
-
-    /**
-     * @return the mWidth
-     */
-    public int getWidth() {
-        return mWidth;
-    }
-
-    /**
-     * @param width the mWidth to set
-     */
-    public void setWidth(int width) {
-        mWidth = width;
-        notifyModelChanged(true);
-    }
-
-    /**
-     * @return the mHeight
-     */
-    public int getHeight() {
-        return mHeight;
-    }
-
-    /**
-     * @param height the mHeight to set
-     */
-    public void setHeight(int height) {
-        mHeight = height;
-        notifyModelChanged(true);
-    }
-
-    /**
-     * @return the mBackgroundColor
-     */
-    public String getBackgroundColor() {
-        return mBackgroundColor;
-    }
-
-    /**
-     * @param bgColor the mBackgroundColor to set
-     */
-    public void setBackgroundColor(String bgColor) {
-        mBackgroundColor = bgColor;
-        notifyModelChanged(true);
-    }
-}
diff --git a/src/com/android/mms/model/SlideModel.java b/src/com/android/mms/model/SlideModel.java
deleted file mode 100644
index eae0b59..0000000
--- a/src/com/android/mms/model/SlideModel.java
+++ /dev/null
@@ -1,509 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-import com.android.mms.ContentRestrictionException;
-import com.android.mms.dom.smil.SmilParElementImpl;
-
-import org.w3c.dom.events.Event;
-import org.w3c.dom.events.EventListener;
-import org.w3c.dom.smil.ElementTime;
-
-import android.util.Config;
-import android.util.Log;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-public class SlideModel extends Model
-        implements List<MediaModel>, EventListener {
-    private static final String TAG = "SlideModel";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-    private static final int DEFAULT_SLIDE_DURATION = 5000;
-
-    private final ArrayList<MediaModel> mMedia = new ArrayList<MediaModel>();
-
-    private MediaModel mText;
-    private MediaModel mImage;
-    private MediaModel mAudio;
-    private MediaModel mVideo;
-
-    private boolean mCanAddImage = true;
-    private boolean mCanAddAudio = true;
-    private boolean mCanAddVideo = true;
-
-    private int mDuration;
-    private boolean mVisible = true;
-    private short mFill;
-    private int mSlideSize;
-    private SlideshowModel mParent;
-
-    public SlideModel(SlideshowModel slideshow) {
-        this(DEFAULT_SLIDE_DURATION, slideshow);
-    }
-
-    public SlideModel(int duration, SlideshowModel slideshow) {
-        mDuration = duration;
-        mParent = slideshow;
-    }
-
-    /**
-     * Create a SlideModel with exist media collection.
-     *
-     * @param duration The duration of the slide.
-     * @param mediaList The exist media collection.
-     *
-     * @throws IllegalStateException One or more media in the mediaList cannot
-     *         be added into the slide due to a slide cannot contain image
-     *         and video or audio and video at the same time.
-     */
-    public SlideModel(int duration, ArrayList<MediaModel> mediaList) {
-        mDuration = duration;
-
-        int maxDur = 0;
-        for (MediaModel media : mediaList) {
-            internalAdd(media);
-
-            int mediaDur = media.getDuration();
-            if (mediaDur > maxDur) {
-                maxDur = mediaDur;
-            }
-        }
-
-        updateDuration(maxDur);
-    }
-
-    private void internalAdd(MediaModel media) throws IllegalStateException {
-        if (media == null) {
-            // Don't add null value into the list.
-            return;
-        }
-
-        if (media.isText()) {
-            internalAddOrReplace(mText, media);
-            mText = media;
-        } else if (media.isImage()) {
-            if (mCanAddImage) {
-                internalAddOrReplace(mImage, media);
-                mImage = media;
-                mCanAddVideo = false;
-            } else {
-                throw new IllegalStateException();
-            }
-        } else if (media.isAudio()) {
-            if (mCanAddAudio) {
-                internalAddOrReplace(mAudio, media);
-                mAudio = media;
-                mCanAddVideo = false;
-            } else {
-                throw new IllegalStateException();
-            }
-        } else if (media.isVideo()) {
-            if (mCanAddVideo) {
-                internalAddOrReplace(mVideo, media);
-                mVideo = media;
-                mCanAddImage = false;
-                mCanAddAudio = false;
-            } else {
-                throw new IllegalStateException();
-            }
-        }
-    }
-
-    private void internalAddOrReplace(MediaModel old, MediaModel media) {
-        int addSize = media.getMediaSize();
-        int removeSize;
-        if (old == null) {
-            if (null != mParent) {
-                mParent.checkMessageSize(addSize);
-            }
-            mMedia.add(media);
-            increaseSlideSize(addSize);
-            increaseMessageSize(addSize);
-        } else {
-            removeSize = old.getMediaSize();
-            if (addSize > removeSize) {
-                if (null != mParent) {
-                    mParent.checkMessageSize(addSize - removeSize);
-                }
-                increaseSlideSize(addSize - removeSize);
-                increaseMessageSize(addSize - removeSize);
-            } else {
-                decreaseSlideSize(removeSize - addSize);
-                decreaseMessageSize(removeSize - addSize);
-            }
-            mMedia.set(mMedia.indexOf(old), media);
-            old.unregisterAllModelChangedObservers();
-        }
-
-        for (IModelChangedObserver observer : mModelChangedObservers) {
-            media.registerModelChangedObserver(observer);
-        }
-    }
-
-    private boolean internalRemove(Object object) {
-        if (mMedia.remove(object)) {
-            if (object instanceof TextModel) {
-                mText = null;
-            } else if (object instanceof ImageModel) {
-                mImage = null;
-                mCanAddVideo = true;
-            } else if (object instanceof AudioModel) {
-                mAudio = null;
-                mCanAddVideo = true;
-            } else if (object instanceof VideoModel) {
-                mVideo = null;
-                mCanAddImage = true;
-                mCanAddAudio = true;
-            }
-            int decreaseSize = ((MediaModel) object).getMediaSize();
-            decreaseSlideSize(decreaseSize);
-            decreaseMessageSize(decreaseSize);
-
-            ((Model) object).unregisterAllModelChangedObservers();
-
-            return true;
-        }
-
-        return false;
-    }
-
-    /**
-     * @return the mDuration
-     */
-    public int getDuration() {
-        return mDuration;
-    }
-
-    /**
-     * @param duration the mDuration to set
-     */
-    public void setDuration(int duration) {
-        mDuration = duration;
-        notifyModelChanged(true);
-    }
-
-    public int getSlideSize() {
-        return mSlideSize;
-    }
-
-    public void increaseSlideSize(int increaseSize) {
-        if (increaseSize > 0) {
-            mSlideSize += increaseSize;
-        }
-    }
-
-    public void decreaseSlideSize(int decreaseSize) {
-        if (decreaseSize > 0) {
-            mSlideSize -= decreaseSize;
-        }
-    }
-
-    public void setParent(SlideshowModel parent) {
-        mParent = parent;
-    }
-
-    public void increaseMessageSize(int increaseSize) {
-        if ((increaseSize > 0) && (null != mParent)) {
-            int size = mParent.getCurrentMessageSize();
-            size += increaseSize;
-            mParent.setCurrentMessageSize(size);
-        }
-    }
-
-    public void decreaseMessageSize(int decreaseSize) {
-        if ((decreaseSize > 0) && (null != mParent)) {
-            int size = mParent.getCurrentMessageSize();
-            size -= decreaseSize;
-            mParent.setCurrentMessageSize(size);
-        }
-    }
-
-    //
-    // Implement List<E> interface.
-    //
-
-    /**
-     * Add a MediaModel to the slide. If the slide has already contained
-     * a media object in the same type, the media object will be replaced by
-     * the new one.
-     *
-     * @param object A media object to be added into the slide.
-     * @return true
-     * @throws IllegalStateException One or more media in the mediaList cannot
-     *         be added into the slide due to a slide cannot contain image
-     *         and video or audio and video at the same time.
-     * @throws ContentRestrictionException when can not add this object.
-     *
-     */
-    public boolean add(MediaModel object) {
-        internalAdd(object);
-        notifyModelChanged(true);
-        return true;
-    }
-
-    public boolean addAll(Collection<? extends MediaModel> collection) {
-        throw new UnsupportedOperationException("Operation not supported.");
-    }
-
-    public void clear() {
-        if (mMedia.size() > 0) {
-            for (MediaModel media : mMedia) {
-                media.unregisterAllModelChangedObservers();
-                int decreaseSize = media.getMediaSize();
-                decreaseSlideSize(decreaseSize);
-                decreaseMessageSize(decreaseSize);
-            }
-            mMedia.clear();
-
-            mText = null;
-            mImage = null;
-            mAudio = null;
-            mVideo = null;
-
-            mCanAddImage = true;
-            mCanAddAudio = true;
-            mCanAddVideo = true;
-
-            notifyModelChanged(true);
-        }
-    }
-
-    public boolean contains(Object object) {
-        return mMedia.contains(object);
-    }
-
-    public boolean containsAll(Collection<?> collection) {
-        return mMedia.containsAll(collection);
-    }
-
-    public boolean isEmpty() {
-        return mMedia.isEmpty();
-    }
-
-    public Iterator<MediaModel> iterator() {
-        return mMedia.iterator();
-    }
-
-    public boolean remove(Object object) {
-        if ((object != null) && (object instanceof MediaModel)
-                && internalRemove(object)) {
-            notifyModelChanged(true);
-            return true;
-        }
-        return false;
-    }
-
-    public boolean removeAll(Collection<?> collection) {
-        throw new UnsupportedOperationException("Operation not supported.");
-    }
-
-    public boolean retainAll(Collection<?> collection) {
-        throw new UnsupportedOperationException("Operation not supported.");
-    }
-
-    public int size() {
-        return mMedia.size();
-    }
-
-    public Object[] toArray() {
-        return mMedia.toArray();
-    }
-
-    public <T> T[] toArray(T[] array) {
-        return mMedia.toArray(array);
-    }
-
-    public void add(int location, MediaModel object) {
-        throw new UnsupportedOperationException("Operation not supported.");
-    }
-
-    public boolean addAll(int location,
-            Collection<? extends MediaModel> collection) {
-        throw new UnsupportedOperationException("Operation not supported.");
-    }
-
-    public MediaModel get(int location) {
-        return mMedia.get(location);
-    }
-
-    public int indexOf(Object object) {
-        return mMedia.indexOf(object);
-    }
-
-    public int lastIndexOf(Object object) {
-        return mMedia.lastIndexOf(object);
-    }
-
-    public ListIterator<MediaModel> listIterator() {
-        return mMedia.listIterator();
-    }
-
-    public ListIterator<MediaModel> listIterator(int location) {
-        return mMedia.listIterator(location);
-    }
-
-    public MediaModel remove(int location) {
-        MediaModel media = mMedia.get(location);
-        if ((media != null) && internalRemove(media)) {
-            notifyModelChanged(true);
-        }
-        return media;
-    }
-
-    public MediaModel set(int location, MediaModel object) {
-        throw new UnsupportedOperationException("Operation not supported.");
-    }
-
-    public List<MediaModel> subList(int start, int end) {
-        return mMedia.subList(start, end);
-    }
-
-    /**
-     * @return the mVisible
-     */
-    public boolean isVisible() {
-        return mVisible;
-    }
-
-    /**
-     * @param visible the mVisible to set
-     */
-    public void setVisible(boolean visible) {
-        mVisible = visible;
-        notifyModelChanged(true);
-    }
-
-    /**
-     * @return the mFill
-     */
-    public short getFill() {
-        return mFill;
-    }
-
-    /**
-     * @param fill the mFill to set
-     */
-    public void setFill(short fill) {
-        mFill = fill;
-        notifyModelChanged(true);
-    }
-
-    @Override
-    protected void registerModelChangedObserverInDescendants(
-            IModelChangedObserver observer) {
-        for (MediaModel media : mMedia) {
-            media.registerModelChangedObserver(observer);
-        }
-    }
-
-    @Override
-    protected void unregisterModelChangedObserverInDescendants(
-            IModelChangedObserver observer) {
-        for (MediaModel media : mMedia) {
-            media.unregisterModelChangedObserver(observer);
-        }
-    }
-
-    @Override
-    protected void unregisterAllModelChangedObserversInDescendants() {
-        for (MediaModel media : mMedia) {
-            media.unregisterAllModelChangedObservers();
-        }
-    }
-
-    // EventListener Interface
-    public void handleEvent(Event evt) {
-        if (evt.getType().equals(SmilParElementImpl.SMIL_SLIDE_START_EVENT)) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Start to play slide: " + this);
-            }
-            mVisible = true;
-        } else if (mFill != ElementTime.FILL_FREEZE) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Stop playing slide: " + this);
-            }
-            mVisible = false;
-        }
-
-        notifyModelChanged(false);
-    }
-
-    public boolean hasText() {
-        return mText != null;
-    }
-
-    public boolean hasImage() {
-        return mImage != null;
-    }
-
-    public boolean hasAudio() {
-        return mAudio != null;
-    }
-
-    public boolean hasVideo() {
-        return mVideo != null;
-    }
-
-    public boolean removeText() {
-        return remove(mText);
-    }
-
-    public boolean removeImage() {
-        return remove(mImage);
-    }
-
-    public boolean removeAudio() {
-        return remove(mAudio);
-    }
-
-    public boolean removeVideo() {
-        return remove(mVideo);
-    }
-
-    public TextModel getText() {
-        return (TextModel) mText;
-    }
-
-    public ImageModel getImage() {
-        return (ImageModel) mImage;
-    }
-
-    public AudioModel getAudio() {
-        return (AudioModel) mAudio;
-    }
-
-    public VideoModel getVideo() {
-        return (VideoModel) mVideo;
-    }
-
-    public void updateDuration(int duration) {
-        if (duration <= 0) {
-            return;
-        }
-
-        if ((duration > mDuration)
-                || (mDuration == DEFAULT_SLIDE_DURATION)) {
-            mDuration = duration;
-        }
-    }
-}
diff --git a/src/com/android/mms/model/SlideshowModel.java b/src/com/android/mms/model/SlideshowModel.java
deleted file mode 100644
index 7f00be6..0000000
--- a/src/com/android/mms/model/SlideshowModel.java
+++ /dev/null
@@ -1,548 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-
-import com.android.mms.ContentRestrictionException;
-import com.android.mms.R;
-import com.android.mms.dom.smil.parser.SmilXmlSerializer;
-import com.android.mms.drm.DrmWrapper;
-import com.android.mms.layout.LayoutManager;
-import com.google.android.mms.ContentType;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.GenericPdu;
-import com.google.android.mms.pdu.MultimediaMessagePdu;
-import com.google.android.mms.pdu.PduBody;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduPart;
-import com.google.android.mms.pdu.PduPersister;
-
-import org.w3c.dom.NodeList;
-import org.w3c.dom.events.EventTarget;
-import org.w3c.dom.smil.SMILDocument;
-import org.w3c.dom.smil.SMILElement;
-import org.w3c.dom.smil.SMILLayoutElement;
-import org.w3c.dom.smil.SMILMediaElement;
-import org.w3c.dom.smil.SMILParElement;
-import org.w3c.dom.smil.SMILRegionElement;
-import org.w3c.dom.smil.SMILRootLayoutElement;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.drm.mobile1.DrmException;
-import android.net.Uri;
-import android.text.TextUtils;
-import android.util.Log;
-import android.widget.Toast;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-public class SlideshowModel extends Model
-        implements List<SlideModel>, IModelChangedObserver {
-    private static final String TAG = "SlideshowModel";
-
-    private final LayoutModel mLayout;
-    private final ArrayList<SlideModel> mSlides;
-    private SMILDocument mDocumentCache;
-    private PduBody mPduBodyCache;
-    private int mCurrentMessageSize;
-    private ContentResolver mContentResolver;
-
-    private SlideshowModel(ContentResolver contentResolver) {
-        mLayout = new LayoutModel();
-        mSlides = new ArrayList<SlideModel>();
-        mContentResolver = contentResolver;
-    }
-
-    private SlideshowModel (
-            LayoutModel layouts, ArrayList<SlideModel> slides,
-            SMILDocument documentCache, PduBody pbCache,
-            ContentResolver contentResolver) {
-        mLayout = layouts;
-        mSlides = slides;
-        mContentResolver = contentResolver;
-
-        mDocumentCache = documentCache;
-        mPduBodyCache = pbCache;
-        for (SlideModel slide : mSlides) {
-            increaseMessageSize(slide.getSlideSize());
-            slide.setParent(this);
-        }
-    }
-
-    public static SlideshowModel createNew(Context context) {
-        return new SlideshowModel(context.getContentResolver());
-    }
-
-    public static SlideshowModel createFromMessageUri(
-            Context context, Uri uri) throws MmsException {
-        return createFromPduBody(context, getPduBody(context, uri));
-    }
-
-    public static SlideshowModel createFromPduBody(Context context, PduBody pb) throws MmsException {
-        SMILDocument document = SmilHelper.getDocument(pb);
-
-        // Create root-layout model.
-        SMILLayoutElement sle = document.getLayout();
-        SMILRootLayoutElement srle = sle.getRootLayout();
-        int w = srle.getWidth();
-        int h = srle.getHeight();
-        if ((w == 0) || (h == 0)) {
-            w = LayoutManager.getInstance().getLayoutParameters().getWidth();
-            h = LayoutManager.getInstance().getLayoutParameters().getHeight();
-            srle.setWidth(w);
-            srle.setHeight(h);
-        }
-        RegionModel rootLayout = new RegionModel(
-                null, 0, 0, w, h);
-
-        // Create region models.
-        ArrayList<RegionModel> regions = new ArrayList<RegionModel>();
-        NodeList nlRegions = sle.getRegions();
-        int regionsNum = nlRegions.getLength();
-
-        for (int i = 0; i < regionsNum; i++) {
-            SMILRegionElement sre = (SMILRegionElement) nlRegions.item(i);
-            RegionModel r = new RegionModel(sre.getId(), sre.getFit(),
-                    sre.getLeft(), sre.getTop(), sre.getWidth(), sre.getHeight(),
-                    sre.getBackgroundColor());
-            regions.add(r);
-        }
-        LayoutModel layouts = new LayoutModel(rootLayout, regions);
-
-        // Create slide models.
-        SMILElement docBody = document.getBody();
-        NodeList slideNodes = docBody.getChildNodes();
-        int slidesNum = slideNodes.getLength();
-        ArrayList<SlideModel> slides = new ArrayList<SlideModel>(slidesNum);
-
-        for (int i = 0; i < slidesNum; i++) {
-            // FIXME: This is NOT compatible with the SMILDocument which is
-            // generated by some other mobile phones.
-            SMILParElement par = (SMILParElement) slideNodes.item(i);
-
-            // Create media models for each slide.
-            NodeList mediaNodes = par.getChildNodes();
-            int mediaNum = mediaNodes.getLength();
-            ArrayList<MediaModel> mediaSet = new ArrayList<MediaModel>(mediaNum);
-
-            for (int j = 0; j < mediaNum; j++) {
-                SMILMediaElement sme = (SMILMediaElement) mediaNodes.item(j);
-                try {
-                    MediaModel media = MediaModelFactory.getMediaModel(
-                            context, sme, layouts, pb);
-                    SmilHelper.addMediaElementEventListeners(
-                            (EventTarget) sme, media);
-                    mediaSet.add(media);
-                } catch (DrmException e) {
-                    Log.e(TAG, e.getMessage(), e);
-                } catch (IOException e) {
-                    Log.e(TAG, e.getMessage(), e);
-                } catch (IllegalArgumentException e) {
-                    Log.e(TAG, e.getMessage(), e);
-                }
-            }
-
-            SlideModel slide = new SlideModel((int) (par.getDur() * 1000), mediaSet);
-            slide.setFill(par.getFill());
-            SmilHelper.addParElementEventListeners((EventTarget) par, slide);
-            slides.add(slide);
-        }
-
-        SlideshowModel slideshow = new SlideshowModel(layouts, slides, document, pb,
-                context.getContentResolver());
-        slideshow.registerModelChangedObserver(slideshow);
-        return slideshow;
-    }
-
-    public PduBody toPduBody() {
-        if (mPduBodyCache == null) {
-            mDocumentCache = SmilHelper.getDocument(this);
-            mPduBodyCache = makePduBody(mDocumentCache);
-        }
-        return mPduBodyCache;
-    }
-    
-    private PduBody makePduBody(SMILDocument document) {
-        return makePduBody(null, document, false);
-    }
-
-    private PduBody makePduBody(Context context, SMILDocument document, boolean isMakingCopy) {
-        PduBody pb = new PduBody();
-
-        boolean hasForwardLock = false;
-        for (SlideModel slide : mSlides) {
-            for (MediaModel media : slide) {
-                if (isMakingCopy) {
-                    if (media.isDrmProtected() && !media.isAllowedToForward()) {
-                        hasForwardLock = true;
-                        continue;
-                    }
-                }
-
-                PduPart part = new PduPart();
-
-                if (media.isText()) {
-                    TextModel text = (TextModel) media;
-                    // Don't create empty text part.
-                    if (TextUtils.isEmpty(text.getText())) {
-                        continue;
-                    }
-                    // Set Charset if it's a text media.
-                    part.setCharset(text.getCharset());
-                }
-
-                // Set Content-Type.
-                part.setContentType(media.getContentType().getBytes());
-
-                String src = media.getSrc();
-                String location;
-                boolean startWithContentId = src.startsWith("cid:");
-                if (startWithContentId) {
-                    location = src.substring("cid:".length());
-                } else {
-                    location = src;
-                }
-
-                // Set Content-Location.
-                part.setContentLocation(location.getBytes());
-
-                // Set Content-Id.
-                if (startWithContentId) {
-                    //Keep the original Content-Id.
-                    part.setContentId(location.getBytes());
-                }
-                else {
-                    int index = location.lastIndexOf(".");
-                    String contentId = (index == -1) ? location
-                            : location.substring(0, index);
-                    part.setContentId(contentId.getBytes());
-                }
-
-                if (media.isDrmProtected()) {
-                    DrmWrapper wrapper = media.getDrmObject();
-                    part.setDataUri(wrapper.getOriginalUri());
-                    part.setData(wrapper.getOriginalData());
-                } else if (media.isText()) {
-                    part.setData(((TextModel) media).getText().getBytes());
-                } else if (media.isImage() || media.isVideo() || media.isAudio()) {
-                    part.setDataUri(media.getUri());
-                } else {
-                    Log.w(TAG, "Unsupport media: " + media);
-                }
-
-                pb.addPart(part);
-            }
-        }
-
-        if (hasForwardLock && isMakingCopy && context != null) {
-            Toast.makeText(context,
-                    context.getString(R.string.cannot_forward_drm_obj),
-                    Toast.LENGTH_LONG).show();
-            document = SmilHelper.getDocument(pb);
-        }
-
-        // Create and insert SMIL part(as the first part) into the PduBody.
-        ByteArrayOutputStream out = new ByteArrayOutputStream();
-        SmilXmlSerializer.serialize(document, out);
-        PduPart smilPart = new PduPart();
-        smilPart.setContentId("smil".getBytes());
-        smilPart.setContentLocation("smil.xml".getBytes());
-        smilPart.setContentType(ContentType.APP_SMIL.getBytes());
-        smilPart.setData(out.toByteArray());
-        pb.addPart(0, smilPart);
-
-        return pb;
-    }
-
-    public PduBody makeCopy(Context context) {
-        return makePduBody(context, SmilHelper.getDocument(this), true);
-    }
-
-    public SMILDocument toSmilDocument() {
-        if (mDocumentCache == null) {
-            mDocumentCache = SmilHelper.getDocument(this);
-        }
-        return mDocumentCache;
-    }
-
-    public static PduBody getPduBody(Context context, Uri msg) throws MmsException {
-        PduPersister p = PduPersister.getPduPersister(context);
-        GenericPdu pdu = p.load(msg);
-
-        int msgType = pdu.getMessageType();
-        if ((msgType == PduHeaders.MESSAGE_TYPE_SEND_REQ)
-                || (msgType == PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF)) {
-            return ((MultimediaMessagePdu) pdu).getBody();
-        } else {
-            throw new MmsException();
-        }
-    }
-
-    public void setCurrentMessageSize(int size) {
-        mCurrentMessageSize = size;
-    }
-
-    public int getCurrentMessageSize() {
-        return mCurrentMessageSize;
-    }
-
-    public void increaseMessageSize(int increaseSize) {
-        if (increaseSize > 0) {
-            mCurrentMessageSize += increaseSize;
-        }
-    }
-
-    public void decreaseMessageSize(int decreaseSize) {
-        if (decreaseSize > 0) {
-            mCurrentMessageSize -= decreaseSize;
-        }
-    }
-
-    public LayoutModel getLayout() {
-        return mLayout;
-    }
-
-    //
-    // Implement List<E> interface.
-    //
-    public boolean add(SlideModel object) {
-        int increaseSize = object.getSlideSize();
-        checkMessageSize(increaseSize);
-
-        if ((object != null) && mSlides.add(object)) {
-            increaseMessageSize(increaseSize);
-            object.registerModelChangedObserver(this);
-            for (IModelChangedObserver observer : mModelChangedObservers) {
-                object.registerModelChangedObserver(observer);
-            }
-            notifyModelChanged(true);
-            return true;
-        }
-        return false;
-    }
-
-    public boolean addAll(Collection<? extends SlideModel> collection) {
-        throw new UnsupportedOperationException("Operation not supported.");
-    }
-
-    public void clear() {
-        if (mSlides.size() > 0) {
-            for (SlideModel slide : mSlides) {
-                slide.unregisterModelChangedObserver(this);
-                for (IModelChangedObserver observer : mModelChangedObservers) {
-                    slide.unregisterModelChangedObserver(observer);
-                }
-            }
-            mCurrentMessageSize = 0;
-            mSlides.clear();
-            notifyModelChanged(true);
-        }
-    }
-
-    public boolean contains(Object object) {
-        return mSlides.contains(object);
-    }
-
-    public boolean containsAll(Collection<?> collection) {
-        return mSlides.containsAll(collection);
-    }
-
-    public boolean isEmpty() {
-        return mSlides.isEmpty();
-    }
-
-    public Iterator<SlideModel> iterator() {
-        return mSlides.iterator();
-    }
-
-    public boolean remove(Object object) {
-        if ((object != null) && mSlides.remove(object)) {
-            SlideModel slide = (SlideModel) object;
-            decreaseMessageSize(slide.getSlideSize());
-            slide.unregisterAllModelChangedObservers();
-            notifyModelChanged(true);
-            return true;
-        }
-        return false;
-    }
-
-    public boolean removeAll(Collection<?> collection) {
-        throw new UnsupportedOperationException("Operation not supported.");
-    }
-
-    public boolean retainAll(Collection<?> collection) {
-        throw new UnsupportedOperationException("Operation not supported.");
-    }
-
-    public int size() {
-        return mSlides.size();
-    }
-
-    public Object[] toArray() {
-        return mSlides.toArray();
-    }
-
-    public <T> T[] toArray(T[] array) {
-        return mSlides.toArray(array);
-    }
-
-    public void add(int location, SlideModel object) {
-        if (object != null) {
-            int increaseSize = object.getSlideSize();
-            checkMessageSize(increaseSize);
-
-            mSlides.add(location, object);
-            increaseMessageSize(increaseSize);
-            object.registerModelChangedObserver(this);
-            for (IModelChangedObserver observer : mModelChangedObservers) {
-                object.registerModelChangedObserver(observer);
-            }
-            notifyModelChanged(true);
-        }
-    }
-
-    public boolean addAll(int location,
-            Collection<? extends SlideModel> collection) {
-        throw new UnsupportedOperationException("Operation not supported.");
-    }
-
-    public SlideModel get(int location) {
-        return mSlides.get(location);
-    }
-
-    public int indexOf(Object object) {
-        return mSlides.indexOf(object);
-    }
-
-    public int lastIndexOf(Object object) {
-        return mSlides.lastIndexOf(object);
-    }
-
-    public ListIterator<SlideModel> listIterator() {
-        return mSlides.listIterator();
-    }
-
-    public ListIterator<SlideModel> listIterator(int location) {
-        return mSlides.listIterator(location);
-    }
-
-    public SlideModel remove(int location) {
-        SlideModel slide = mSlides.remove(location);
-        if (slide != null) {
-            decreaseMessageSize(slide.getSlideSize());
-            slide.unregisterAllModelChangedObservers();
-            notifyModelChanged(true);
-        }
-        return slide;
-    }
-
-    public SlideModel set(int location, SlideModel object) {
-        SlideModel slide = mSlides.get(location);
-        if (null != object) {
-            int removeSize = 0;
-            int addSize = object.getSlideSize();
-            if (null != slide) {
-                removeSize = slide.getSlideSize();
-            }
-            if (addSize > removeSize) {
-                checkMessageSize(addSize - removeSize);
-                increaseMessageSize(addSize - removeSize);
-            } else {
-                decreaseMessageSize(removeSize - addSize);
-            }
-        }
-
-        slide =  mSlides.set(location, object);
-        if (slide != null) {
-            slide.unregisterAllModelChangedObservers();
-        }
-
-        if (object != null) {
-            object.registerModelChangedObserver(this);
-            for (IModelChangedObserver observer : mModelChangedObservers) {
-                object.registerModelChangedObserver(observer);
-            }
-        }
-
-        notifyModelChanged(true);
-        return slide;
-    }
-
-    public List<SlideModel> subList(int start, int end) {
-        return mSlides.subList(start, end);
-    }
-
-    @Override
-    protected void registerModelChangedObserverInDescendants(
-            IModelChangedObserver observer) {
-        mLayout.registerModelChangedObserver(observer);
-
-        for (SlideModel slide : mSlides) {
-            slide.registerModelChangedObserver(observer);
-        }
-    }
-
-    @Override
-    protected void unregisterModelChangedObserverInDescendants(
-            IModelChangedObserver observer) {
-        mLayout.unregisterModelChangedObserver(observer);
-
-        for (SlideModel slide : mSlides) {
-            slide.unregisterModelChangedObserver(observer);
-        }
-    }
-
-    @Override
-    protected void unregisterAllModelChangedObserversInDescendants() {
-        mLayout.unregisterAllModelChangedObservers();
-
-        for (SlideModel slide : mSlides) {
-            slide.unregisterAllModelChangedObservers();
-        }
-    }
-
-    public void onModelChanged(Model model, boolean dataChanged) {
-        if (dataChanged) {
-            mDocumentCache = null;
-            mPduBodyCache = null;
-        }
-    }
-
-    public void sync(PduBody pb) {
-        for (SlideModel slide : mSlides) {
-            for (MediaModel media : slide) {
-                PduPart part = pb.getPartByContentLocation(media.getSrc());
-                if (part != null) {
-                    media.setUri(part.getDataUri());
-                }
-            }
-        }
-    }
-
-    public void checkMessageSize(int increaseSize) throws ContentRestrictionException {
-        ContentRestriction cr = ContentRestrictionFactory.getContentRestriction();
-        cr.checkMessageSize(mCurrentMessageSize, increaseSize, mContentResolver);
-    }
-}
diff --git a/src/com/android/mms/model/SmilHelper.java b/src/com/android/mms/model/SmilHelper.java
deleted file mode 100644
index 423fd1f..0000000
--- a/src/com/android/mms/model/SmilHelper.java
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-import static com.android.mms.dom.smil.SmilMediaElementImpl.SMIL_MEDIA_END_EVENT;
-import static com.android.mms.dom.smil.SmilMediaElementImpl.SMIL_MEDIA_PAUSE_EVENT;
-import static com.android.mms.dom.smil.SmilMediaElementImpl.SMIL_MEDIA_SEEK_EVENT;
-import static com.android.mms.dom.smil.SmilMediaElementImpl.SMIL_MEDIA_START_EVENT;
-import static com.android.mms.dom.smil.SmilParElementImpl.SMIL_SLIDE_END_EVENT;
-import static com.android.mms.dom.smil.SmilParElementImpl.SMIL_SLIDE_START_EVENT;
-
-import com.android.mms.dom.smil.SmilDocumentImpl;
-import com.android.mms.dom.smil.parser.SmilXmlParser;
-import com.android.mms.dom.smil.parser.SmilXmlSerializer;
-import com.android.mms.drm.DrmWrapper;
-import com.google.android.mms.ContentType;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.PduBody;
-import com.google.android.mms.pdu.PduPart;
-
-import org.w3c.dom.events.EventTarget;
-import org.w3c.dom.smil.SMILDocument;
-import org.w3c.dom.smil.SMILElement;
-import org.w3c.dom.smil.SMILLayoutElement;
-import org.w3c.dom.smil.SMILMediaElement;
-import org.w3c.dom.smil.SMILParElement;
-import org.w3c.dom.smil.SMILRegionElement;
-import org.w3c.dom.smil.SMILRegionMediaElement;
-import org.w3c.dom.smil.SMILRootLayoutElement;
-import org.xml.sax.SAXException;
-
-import android.drm.mobile1.DrmException;
-import android.text.TextUtils;
-import android.util.Config;
-import android.util.Log;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-
-public class SmilHelper {
-    private static final String TAG = "SmilHelper";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    public static final String ELEMENT_TAG_TEXT = "text";
-    public static final String ELEMENT_TAG_IMAGE = "img";
-    public static final String ELEMENT_TAG_AUDIO = "audio";
-    public static final String ELEMENT_TAG_VIDEO = "video";
-    public static final String ELEMENT_TAG_REF = "ref";
-
-    private SmilHelper() {
-        // Never instantiate this class.
-    }
-
-    public static SMILDocument getDocument(PduBody pb) {
-        // Find SMIL part in the message.
-        PduPart smilPart = findSmilPart(pb);
-        SMILDocument document = null;
-
-        // Try to load SMIL document from existing part.
-        if (smilPart != null) {
-            document = getSmilDocument(smilPart);
-        }
-
-        if (document == null) {
-            // Create a new SMIL document.
-            document = createSmilDocument(pb);
-        }
-
-        return document;
-    }
-
-    public static SMILDocument getDocument(SlideshowModel model) {
-        return createSmilDocument(model);
-    }
-
-    /**
-     * Find a SMIL part in the MM.
-     *
-     * @return The existing SMIL part or null if no SMIL part was found.
-     */
-    private static PduPart findSmilPart(PduBody body) {
-        int partNum = body.getPartsNum();
-        for(int i = 0; i < partNum; i++) {
-            PduPart part = body.getPart(i);
-            if (Arrays.equals(part.getContentType(),
-                            ContentType.APP_SMIL.getBytes())) {
-                // Sure only one SMIL part.
-                return part;
-            }
-        }
-        return null;
-    }
-
-    private static SMILDocument validate(SMILDocument in) {
-        // TODO: add more validating facilities.
-        return in;
-    }
-
-    /**
-     * Parse SMIL message and retrieve SMILDocument.
-     *
-     * @return A SMILDocument or null if parsing failed.
-     */
-    private static SMILDocument getSmilDocument(PduPart smilPart) {
-        try {
-            byte[] data = smilPart.getData();
-            if (data != null) {
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "Parsing SMIL document.");
-                    Log.v(TAG, new String(data));
-                }
-
-                ByteArrayInputStream bais = new ByteArrayInputStream(data);
-                SMILDocument document = new SmilXmlParser().parse(bais);
-                return validate(document);
-            }
-        } catch (IOException e) {
-            Log.e(TAG, "Failed to parse SMIL document.", e);
-        } catch (SAXException e) {
-            Log.e(TAG, "Failed to parse SMIL document.", e);
-        } catch (MmsException e) {
-            Log.e(TAG, "Failed to parse SMIL document.", e);
-        }
-        return null;
-    }
-
-    public static SMILParElement addPar(SMILDocument document) {
-        SMILParElement par = (SMILParElement) document.createElement("par");
-        // Set duration to eight seconds by default.
-        par.setDur(8.0f);
-        document.getBody().appendChild(par);
-        return par;
-    }
-
-    public static SMILMediaElement createMediaElement(
-            String tag, SMILDocument document, String src) {
-        SMILMediaElement mediaElement =
-                (SMILMediaElement) document.createElement(tag);
-        mediaElement.setSrc(src);
-        return mediaElement;
-    }
-
-    private static SMILDocument createSmilDocument(PduBody pb) {
-        if (Config.LOGV) {
-            Log.v(TAG, "Creating default SMIL document.");
-        }
-
-        SMILDocument document = new SmilDocumentImpl();
-
-        // Create root element.
-        // FIXME: Should we create root element in the constructor of document?
-        SMILElement smil = (SMILElement) document.createElement("smil");
-        smil.setAttribute("xmlns", "http://www.w3.org/2001/SMIL20/Language");
-        document.appendChild(smil);
-
-        // Create <head> and <layout> element.
-        SMILElement head = (SMILElement) document.createElement("head");
-        smil.appendChild(head);
-
-        SMILLayoutElement layout = (SMILLayoutElement) document.createElement("layout");
-        head.appendChild(layout);
-
-        // Create <body> element and add a empty <par>.
-        SMILElement body = (SMILElement) document.createElement("body");
-        smil.appendChild(body);
-        SMILParElement par = addPar(document);
-
-        // Create media objects for the parts in PDU.
-        int partsNum = pb.getPartsNum();
-        if (partsNum == 0) {
-            return document;
-        }
-
-        boolean hasText = false;
-        boolean hasMedia = false;
-        for (int i = 0; i < partsNum; i++) {
-            // Create new <par> element.
-            if ((par == null) || (hasMedia && hasText)) {
-                par = addPar(document);
-                hasText = false;
-                hasMedia = false;
-            }
-
-            PduPart part = pb.getPart(i);
-            String contentType = new String(part.getContentType());
-            if (ContentType.isDrmType(contentType)) {
-                DrmWrapper dw;
-                try {
-                    dw = new DrmWrapper(contentType, part.getDataUri(),
-                                        part.getData());
-                    contentType = dw.getContentType();
-                } catch (DrmException e) {
-                    Log.e(TAG, e.getMessage(), e);
-                } catch (IOException e) {
-                    Log.e(TAG, e.getMessage(), e);
-                }
-            }
-
-            if (contentType.equals(ContentType.TEXT_PLAIN)
-                    || contentType.equalsIgnoreCase(ContentType.APP_WAP_XHTML)) {
-                SMILMediaElement textElement = createMediaElement(
-                        ELEMENT_TAG_TEXT, document, part.generateLocation());
-                par.appendChild(textElement);
-                hasText = true;
-            } else if (ContentType.isImageType(contentType)) {
-                SMILMediaElement imageElement = createMediaElement(
-                        ELEMENT_TAG_IMAGE, document, part.generateLocation());
-                par.appendChild(imageElement);
-                hasMedia = true;
-            } else if (ContentType.isVideoType(contentType)) {
-                SMILMediaElement videoElement = createMediaElement(
-                        ELEMENT_TAG_VIDEO, document, part.generateLocation());
-                par.appendChild(videoElement);
-                hasMedia = true;
-            } else if (ContentType.isAudioType(contentType)) {
-                SMILMediaElement audioElement = createMediaElement(
-                        ELEMENT_TAG_AUDIO, document, part.generateLocation());
-                par.appendChild(audioElement);
-                hasMedia = true;
-            } else {
-                // TODO: handle other media types.
-                Log.w(TAG, "unsupport media type");
-            }
-        }
-
-        return document;
-    }
-
-    private static SMILDocument createSmilDocument(SlideshowModel slideshow) {
-        if (Config.LOGV) {
-            Log.v(TAG, "Creating SMIL document from SlideshowModel.");
-        }
-
-        SMILDocument document = new SmilDocumentImpl();
-
-        // Create SMIL and append it to document
-        SMILElement smilElement = (SMILElement) document.createElement("smil");
-        document.appendChild(smilElement);
-
-        // Create HEAD and append it to SMIL
-        SMILElement headElement = (SMILElement) document.createElement("head");
-        smilElement.appendChild(headElement);
-
-        // Create LAYOUT and append it to HEAD
-        SMILLayoutElement layoutElement = (SMILLayoutElement)
-                document.createElement("layout");
-        headElement.appendChild(layoutElement);
-
-        // Create ROOT-LAYOUT and append it to LAYOUT
-        SMILRootLayoutElement rootLayoutElement =
-                (SMILRootLayoutElement) document.createElement("root-layout");
-        LayoutModel layouts = slideshow.getLayout();
-        rootLayoutElement.setWidth(layouts.getLayoutWidth());
-        rootLayoutElement.setHeight(layouts.getLayoutHeight());
-        String bgColor = layouts.getBackgroundColor();
-        if (!TextUtils.isEmpty(bgColor)) {
-            rootLayoutElement.setBackgroundColor(bgColor);
-        }
-        layoutElement.appendChild(rootLayoutElement);
-
-        // Create REGIONs and append them to LAYOUT
-        ArrayList<RegionModel> regions = layouts.getRegions();
-        ArrayList<SMILRegionElement> smilRegions = new ArrayList<SMILRegionElement>();
-        for (RegionModel r : regions) {
-            SMILRegionElement smilRegion = (SMILRegionElement) document.createElement("region");
-            smilRegion.setId(r.getRegionId());
-            smilRegion.setLeft(r.getLeft());
-            smilRegion.setTop(r.getTop());
-            smilRegion.setWidth(r.getWidth());
-            smilRegion.setHeight(r.getHeight());
-            smilRegion.setFit(r.getFit());
-            smilRegions.add(smilRegion);
-        }
-
-        // Create BODY and append it to the document.
-        SMILElement bodyElement = (SMILElement) document.createElement("body");
-        smilElement.appendChild(bodyElement);
-
-        boolean txtRegionPresentInLayout = false;
-        boolean imgRegionPresentInLayout = false;
-        for (SlideModel slide : slideshow) {
-            // Create PAR element.
-            SMILParElement par = addPar(document);
-            par.setDur(slide.getDuration() / 1000f);
-
-            addParElementEventListeners((EventTarget) par, slide);
-
-            // Add all media elements.
-            for (MediaModel media : slide) {
-                SMILMediaElement sme = null;
-                String src = media.getSrc();
-                if (media instanceof TextModel) {
-                    TextModel text = (TextModel) media;
-                    if (TextUtils.isEmpty(text.getText())) {
-                        if (LOCAL_LOGV) {
-                            Log.v(TAG, "Empty text part ignored: " + text.getSrc());
-                        }
-                        continue;
-                    }
-                    sme = SmilHelper.createMediaElement(SmilHelper.ELEMENT_TAG_TEXT, document, src);
-                    txtRegionPresentInLayout = setRegion((SMILRegionMediaElement) sme,
-                                                         smilRegions,
-                                                         layoutElement,
-                                                         LayoutModel.TEXT_REGION_ID,
-                                                         txtRegionPresentInLayout);
-                } else if (media instanceof ImageModel) {
-                    sme = SmilHelper.createMediaElement(SmilHelper.ELEMENT_TAG_IMAGE, document, src);
-                    imgRegionPresentInLayout = setRegion((SMILRegionMediaElement) sme,
-                                                         smilRegions,
-                                                         layoutElement,
-                                                         LayoutModel.IMAGE_REGION_ID,
-                                                         imgRegionPresentInLayout);
-                } else if (media instanceof VideoModel) {
-                    sme = SmilHelper.createMediaElement(SmilHelper.ELEMENT_TAG_VIDEO, document, src);
-                    imgRegionPresentInLayout = setRegion((SMILRegionMediaElement) sme,
-                                                         smilRegions,
-                                                         layoutElement,
-                                                         LayoutModel.IMAGE_REGION_ID,
-                                                         imgRegionPresentInLayout);
-                } else if (media instanceof AudioModel) {
-                    sme = SmilHelper.createMediaElement(SmilHelper.ELEMENT_TAG_AUDIO, document, src);
-                } else {
-                    Log.w(TAG, "Unsupport media: " + media);
-                    continue;
-                }
-
-                // Set timing information.
-                int begin = media.getBegin();
-                if (begin != 0) {
-                    sme.setAttribute("begin", String.valueOf(begin / 1000));
-                }
-                int duration = media.getDuration();
-                if (duration != 0) {
-                    sme.setDur((float) duration / 1000);
-                }
-                par.appendChild(sme);
-
-                addMediaElementEventListeners((EventTarget) sme, media);
-            }
-        }
-
-        if (LOCAL_LOGV) {
-            ByteArrayOutputStream out = new ByteArrayOutputStream();
-            SmilXmlSerializer.serialize(document, out);
-            Log.v(TAG, out.toString());
-        }
-
-        return document;
-    }
-
-    private static SMILRegionElement findRegionElementById(
-            ArrayList<SMILRegionElement> smilRegions, String rId) {
-        for (SMILRegionElement smilRegion : smilRegions) {
-            if (smilRegion.getId().equals(rId)) {
-                return smilRegion;
-            }
-        }
-        return null;
-    }
-
-    private static boolean setRegion(SMILRegionMediaElement srme,
-                                     ArrayList<SMILRegionElement> smilRegions,
-                                     SMILLayoutElement smilLayout,
-                                     String regionId,
-                                     boolean regionPresentInLayout) {
-        SMILRegionElement smilRegion = findRegionElementById(smilRegions, regionId);
-        if (!regionPresentInLayout && smilRegion != null) {
-            srme.setRegion(smilRegion);
-            smilLayout.appendChild(smilRegion);
-            return true;
-        }
-        return false;
-    }
-
-    static void addMediaElementEventListeners(
-            EventTarget target, MediaModel media) {
-        // To play the media with SmilPlayer, we should add them
-        // as EventListener into an EventTarget.
-        target.addEventListener(SMIL_MEDIA_START_EVENT, media, false);
-        target.addEventListener(SMIL_MEDIA_END_EVENT, media, false);
-        target.addEventListener(SMIL_MEDIA_PAUSE_EVENT, media, false);
-        target.addEventListener(SMIL_MEDIA_SEEK_EVENT, media, false);
-    }
-
-    static void addParElementEventListeners(
-            EventTarget target, SlideModel slide) {
-        // To play the slide with SmilPlayer, we should add it
-        // as EventListener into an EventTarget.
-        target.addEventListener(SMIL_SLIDE_START_EVENT, slide, false);
-        target.addEventListener(SMIL_SLIDE_END_EVENT, slide, false);
-    }
-}
diff --git a/src/com/android/mms/model/TextModel.java b/src/com/android/mms/model/TextModel.java
deleted file mode 100644
index 2f671f1..0000000
--- a/src/com/android/mms/model/TextModel.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-import com.android.mms.dom.smil.SmilMediaElementImpl;
-import com.android.mms.drm.DrmWrapper;
-import com.google.android.mms.pdu.CharacterSets;
-
-import org.w3c.dom.events.Event;
-import org.w3c.dom.smil.ElementTime;
-
-import android.content.Context;
-import android.drm.mobile1.DrmException;
-import android.util.Log;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-
-public class TextModel extends RegionMediaModel {
-    private static final String TAG = "TextModel";
-
-    private String mText;
-    private final int mCharset;
-
-    public TextModel(Context context, String contentType, String src, RegionModel region) {
-        this(context, contentType, src, CharacterSets.UTF_8, new byte[0], region);
-    }
-
-    public TextModel(Context context, String contentType, String src,
-            int charset, byte[] data, RegionModel region) {
-        super(context, SmilHelper.ELEMENT_TAG_TEXT, contentType, src,
-                data != null ? data : new byte[0], region);
-
-        if (charset == CharacterSets.ANY_CHARSET) {
-            // By default, we use ISO_8859_1 to decode the data
-            // which character set wasn't set.
-            charset = CharacterSets.ISO_8859_1;
-        }
-        mCharset = charset;
-        mText = extractTextFromData(data);
-    }
-
-    private String extractTextFromData(byte[] data) {
-        if (data != null) {
-            try {
-                if (CharacterSets.ANY_CHARSET == mCharset) {
-                    return new String(data); // system default encoding.
-                } else {
-                    String name = CharacterSets.getMimeName(mCharset);
-                    return new String(data, name);
-                }
-            } catch (UnsupportedEncodingException e) {
-                Log.e(TAG, "Unsupported encoding: " + mCharset, e);
-                return new String(data); // system default encoding.
-            }
-        }
-        return "";
-    }
-
-    public TextModel(Context context, String contentType, String src, int charset,
-            DrmWrapper wrapper, RegionModel regionModel) throws IOException {
-        super(context, SmilHelper.ELEMENT_TAG_TEXT, contentType, src, wrapper, regionModel);
-
-        if (charset == CharacterSets.ANY_CHARSET) {
-            // By default, we use ISO_8859_1 to decode the data
-            // which character set wasn't set.
-            charset = CharacterSets.ISO_8859_1;
-        }
-        mCharset = charset;
-    }
-
-    public String getText() {
-        if (mText == null) {
-            try {
-                mText = extractTextFromData(getData());
-            } catch (DrmException e) {
-                Log.e(TAG, e.getMessage(), e);
-                // Display DRM error message in place.
-                mText = e.getMessage();
-            }
-        }
-        return mText;
-    }
-
-    public void setText(String text) {
-        mText = text;
-        notifyModelChanged(true);
-    }
-
-    public int getCharset() {
-        return mCharset;
-    }
-
-    // EventListener Interface
-    public void handleEvent(Event evt) {
-        if (evt.getType().equals(SmilMediaElementImpl.SMIL_MEDIA_START_EVENT)) {
-            mVisible = true;
-        } else if (mFill != ElementTime.FILL_FREEZE) {
-            mVisible = false;
-        }
-
-        notifyModelChanged(false);
-    }
-}
diff --git a/src/com/android/mms/model/VideoModel.java b/src/com/android/mms/model/VideoModel.java
deleted file mode 100644
index 09765b2..0000000
--- a/src/com/android/mms/model/VideoModel.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.model;
-
-import com.android.mms.ContentRestrictionException;
-import com.android.mms.dom.smil.SmilMediaElementImpl;
-import com.android.mms.drm.DrmWrapper;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.util.SqliteWrapper;
-
-import org.w3c.dom.events.Event;
-import org.w3c.dom.smil.ElementTime;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.database.Cursor;
-import android.net.Uri;
-import android.provider.MediaStore.Images;
-import android.text.TextUtils;
-import android.util.Config;
-import android.util.Log;
-
-import java.io.IOException;
-
-public class VideoModel extends RegionMediaModel {
-    private static final String TAG = "VideoModel";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    public VideoModel(Context context, Uri uri, RegionModel region)
-            throws MmsException {
-        this(context, null, null, uri, region);
-        initModelFromUri(uri);
-        checkContentRestriction();
-    }
-
-    public VideoModel(Context context, String contentType, String src,
-            Uri uri, RegionModel region) throws MmsException {
-        super(context, SmilHelper.ELEMENT_TAG_VIDEO, contentType, src, uri, region);
-    }
-
-    public VideoModel(Context context, String contentType, String src,
-            DrmWrapper wrapper, RegionModel regionModel) throws IOException {
-        super(context, SmilHelper.ELEMENT_TAG_VIDEO, contentType, src, wrapper, regionModel);
-    }
-
-    private void initModelFromUri(Uri uri) throws MmsException {
-        ContentResolver cr = mContext.getContentResolver();
-        Cursor c = SqliteWrapper.query(mContext, cr, uri, null, null, null, null);
-
-        if (c != null) {
-            try {
-                if (c.moveToFirst()) {
-                    String path = c.getString(c.getColumnIndexOrThrow(Images.Media.DATA));
-                    mSrc = path.substring(path.lastIndexOf('/') + 1);
-                    mContentType = c.getString(c.getColumnIndexOrThrow(
-                            Images.Media.MIME_TYPE));
-                    if (TextUtils.isEmpty(mContentType)) {
-                        throw new MmsException("Type of media is unknown.");
-                    }
-
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, "New VideoModel created:"
-                                + " mSrc=" + mSrc
-                                + " mContentType=" + mContentType
-                                + " mUri=" + uri);
-                    }
-                } else {
-                    throw new MmsException("Nothing found: " + uri);
-                }
-            } finally {
-                c.close();
-            }
-        } else {
-            throw new MmsException("Bad URI: " + uri);
-        }
-
-        initMediaDuration();
-    }
-
-    // EventListener Interface
-    public void handleEvent(Event evt) {
-        String evtType = evt.getType();
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Handling event: " + evt.getType() + " on " + this);
-        }
-
-        MediaAction action = MediaAction.NO_ACTIVE_ACTION;
-        if (evtType.equals(SmilMediaElementImpl.SMIL_MEDIA_START_EVENT)) {
-            action = MediaAction.START;
-            mVisible = true;
-        } else if (evtType.equals(SmilMediaElementImpl.SMIL_MEDIA_END_EVENT)) {
-            action = MediaAction.STOP;
-            if (mFill != ElementTime.FILL_FREEZE) {
-                mVisible = false;
-            }
-        } else if (evtType.equals(SmilMediaElementImpl.SMIL_MEDIA_PAUSE_EVENT)) {
-            action = MediaAction.PAUSE;
-            mVisible = true;
-        } else if (evtType.equals(SmilMediaElementImpl.SMIL_MEDIA_SEEK_EVENT)) {
-            action = MediaAction.SEEK;
-            mSeekTo = evt.getSeekTo();
-            mVisible = true;
-        }
-
-        appendAction(action);
-        notifyModelChanged(false);
-    }
-
-    protected void checkContentRestriction() throws ContentRestrictionException {
-        ContentRestriction cr = ContentRestrictionFactory.getContentRestriction();
-        cr.checkVideoContentType(mContentType);
-    }
-
-    @Override
-    protected boolean isPlayable() {
-        return true;
-    }
-}
diff --git a/src/com/android/mms/transaction/AbstractRetryScheme.java b/src/com/android/mms/transaction/AbstractRetryScheme.java
deleted file mode 100644
index 3971394..0000000
--- a/src/com/android/mms/transaction/AbstractRetryScheme.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.transaction;
-
-import android.provider.Telephony.MmsSms;
-
-public abstract class AbstractRetryScheme {
-    public static final int OUTGOING = 1;
-    public static final int INCOMING = 2;
-
-    protected int mType;
-    protected int mRetriedTimes;
-    protected int mErrorType;
-
-    public AbstractRetryScheme() {
-        this(OUTGOING);
-    }
-
-    public AbstractRetryScheme(int type) {
-        this(type, 0);
-    }
-
-    public AbstractRetryScheme(int type, int retriedTimes) {
-        this(type, retriedTimes, MmsSms.ERR_TYPE_GENERIC);
-    }
-
-    public AbstractRetryScheme(int type, int retriedTimes, int errorType) {
-        mType = type;
-        mRetriedTimes = retriedTimes;
-        mErrorType = errorType;
-    }
-
-    abstract public int getRetryLimit();
-    abstract public long getWaitingInterval();
-}
diff --git a/src/com/android/mms/transaction/DefaultRetryScheme.java b/src/com/android/mms/transaction/DefaultRetryScheme.java
deleted file mode 100644
index 4ec9f57..0000000
--- a/src/com/android/mms/transaction/DefaultRetryScheme.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.transaction;
-
-import android.content.Context;
-import android.util.Config;
-import android.util.Log;
-
-/**
- * Default retry scheme, based on specs.
- */
-public class DefaultRetryScheme extends AbstractRetryScheme {
-    private static final String TAG = "DefaultRetryScheme";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private static final int[] sDefaultRetryScheme = {
-        0, 1 * 60 * 1000, 5 * 60 * 1000, 10 * 60 * 1000, 30 * 60 * 1000};
-
-    public DefaultRetryScheme(Context context, int type, int errorType) {
-        this(context, type, 0, errorType);
-    }
-
-    public DefaultRetryScheme(Context context, int type, int retriedTimes,
-            int errorType) {
-        super(type, retriedTimes, errorType);
-
-        mRetriedTimes = mRetriedTimes < 0 ? 0 : mRetriedTimes;
-        mRetriedTimes = mRetriedTimes >= sDefaultRetryScheme.length
-                ? sDefaultRetryScheme.length - 1 : mRetriedTimes;
-
-        // TODO Get retry scheme from preference.
-    }
-
-    @Override
-    public int getRetryLimit() {
-        return sDefaultRetryScheme.length;
-    }
-
-    @Override
-    public long getWaitingInterval() {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Next int: " + sDefaultRetryScheme[mRetriedTimes]);
-        }
-        return sDefaultRetryScheme[mRetriedTimes];
-    }
-}
diff --git a/src/com/android/mms/transaction/HttpUtils.java b/src/com/android/mms/transaction/HttpUtils.java
deleted file mode 100644
index 9d563c7..0000000
--- a/src/com/android/mms/transaction/HttpUtils.java
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.transaction;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.StatusLine;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.conn.params.ConnRouteParams;
-import org.apache.http.params.HttpParams;
-import org.apache.http.params.HttpProtocolParams;
-
-import android.content.Context;
-import android.net.http.AndroidHttpClient;
-import android.provider.Settings;
-import android.util.Config;
-import android.util.Log;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.net.SocketException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Locale;
-
-public class HttpUtils {
-    private static final String TAG = "HttpUtils";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    public static final int HTTP_POST_METHOD = 1;
-    public static final int HTTP_GET_METHOD = 2;
-
-    // This is the value to use for the "Accept-Language" header.
-    // Once it becomes possible for the user to change the locale
-    // setting, this should no longer be static.  We should call
-    // getHttpAcceptLanguage instead.
-    private static final String HDR_VALUE_ACCEPT_LANGUAGE;
-
-    static {
-        HDR_VALUE_ACCEPT_LANGUAGE = getHttpAcceptLanguage();
-    }
-
-    // Definition for necessary HTTP headers.
-    private static final String HDR_KEY_ACCEPT = "Accept";
-    private static final String HDR_KEY_ACCEPT_LANGUAGE = "Accept-Language";
-    private static final String HDR_KEY_X_WAP_PROFILE = "x-wap-profile";
-
-    private static final String HDR_VALUE_ACCEPT =
-        "*/*, application/vnd.wap.mms-message, application/vnd.wap.sic";
-
-    private HttpUtils() {
-        // To forbidden instantiate this class.
-    }
-
-    /**
-     * A helper method to send or retrieve data through HTTP protocol.
-     *
-     * @param token The token to identify the sending progress.
-     * @param url The URL used in a GET request. Null when the method is
-     *         HTTP_POST_METHOD.
-     * @param pdu The data to be POST. Null when the method is HTTP_GET_METHOD.
-     * @param method HTTP_POST_METHOD or HTTP_GET_METHOD.
-     * @return A byte array which contains the response data.
-     *         If an HTTP error code is returned, an IOException will be thrown.
-     * @throws IOException if any error occurred on network interface or
-     *         an HTTP error code(&gt;=400) returned from the server.
-     */
-    protected static byte[] httpConnection(Context context, long token,
-            String url, byte[] pdu, int method, boolean isProxySet,
-            String proxyHost, int proxyPort) throws IOException {
-        if (url == null) {
-            throw new IllegalArgumentException("URL must not be null.");
-        }
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "httpConnection: params list");
-            Log.v(TAG, "\ttoken\t\t= " + token);
-            Log.v(TAG, "\turl\t\t= " + url);
-            Log.v(TAG, "\tmethod\t\t= "
-                    + ((method == HTTP_POST_METHOD) ? "POST"
-                            : ((method == HTTP_GET_METHOD) ? "GET" : "UNKNOWN")));
-            Log.v(TAG, "\tisProxySet\t= " + isProxySet);
-            Log.v(TAG, "\tproxyHost\t= " + proxyHost);
-            Log.v(TAG, "\tproxyPort\t= " + proxyPort);
-            // TODO Print out binary data more readable.
-            //Log.v(TAG, "\tpdu\t\t= " + Arrays.toString(pdu));
-        }
-
-        AndroidHttpClient client = null;
-
-        try {
-            // Make sure to use a proxy which supports CONNECT.
-            URI hostUrl = new URI(url);
-            HttpHost target = new HttpHost(
-                    hostUrl.getHost(), hostUrl.getPort(),
-                    HttpHost.DEFAULT_SCHEME_NAME);
-
-            client = createHttpClient();
-            HttpRequest req = null;
-            switch(method) {
-                case HTTP_POST_METHOD:
-                    ProgressCallbackEntity entity = new ProgressCallbackEntity(
-                                                        context, token, pdu);
-                    // Set request content type.
-                    entity.setContentType("application/vnd.wap.mms-message");
-
-                    HttpPost post = new HttpPost(url);
-                    post.setEntity(entity);
-                    req = post;
-                    break;
-                case HTTP_GET_METHOD:
-                    req = new HttpGet(url);
-                    break;
-                default:
-                    Log.e(TAG, "Unknown HTTP method: " + method
-                            + ". Must be one of POST[" + HTTP_POST_METHOD
-                            + "] or GET[" + HTTP_GET_METHOD + "].");
-                    return null;
-            }
-
-            // Set route parameters for the request.
-            HttpParams params = client.getParams();
-            if (isProxySet) {
-                ConnRouteParams.setDefaultProxy(
-                        params, new HttpHost(proxyHost, proxyPort));
-            }
-            req.setParams(params);
-
-            // Set necessary HTTP headers for MMS transmission.
-            req.addHeader(HDR_KEY_ACCEPT, HDR_VALUE_ACCEPT);
-            {
-                String xWapProfileUrl = getXWapProfileHeaderValue(context);
-
-                if (xWapProfileUrl != null) {
-                    req.addHeader(HDR_KEY_X_WAP_PROFILE, xWapProfileUrl);
-                }
-            }
-            req.addHeader(HDR_KEY_ACCEPT_LANGUAGE, HDR_VALUE_ACCEPT_LANGUAGE);
-
-            HttpResponse response = client.execute(target, req);
-            StatusLine status = response.getStatusLine();
-            if (status.getStatusCode() != 200) { // HTTP 200 is success.
-                throw new IOException("HTTP error: " + status.getReasonPhrase());
-            }
-
-            HttpEntity entity = response.getEntity();
-            byte[] body = null;
-            if (entity != null) {
-                try {
-                    if (entity.getContentLength() > 0) {
-                        body = new byte[(int) entity.getContentLength()];
-                        DataInputStream dis = new DataInputStream(entity.getContent());
-                        try {
-                            dis.readFully(body);
-                        } finally {
-                            try {
-                                dis.close();
-                            } catch (IOException e) {
-                                Log.e(TAG, "Error closing input stream: " + e.getMessage());
-                            }
-                        }
-                    }
-                } finally {
-                    if (entity != null) {
-                        entity.consumeContent();
-                    }
-                }
-            }
-            return body;
-        } catch (URISyntaxException e) {
-            handleHttpConnectionException(e);
-        } catch (IllegalStateException e) {
-            handleHttpConnectionException(e);
-        } catch (IllegalArgumentException e) {
-            handleHttpConnectionException(e);
-        } catch (SocketException e) {
-            handleHttpConnectionException(e);
-        } catch (Exception e) {
-            handleHttpConnectionException(e);
-        }
-        finally {
-            if (client != null) {
-                client.close();
-            }
-        }
-        return null;
-    }
-
-    private static String getXWapProfileHeaderValue(Context context) {
-        return Settings.Gservices.getString(
-                context.getContentResolver(),
-                Settings.Gservices.MMS_X_WAP_PROFILE_URL);
-    }
-
-    private static void handleHttpConnectionException(Exception exception)
-            throws IOException {
-        // Inner exception should be logged to make life easier.
-        Log.e(TAG, exception.getMessage());
-        throw new IOException(exception.getMessage());
-    }
-
-    private static AndroidHttpClient createHttpClient() {
-        AndroidHttpClient client
-                = AndroidHttpClient.newInstance("Android-Mms/0.1");
-        HttpParams params = client.getParams();
-        HttpProtocolParams.setContentCharset(params, "UTF-8");
-        return client;
-    }
-
-    /**
-     * Return the Accept-Language header.  Use the current locale plus
-     * US if we are in a different locale than US.
-     */
-    private static String getHttpAcceptLanguage() {
-        Locale locale = Locale.getDefault();
-        StringBuilder builder = new StringBuilder();
-
-        addLocaleToHttpAcceptLanguage(builder, locale);
-        if (!locale.equals(Locale.US)) {
-            if (builder.length() > 0) {
-                builder.append(", ");
-            }
-            addLocaleToHttpAcceptLanguage(builder, Locale.US);
-        }
-        return builder.toString();
-    }
-
-    private static void addLocaleToHttpAcceptLanguage(
-            StringBuilder builder, Locale locale) {
-        String language = locale.getLanguage();
-
-        if (language != null) {
-            builder.append(language);
-
-            String country = locale.getCountry();
-
-            if (country != null) {
-                builder.append("-");
-                builder.append(country);
-            }
-        }
-    }
-}
diff --git a/src/com/android/mms/transaction/MessageSender.java b/src/com/android/mms/transaction/MessageSender.java
deleted file mode 100644
index ddadeb0..0000000
--- a/src/com/android/mms/transaction/MessageSender.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.transaction;
-
-import com.google.android.mms.MmsException;
-
-public interface MessageSender {
-    public static final String RECIPIENTS_SEPARATOR = ";";
-
-    /**
-     * Send the message through MMS or SMS protocol.
-     * @param token The token to identify the sending progress.
-     *
-     * @return True if the message was sent through MMS or false if it was
-     *         sent through SMS.
-     * @throws MmsException Error occurred while sending the message.
-     */
-    boolean sendMessage(long token) throws MmsException;
-}
diff --git a/src/com/android/mms/transaction/MessageStatusReceiver.java b/src/com/android/mms/transaction/MessageStatusReceiver.java
deleted file mode 100644
index d51a92b..0000000
--- a/src/com/android/mms/transaction/MessageStatusReceiver.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.transaction;
-
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.BroadcastReceiver;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.Intent;
-import android.database.Cursor;
-import android.net.Uri;
-import android.provider.Telephony.Sms;
-import android.telephony.gsm.SmsMessage;
-import android.util.Log;
-
-public class MessageStatusReceiver extends BroadcastReceiver {
-    public static final String MESSAGE_STATUS_RECEIVED_ACTION =
-            "com.android.mms.transaction.MessageStatusReceiver.MESSAGE_STATUS_RECEIVED";
-    private static final String[] ID_PROJECTION = new String[] { Sms._ID };
-    private static final String LOG_TAG = "MessageStatusReceiver";
-    private static final Uri STATUS_URI =
-            Uri.parse("content://sms/status");
-    private Context mContext;
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        mContext = context;
-        if (MESSAGE_STATUS_RECEIVED_ACTION.equals(intent.getAction())) {
-
-            Uri messageUri = intent.getData();
-            byte[] pdu = (byte[]) intent.getExtra("pdu");
-
-            updateMessageStatus(context, messageUri, pdu);
-            MessagingNotification.updateNewMessageIndicator(context, true);
-       }
-    }
-
-    private void updateMessageStatus(Context context, Uri messageUri, byte[] pdu) {
-        // Create a "status/#" URL and use it to update the
-        // message's status in the database.
-        Cursor cursor = SqliteWrapper.query(context, context.getContentResolver(),
-                            messageUri, ID_PROJECTION, null, null, null);
-        if ((cursor != null) && cursor.moveToFirst()) {
-            int messageId = cursor.getInt(0);
-
-            cursor.close();
-
-            Uri updateUri = ContentUris.withAppendedId(STATUS_URI, messageId);
-            SmsMessage message = SmsMessage.createFromPdu(pdu);
-            int status = message.getStatus();
-            ContentValues contentValues = new ContentValues(1);
-
-            contentValues.put(Sms.STATUS, status);
-            SqliteWrapper.update(context, context.getContentResolver(),
-                                updateUri, contentValues, null, null);
-        } else {
-            error("Can't find message for status update: " + messageUri);
-        }
-    }
-
-    private void error(String message) {
-        Log.e(LOG_TAG, "[MessageStatusReceiver] " + message);
-    }
-}
diff --git a/src/com/android/mms/transaction/MessagingNotification.java b/src/com/android/mms/transaction/MessagingNotification.java
deleted file mode 100644
index 4beccc0..0000000
--- a/src/com/android/mms/transaction/MessagingNotification.java
+++ /dev/null
@@ -1,490 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.transaction;
-
-import static com.google.android.mms.pdu.PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND;
-import static com.google.android.mms.pdu.PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF;
-
-import com.android.mms.R;
-import com.android.mms.ui.ComposeMessageActivity;
-import com.android.mms.ui.ConversationList;
-import com.android.mms.ui.MessagingPreferenceActivity;
-import com.android.mms.util.AddressUtils;
-import com.android.mms.util.ContactInfoCache;
-import com.android.mms.util.DownloadManager;
-
-import com.google.android.mms.pdu.EncodedStringValue;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.app.PendingIntent;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.database.Cursor;
-import android.graphics.Typeface;
-import android.net.Uri;
-import android.preference.PreferenceManager;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.Sms;
-import android.provider.Telephony.Threads;
-import android.text.Spannable;
-import android.text.SpannableString;
-import android.text.TextUtils;
-import android.text.style.StyleSpan;
-
-import java.util.Comparator;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-/**
- * This class is used to update the notification indicator. It will check whether
- * there are unread messages. If yes, it would show the notification indicator,
- * otherwise, hide the indicator.
- */
-public class MessagingNotification {
-    public static final String NOTIFICATION_CLICK_RECEIVER =
-            "com.android.mms.transaction.NotificationClickReceiver";
-    private static final String TAG = "MessagingNotification";
-
-    private static final int NOTIFICATION_ID = 123;
-    public static final int MESSAGE_FAILED_NOTIFICATION_ID = 789;
-    public static final int DOWNLOAD_FAILED_NOTIFICATION_ID = 531;
-
-    // This must be consistent with the column constants below.
-    private static final String[] MMS_STATUS_PROJECTION = new String[] {
-        Mms.THREAD_ID, Mms.DATE, Mms._ID, Mms.SUBJECT, Mms.SUBJECT_CHARSET };
-
-    // This must be consistent with the column constants below.
-    private static final String[] SMS_STATUS_PROJECTION = new String[] {
-        Sms.THREAD_ID, Sms.DATE, Sms.ADDRESS, Sms.SUBJECT, Sms.BODY };
-
-    // These must be consistent with MMS_STATUS_PROJECTION and
-    // SMS_STATUS_PROJECTION.
-    private static final int COLUMN_THREAD_ID   = 0;
-    private static final int COLUMN_DATE        = 1;
-    private static final int COLUMN_MMS_ID      = 2;
-    private static final int COLUMN_SMS_ADDRESS = 2;
-    private static final int COLUMN_SUBJECT     = 3;
-    private static final int COLUMN_SUBJECT_CS  = 4;
-    private static final int COLUMN_SMS_BODY    = 4;
-
-    private static final String NEW_INCOMING_SM_CONSTRAINT =
-            "(" + Sms.TYPE + " = " + Sms.MESSAGE_TYPE_INBOX
-            + " AND " + Sms.READ + " = 0)";
-
-    private static final String NEW_INCOMING_MM_CONSTRAINT =
-            "(" + Mms.MESSAGE_BOX + "=" + Mms.MESSAGE_BOX_INBOX
-            + " AND " + Mms.READ + "=0"
-            + " AND (" + Mms.MESSAGE_TYPE + "=" + MESSAGE_TYPE_NOTIFICATION_IND
-            + " OR " + Mms.MESSAGE_TYPE + "=" + MESSAGE_TYPE_RETRIEVE_CONF + "))";
-
-    private static final MmsSmsNotificationInfoComparator INFO_COMPARATOR =
-            new MmsSmsNotificationInfoComparator();
-
-    private MessagingNotification() {
-    }
-
-    /**
-     * Checks to see if there are any unread messages or delivery
-     * reports.  Shows the most recent notification if there is one.
-     *
-     * @param context the context to use
-     */
-    public static void updateNewMessageIndicator(Context context) {
-        updateNewMessageIndicator(context, false);
-    }
-
-    /**
-     * Checks to see if there are any unread messages or delivery
-     * reports.  Shows the most recent notification if there is one.
-     *
-     * @param context the context to use
-     * @param isNew if notify a new message comes, it should be true, otherwise, false.
-     */
-    public static void updateNewMessageIndicator(Context context, boolean isNew) {
-        SortedSet<MmsSmsNotificationInfo> accumulator =
-                new TreeSet<MmsSmsNotificationInfo>(INFO_COMPARATOR);
-
-        int count = 0;
-        count += accumulateNotificationInfo(
-                accumulator, getMmsNewMessageNotificationInfo(context));
-        count += accumulateNotificationInfo(
-                accumulator, getSmsNewMessageNotificationInfo(context));
-
-        cancelNotification(context, NOTIFICATION_ID);
-        if (!accumulator.isEmpty()) {
-            accumulator.first().deliver(context, isNew, count);
-        }
-    }
-
-    /**
-     * Deletes any delivery report notifications for the specified
-     * thread, then checks to see if there are any unread messages or
-     * delivery reports.  Shows the most recent notification if there
-     * is one.
-     *
-     * @param context the context to use
-     * @param threadId the thread for which to clear delivery notifications
-     */
-    public static void updateNewMessageIndicator(
-            Context context, long threadId) {
-        updateNewMessageIndicator(context);
-    }
-
-    private static final int accumulateNotificationInfo(
-            SortedSet set, MmsSmsNotificationInfo info) {
-        if (info != null) {
-            set.add(info);
-
-            return info.mCount;
-        }
-
-        return 0;
-    }
-
-    private static final class MmsSmsNotificationInfo {
-        public Intent mClickIntent;
-        public String mDescription;
-        public int mIconResourceId;
-        public CharSequence mTicker;
-        public long mTimeMillis;
-        public String mTitle;
-        public int mCount;
-
-        public MmsSmsNotificationInfo(
-                Intent clickIntent, String description, int iconResourceId,
-                CharSequence ticker, long timeMillis, String title, int count) {
-            mClickIntent = clickIntent;
-            mDescription = description;
-            mIconResourceId = iconResourceId;
-            mTicker = ticker;
-            mTimeMillis = timeMillis;
-            mTitle = title;
-            mCount = count;
-        }
-
-        public void deliver(Context context, boolean isNew, int count) {
-            updateNotification(
-                    context, mClickIntent, mDescription, mIconResourceId,
-                    isNew, mTicker, mTimeMillis, mTitle, count);
-        }
-
-        public long getTime() {
-            return mTimeMillis;
-        }
-    }
-
-    private static final class MmsSmsNotificationInfoComparator
-            implements Comparator<MmsSmsNotificationInfo> {
-        public int compare(
-                MmsSmsNotificationInfo info1, MmsSmsNotificationInfo info2) {
-            return Long.signum(info2.getTime() - info1.getTime());
-        }
-    }
-
-    public static final MmsSmsNotificationInfo getMmsNewMessageNotificationInfo(
-            Context context) {
-        ContentResolver resolver = context.getContentResolver();
-        Cursor cursor = SqliteWrapper.query(context, resolver, Mms.CONTENT_URI,
-                            MMS_STATUS_PROJECTION, NEW_INCOMING_MM_CONSTRAINT,
-                            null, Mms.DATE + " desc");
-
-        if (cursor != null) {
-            try {
-                if (cursor.moveToFirst()) {
-                    long msgId = cursor.getLong(COLUMN_MMS_ID);
-                    Uri msgUri = Mms.CONTENT_URI.buildUpon().appendPath(
-                            Long.toString(msgId)).build();
-                    String address = AddressUtils.getFrom(context, msgUri);
-                    String subject = getMmsSubject(
-                            cursor.getString(COLUMN_SUBJECT), cursor.getInt(COLUMN_SUBJECT_CS));
-                    long threadId = cursor.getLong(COLUMN_THREAD_ID);
-                    long timeMillis = cursor.getLong(COLUMN_DATE) * 1000;
-
-                    return getNewMessageNotificationInfo(
-                            address, subject, context,
-                            R.drawable.stat_notify_mms, null, threadId,
-                            timeMillis, cursor.getCount());
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-        return null;
-    }
-
-    public static final MmsSmsNotificationInfo getSmsNewMessageNotificationInfo(
-            Context context) {
-        ContentResolver resolver = context.getContentResolver();
-        Cursor cursor = SqliteWrapper.query(context, resolver, Sms.CONTENT_URI,
-                            SMS_STATUS_PROJECTION, NEW_INCOMING_SM_CONSTRAINT,
-                            null, Sms.DATE + " desc");
-
-        if (cursor != null) {
-            try {
-                if (cursor.moveToFirst()) {
-                    String address = cursor.getString(COLUMN_SMS_ADDRESS);
-                    String body = cursor.getString(COLUMN_SMS_BODY);
-                    long threadId = cursor.getLong(COLUMN_THREAD_ID);
-                    long timeMillis = cursor.getLong(COLUMN_DATE);
-
-                    return getNewMessageNotificationInfo(
-                            address, body, context, R.drawable.stat_notify_sms,
-                            null, threadId, timeMillis, cursor.getCount());
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-        return null;
-    }
-
-    private static final MmsSmsNotificationInfo getNewMessageNotificationInfo(
-            String address,
-            String body,
-            Context context,
-            int iconResourceId,
-            String subject,
-            long threadId,
-            long timeMillis,
-            int count) {
-        Intent clickIntent = getAppIntent();
-        clickIntent.setData(
-                Uri.withAppendedPath(
-                        clickIntent.getData(), Long.toString(threadId)));
-        clickIntent.setAction(Intent.ACTION_VIEW);
-
-        String senderInfo = buildTickerMessage(
-                context, address, null, null).toString();
-        String senderInfoName = senderInfo.substring(
-                0, senderInfo.length() - 2);
-        CharSequence ticker = buildTickerMessage(
-                context, address, subject, body);
-
-        return new MmsSmsNotificationInfo(
-                clickIntent, body, iconResourceId, ticker, timeMillis,
-                senderInfoName, count);
-    }
-
-    public static void cancelNotification(Context context, int notificationId) {
-        NotificationManager nm = (NotificationManager) context.getSystemService(
-                Context.NOTIFICATION_SERVICE);
-
-        nm.cancel(notificationId);
-    }
-
-    private static Intent getAppIntent() {
-        Intent appIntent = new Intent(Intent.ACTION_MAIN, Threads.CONTENT_URI);
-
-        appIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
-                Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
-        return appIntent;
-   }
-
-    private static void updateNotification(
-            Context context,
-            Intent clickIntent,
-            String description,
-            int iconRes,
-            boolean isNew,
-            CharSequence ticker,
-            long timeMillis,
-            String title,
-            int count) {
-        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
-
-        if (!sp.getBoolean(
-                    MessagingPreferenceActivity.NOTIFICATION_ENABLED, true)) {
-            return;
-        }
-
-        Notification notification = new Notification(
-                iconRes, ticker, timeMillis);
-        PendingIntent pendingIntent;
-
-        if (count > 1) {
-            String multiDescription = context.getString(R.string.notification_multiple);
-            String multiTitle = context.getString(R.string.notification_multiple_title);
-
-            Intent multiIntent = getAppIntent();
-            multiIntent.setAction(Intent.ACTION_MAIN);
-            multiIntent.setType("vnd.android-dir/mms-sms");
-            pendingIntent =
-                PendingIntent.getActivity(context, 0, multiIntent, 0);
-
-            notification.setLatestEventInfo(
-                    context, multiTitle, multiDescription.replaceAll("%s", Integer.toString(count)),
-                    pendingIntent);
-        } else {
-            pendingIntent =
-                PendingIntent.getActivity(context, 0, clickIntent, 0);
-
-            notification.setLatestEventInfo(
-                    context, title, description, pendingIntent);
-        }
-
-        if (isNew) {
-            boolean vibrate = sp.getBoolean(MessagingPreferenceActivity.NOTIFICATION_VIBRATE, true);
-            if (vibrate) {
-                notification.defaults |= Notification.DEFAULT_VIBRATE;
-            }
-
-            String ringtoneStr = sp
-                    .getString(MessagingPreferenceActivity.NOTIFICATION_RINGTONE, null);
-            notification.sound = TextUtils.isEmpty(ringtoneStr) ? null : Uri.parse(ringtoneStr);
-        }
-
-        notification.flags |= Notification.FLAG_SHOW_LIGHTS;
-        notification.ledARGB = 0xff00ff00;
-        notification.ledOnMS = 500;
-        notification.ledOffMS = 2000;
-
-        NotificationManager nm = (NotificationManager)
-            context.getSystemService(Context.NOTIFICATION_SERVICE);
-
-        nm.notify(NOTIFICATION_ID, notification);
-    }
-
-    protected static CharSequence buildTickerMessage(
-            Context context, String address, String subject, String body) {
-        String displayAddress = ContactInfoCache.getInstance()
-                .getContactName(context, address);
-        
-        StringBuilder buf = new StringBuilder(
-                displayAddress == null
-                ? ""
-                : displayAddress.replace('\n', ' ').replace('\r', ' '));
-        buf.append(':').append(' ');
-
-        int offset = buf.length();
-        if (!TextUtils.isEmpty(subject)) {
-            subject = subject.replace('\n', ' ').replace('\r', ' ');
-            buf.append(subject);
-            buf.append(' ');
-        }
-
-        if (!TextUtils.isEmpty(body)) {
-            body = body.replace('\n', ' ').replace('\r', ' ');
-            buf.append(body);
-        }
-
-        SpannableString spanText = new SpannableString(buf.toString());
-        spanText.setSpan(new StyleSpan(Typeface.BOLD), 0, offset,
-                Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-
-        return spanText;
-    }
-
-    private static String getMmsSubject(String sub, int charset) {
-        return TextUtils.isEmpty(sub) ? ""
-                : new EncodedStringValue(charset, PduPersister.getBytes(sub)).getString();
-    }
-
-    public static void notifyDownloadFailed(Context context, long threadId) {
-        notifyFailed(context, true, true, threadId);
-    }
-
-    public static void notifySendFailed(Context context, boolean isMms) {
-        notifyFailed(context, isMms, false, 0);
-    }
-
-    private static void notifyFailed(Context context, boolean isMms, boolean isDownload, long threadId) {
-        // TODO factor out common code for creating notifications
-        SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
-
-        boolean enabled = sp.getBoolean(MessagingPreferenceActivity.NOTIFICATION_ENABLED, true);
-        if (!enabled) {
-            return;
-        }
-
-        NotificationManager nm = (NotificationManager)
-                context.getSystemService(Context.NOTIFICATION_SERVICE);
-
-        Intent failedIntent = new Intent(context, ConversationList.class);
-        failedIntent.putExtra("thread_id", threadId);         
-        failedIntent.putExtra("undelivered_flag", true);
-
-        PendingIntent pendingIntent = PendingIntent.getActivity(
-                context, 0, failedIntent, 0);
-
-        Notification notification = new Notification();
-        notification.icon = isMms ? R.drawable.stat_notify_mms_failed :
-                R.drawable.stat_notify_sms_failed;
-
-        String title = isDownload ?
-                context.getString(R.string.message_download_failed_title) :
-                    context.getString(R.string.message_send_failed_title);
-        notification.tickerText = title;
-
-        notification.setLatestEventInfo(context, title,
-                context.getString(R.string.message_failed_body),
-                pendingIntent);
-
-        boolean vibrate = sp.getBoolean(MessagingPreferenceActivity.NOTIFICATION_VIBRATE, true);
-        if (vibrate) {
-            notification.defaults |= Notification.DEFAULT_VIBRATE;
-        }
-
-        String ringtoneStr = sp
-                .getString(MessagingPreferenceActivity.NOTIFICATION_RINGTONE, null);
-        notification.sound = TextUtils.isEmpty(ringtoneStr) ? null : Uri.parse(ringtoneStr);
-
-        if (isDownload) {
-            nm.notify(DOWNLOAD_FAILED_NOTIFICATION_ID, notification);
-        } else {
-            nm.notify(MESSAGE_FAILED_NOTIFICATION_ID, notification);
-        }
-    }
-
-    public static void updateSendFailedNotification(Context context) {
-        Cursor mmsCursor = SqliteWrapper.query(context, context.getContentResolver(),
-                Mms.Outbox.CONTENT_URI, null, null, null, null);
-        Cursor smsCursor = SqliteWrapper.query(context, context.getContentResolver(),
-                Uri.withAppendedPath(Sms.CONTENT_URI, "undelivered"),
-                null, null, null, null);
-        if ( (mmsCursor == null || mmsCursor.getCount() < 1) &&
-                (smsCursor == null || smsCursor.getCount() < 1) ) {
-            cancelNotification(context, MESSAGE_FAILED_NOTIFICATION_ID);
-        }
-    }
-    
-    public static void updateDownloadFailedNotification(Context context) {
-        // Look for any messages in the MMS Inbox that are of the type
-        // NOTIFICATION_IND (i.e. not already downloaded) and in the
-        // permanent failure state.  If there are none, cancel any
-        // failed download notification.
-        Cursor c = SqliteWrapper.query(context, context.getContentResolver(),
-                Mms.Inbox.CONTENT_URI, null,
-                Mms.MESSAGE_TYPE + "=" +
-                    String.valueOf(PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND) +
-                " AND " + Mms.STATUS + "=" +
-                    String.valueOf(DownloadManager.STATE_PERMANENT_FAILURE),
-                null, null);
-        if (c != null) {
-            if (c.getCount() < 1) {
-                cancelNotification(context, DOWNLOAD_FAILED_NOTIFICATION_ID);
-            }
-            c.close();
-        }
-    }
-}
diff --git a/src/com/android/mms/transaction/MmsMessageSender.java b/src/com/android/mms/transaction/MmsMessageSender.java
deleted file mode 100644
index 2f85088..0000000
--- a/src/com/android/mms/transaction/MmsMessageSender.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.transaction;
-
-import com.android.mms.ui.MessagingPreferenceActivity;
-import com.android.mms.util.SendingProgressTokenManager;
-import com.google.android.mms.InvalidHeaderValueException;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.EncodedStringValue;
-import com.google.android.mms.pdu.GenericPdu;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.pdu.ReadRecInd;
-import com.google.android.mms.pdu.SendReq;
-
-import android.content.ContentUris;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.net.Uri;
-import android.preference.PreferenceManager;
-import android.provider.Telephony.Mms;
-import android.util.Log;
-
-public class MmsMessageSender implements MessageSender {
-    private static final String TAG = "MmsMessageSender";
-
-    private final Context mContext;
-    private final Uri mMessageUri;
-
-    // Default preference values
-    private static final boolean DEFAULT_DELIVERY_REPORT_MODE  = false;
-    private static final boolean DEFAULT_READ_REPORT_MODE      = false;
-    private static final long    DEFAULT_EXPIRY_TIME     = 7 * 24 * 60 * 60;
-    private static final int     DEFAULT_PRIORITY        = PduHeaders.PRIORITY_NORMAL;
-    private static final String  DEFAULT_MESSAGE_CLASS   = PduHeaders.MESSAGE_CLASS_PERSONAL_STR;
-
-    public MmsMessageSender(Context context, Uri location) {
-        mContext = context;
-        mMessageUri = location;
-
-        if (mMessageUri == null) {
-            throw new IllegalArgumentException("Null message URI.");
-        }
-    }
-
-    public boolean sendMessage(long token) throws MmsException {
-        // Load the MMS from the message uri
-        PduPersister p = PduPersister.getPduPersister(mContext);
-        GenericPdu pdu = p.load(mMessageUri);
-
-        if (pdu.getMessageType() != PduHeaders.MESSAGE_TYPE_SEND_REQ) {
-            throw new MmsException("Invalid message: " + pdu.getMessageType());
-        }
-
-        SendReq sendReq = (SendReq) pdu;
-
-        // Update headers.
-        updatePreferencesHeaders(sendReq);
-
-        // MessageClass.
-        sendReq.setMessageClass(DEFAULT_MESSAGE_CLASS.getBytes());
-
-        // Update the 'date' field of the message before sending it.
-        sendReq.setDate(System.currentTimeMillis() / 1000L);
-
-        p.updateHeaders(mMessageUri, sendReq);
-
-        // Move the message into MMS Outbox
-        p.move(mMessageUri, Mms.Outbox.CONTENT_URI);
-
-        // Start MMS transaction service
-        SendingProgressTokenManager.put(ContentUris.parseId(mMessageUri), token);
-        mContext.startService(new Intent(mContext, TransactionService.class));
-
-        return true;
-    }
-
-    // Update the headers which are stored in SharedPreferences.
-    private void updatePreferencesHeaders(SendReq sendReq) throws MmsException {
-        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mContext);
-
-        // Expiry.
-        sendReq.setExpiry(prefs.getLong(
-                MessagingPreferenceActivity.EXPIRY_TIME, DEFAULT_EXPIRY_TIME));
-
-        // Priority.
-        sendReq.setPriority(prefs.getInt(MessagingPreferenceActivity.PRIORITY, DEFAULT_PRIORITY));
-
-        // Delivery report.
-        boolean dr = prefs.getBoolean(MessagingPreferenceActivity.MMS_DELIVERY_REPORT_MODE,
-                DEFAULT_DELIVERY_REPORT_MODE);
-        sendReq.setDeliveryReport(dr?PduHeaders.VALUE_YES:PduHeaders.VALUE_NO);
-
-        // Read report.
-        boolean rr = prefs.getBoolean(MessagingPreferenceActivity.READ_REPORT_MODE,
-                DEFAULT_READ_REPORT_MODE);
-        sendReq.setReadReport(rr?PduHeaders.VALUE_YES:PduHeaders.VALUE_NO);
-    }
-
-    public static void sendReadRec(Context context, String to, String messageId, int status) {
-        EncodedStringValue[] sender = new EncodedStringValue[1];
-        sender[0] = new EncodedStringValue(to);
-
-        try {
-            final ReadRecInd readRec = new ReadRecInd(
-                    new EncodedStringValue(PduHeaders.FROM_INSERT_ADDRESS_TOKEN_STR.getBytes()),
-                    messageId.getBytes(),
-                    PduHeaders.CURRENT_MMS_VERSION,
-                    status,
-                    sender);
-
-            readRec.setDate(System.currentTimeMillis() / 1000);
-
-            PduPersister.getPduPersister(context).persist(readRec, Mms.Outbox.CONTENT_URI);
-            context.startService(new Intent(context, TransactionService.class));
-        } catch (InvalidHeaderValueException e) {
-            Log.e(TAG, "Invalide header value", e);
-        } catch (MmsException e) {
-            Log.e(TAG, "Persist message failed", e);
-        }
-    }
-}
diff --git a/src/com/android/mms/transaction/MmsSystemEventReceiver.java b/src/com/android/mms/transaction/MmsSystemEventReceiver.java
deleted file mode 100644
index aa0ed4e..0000000
--- a/src/com/android/mms/transaction/MmsSystemEventReceiver.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import com.google.android.mms.util.PduCache;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.net.Uri;
-import android.provider.Telephony.Mms;
-import android.util.Config;
-import android.util.Log;
-import com.android.internal.telephony.TelephonyIntents;
-import com.android.internal.telephony.Phone;
-
-/**
- * MmsSystemEventReceiver receives the
- * {@link android.content.intent.ACTION_BOOT_COMPLETED},
- * {@link com.android.internal.telephony.TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED}
- * and performs a series of operations which may include:
- * <ul>
- * <li>Show/hide the icon in notification area which is used to indicate
- * whether there is new incoming message.</li>
- * <li>Resend the MM's in the outbox.</li>
- * </ul>
- */
-public class MmsSystemEventReceiver extends BroadcastReceiver {
-    private static final String TAG = "MmsSystemEventReceiver";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private static void wakeUpService(Context context) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "TransactionService is going to be woken up.");
-        }
-
-        context.startService(new Intent(context, TransactionService.class));
-    }
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Intent received: " + intent);
-        }
-
-        String action = intent.getAction();
-        if (action.equals(Mms.Intents.CONTENT_CHANGED_ACTION)) {
-            Uri changed = (Uri) intent.getParcelableExtra(Mms.Intents.DELETED_CONTENTS);
-            PduCache.getInstance().purge(changed);
-        } else if (action.equals(TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED)) {
-            String state = intent.getStringExtra(Phone.STATE_KEY);
-
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "ANY_DATA_STATE event received: " + state);
-            }
-
-            if (state.equals("CONNECTED")) {
-                wakeUpService(context);
-            }
-        } else if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
-            // We should check whether there are unread incoming
-            // messages in the Inbox and then update the notification icon.
-            MessagingNotification.updateNewMessageIndicator(context);
-        }
-    }
-}
diff --git a/src/com/android/mms/transaction/NotificationTransaction.java b/src/com/android/mms/transaction/NotificationTransaction.java
deleted file mode 100644
index a57a8c6..0000000
--- a/src/com/android/mms/transaction/NotificationTransaction.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import static com.android.mms.transaction.TransactionState.FAILED;
-import static com.android.mms.transaction.TransactionState.INITIALIZED;
-import static com.android.mms.transaction.TransactionState.SUCCESS;
-import static com.google.android.mms.pdu.PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF;
-import static com.google.android.mms.pdu.PduHeaders.STATUS_DEFERRED;
-import static com.google.android.mms.pdu.PduHeaders.STATUS_RETRIEVED;
-import static com.google.android.mms.pdu.PduHeaders.STATUS_UNRECOGNIZED;
-
-import com.android.mms.util.DownloadManager;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.GenericPdu;
-import com.google.android.mms.pdu.NotificationInd;
-import com.google.android.mms.pdu.NotifyRespInd;
-import com.google.android.mms.pdu.PduComposer;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduParser;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.Context;
-import android.net.Uri;
-import android.provider.Telephony.Mms.Inbox;
-import android.util.Config;
-import android.util.Log;
-
-import java.io.IOException;
-
-/**
- * The NotificationTransaction is responsible for handling multimedia
- * message notifications (M-Notification.ind).  It:
- *
- * <ul>
- * <li>Composes the notification response (M-NotifyResp.ind).
- * <li>Sends the notification response to the MMSC server.
- * <li>Stores the notification indication.
- * <li>Notifies the TransactionService about succesful completion.
- * </ul>
- *
- * NOTE: This MMS client handles all notifications with a <b>deferred
- * retrieval</b> response.  The transaction service, upon succesful
- * completion of this transaction, will trigger a retrieve transaction
- * in case the client is in immediate retrieve mode.
- */
-public class NotificationTransaction extends Transaction implements Runnable {
-    private static final String TAG = "NotificationTransaction";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private Uri mUri;
-    private NotificationInd mNotificationInd;
-
-    public NotificationTransaction(
-            Context context, int serviceId,
-            TransactionSettings connectionSettings, String uriString) {
-        super(context, serviceId, connectionSettings);
-
-        mUri = Uri.parse(uriString);
-
-        try {
-            mNotificationInd = (NotificationInd)
-                    PduPersister.getPduPersister(context).load(mUri);
-        } catch (MmsException e) {
-            Log.e(TAG, "Failed to load NotificationInd from: " + uriString, e);
-            throw new IllegalArgumentException();
-        }
-
-        mId = new String(mNotificationInd.getTransactionId());
-
-        // Attach the transaction to the instance of RetryScheduler.
-        attach(RetryScheduler.getInstance(context));
-    }
-
-    /**
-     * This constructor is only used for test purposes.
-     */
-    public NotificationTransaction(
-            Context context, int serviceId,
-            TransactionSettings connectionSettings, NotificationInd ind) {
-        super(context, serviceId, connectionSettings);
-
-        try {
-            mUri = PduPersister.getPduPersister(context).persist(
-                        ind, Inbox.CONTENT_URI);
-        } catch (MmsException e) {
-            Log.e(TAG, "Failed to save NotificationInd in constructor.", e);
-            throw new IllegalArgumentException();
-        }
-
-        mNotificationInd = ind;
-        mId = new String(ind.getTransactionId());
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see com.google.android.mms.Transaction#process()
-     */
-    @Override
-    public void process() {
-        new Thread(this).start();
-    }
-
-    public void run() {
-        DownloadManager downloadManager = DownloadManager.getInstance();
-        boolean autoDownload = downloadManager.isAuto();
-        try {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Notification transaction launched: " + this);
-            }
-
-            // By default, we set status to STATUS_DEFERRED because we
-            // should response MMSC with STATUS_DEFERRED when we cannot
-            // download a MM immediately.
-            int status = STATUS_DEFERRED;
-            if (!autoDownload) {
-                downloadManager.markState(mUri, DownloadManager.STATE_UNSTARTED);
-                sendNotifyRespInd(status);
-                return;
-            }
-
-            downloadManager.markState(mUri, DownloadManager.STATE_DOWNLOADING);
-            byte[] clBytes = mNotificationInd.getContentLocation();
-            if (clBytes == null) {
-                throw new MmsException("Content-Location may not be null.");
-            }
-
-            String contentLocation = new String(clBytes);
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Content-Location: " + contentLocation);
-            }
-
-            byte[] retrieveConfData = null;
-            // We should catch exceptions here to response MMSC
-            // with STATUS_DEFERRED.
-            try {
-                retrieveConfData = getPdu(contentLocation);
-            } catch (IOException e) {
-                mTransactionState.setState(FAILED);
-            }
-
-            if (retrieveConfData != null) {
-                GenericPdu pdu = new PduParser(retrieveConfData).parse();
-                if ((pdu == null) || (pdu.getMessageType() != MESSAGE_TYPE_RETRIEVE_CONF)) {
-                    Log.e(TAG, "Invalid M-RETRIEVE.CONF PDU.");
-                    mTransactionState.setState(FAILED);
-                    status = STATUS_UNRECOGNIZED;
-                } else {
-                    // Save the received PDU (must be a M-RETRIEVE.CONF).
-                    PduPersister p = PduPersister.getPduPersister(mContext);
-                    Uri uri = p.persist(pdu, Inbox.CONTENT_URI);
-                    // We have successfully downloaded the new MM. Delete the
-                    // M-NotifyResp.ind from Inbox.
-                    SqliteWrapper.delete(mContext, mContext.getContentResolver(),
-                                         mUri, null, null);
-                    // Notify observers with newly received MM.
-                    mUri = uri;
-                    status = STATUS_RETRIEVED;
-                }
-            }
-
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "status=0x" + Integer.toHexString(status));
-            }
-
-            // Check the status and update the result state of this Transaction.
-            switch (status) {
-                case STATUS_RETRIEVED:
-                    mTransactionState.setState(SUCCESS);
-                    break;
-                case STATUS_DEFERRED:
-                    // STATUS_DEFERRED, may be a failed immediate retrieval.
-                    if (mTransactionState.getState() == INITIALIZED) {
-                        mTransactionState.setState(SUCCESS);
-                    }
-                    break;
-            }
-
-            sendNotifyRespInd(status);
-
-        } catch (MmsException e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Unexpected MmsException.", e);
-            }
-        } catch (IOException e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Unexpected IOException.", e);
-            }
-        } catch (Exception e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Unexpected Exception.", e);
-            }
-        } finally {
-            mTransactionState.setContentUri(mUri);
-            if (!autoDownload) {
-                // Always mark the transaction successful for deferred
-                // download since any error here doesn't make sense.
-                mTransactionState.setState(SUCCESS);
-            }
-            if (mTransactionState.getState() != SUCCESS) {
-                mTransactionState.setState(FAILED);
-                Log.e(TAG, "NotificationTransaction failed.");
-            }
-            notifyObservers();
-        }
-    }
-
-    private void sendNotifyRespInd(int status) throws MmsException, IOException {
-        // Create the M-NotifyResp.ind
-        NotifyRespInd notifyRespInd = new NotifyRespInd(
-                PduHeaders.CURRENT_MMS_VERSION,
-                mNotificationInd.getTransactionId(),
-                status);
-
-        // Pack M-NotifyResp.ind and send it
-        sendPdu(new PduComposer(mContext, notifyRespInd).make());
-    }
-
-    @Override
-    public int getType() {
-        return NOTIFICATION_TRANSACTION;
-    }
-}
diff --git a/src/com/android/mms/transaction/Observable.java b/src/com/android/mms/transaction/Observable.java
deleted file mode 100644
index a56cb12..0000000
--- a/src/com/android/mms/transaction/Observable.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-
-/**
- * An interface to represent the state of an observable Transaction.
- */
-public abstract class Observable {
-    private final ArrayList<Observer> mObservers;
-    private Iterator<Observer> mIterator;
-
-    public Observable() {
-        mObservers = new ArrayList<Observer>();
-    }
-
-    /**
-     * This method is implemented by the observable to represent its
-     * current state.
-     *
-     * @return A TransactionState object.
-     */
-    abstract public TransactionState getState();
-
-    /**
-     * Attach an observer to this object.
-     *
-     * @param observer The observer object to be attached to.
-     */
-    public void attach(Observer observer) {
-        mObservers.add(observer);
-    }
-
-    /**
-     * Detach an observer from this object.
-     *
-     * @param observer The observer object to be detached from.
-     */
-    public void detach(Observer observer) {
-        if (mIterator != null) {
-            mIterator.remove();
-        } else {
-            mObservers.remove(observer);
-        }
-    }
-
-    /**
-     * Notify all observers that a status change has occurred.
-     */
-    public void notifyObservers() {
-        mIterator = mObservers.iterator();
-        try {
-            while (mIterator.hasNext()) {
-                mIterator.next().update(this);
-            }
-        } finally {
-            mIterator = null;
-        }
-    }
-}
diff --git a/src/com/android/mms/transaction/Observer.java b/src/com/android/mms/transaction/Observer.java
deleted file mode 100644
index ff65c77..0000000
--- a/src/com/android/mms/transaction/Observer.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.transaction;
-
-/**
- * An interface for observing the state of a Transaction.
- */
-public interface Observer {
-
-    /**
-     * Update the state of the observable.
-     *
-     * @param observable An observable object.
-     */
-    void update(Observable observable);
-
-}
diff --git a/src/com/android/mms/transaction/PrivilegedSmsReceiver.java b/src/com/android/mms/transaction/PrivilegedSmsReceiver.java
deleted file mode 100644
index c2d0dca..0000000
--- a/src/com/android/mms/transaction/PrivilegedSmsReceiver.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2008 Google Inc.
- *
- * 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.
- */
-
-package com.android.mms.transaction;
-
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-
-/**
- * This class exists specifically to allow us to require permissions checks on SMS_RECEIVED
- * broadcasts that are not applicable to other kinds of broadcast messages handled by the
- * SmsReceiver base class.
- */
-public class PrivilegedSmsReceiver extends SmsReceiver {
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        // Pass the message to the base class implementation, noting that it
-        // was permission-checked on the way in.
-        onReceiveWithPrivilege(context, intent, true);
-    }
-}
diff --git a/src/com/android/mms/transaction/ProgressCallbackEntity.java b/src/com/android/mms/transaction/ProgressCallbackEntity.java
deleted file mode 100644
index 8ff72f9..0000000
--- a/src/com/android/mms/transaction/ProgressCallbackEntity.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.transaction;
-
-import org.apache.http.entity.ByteArrayEntity;
-
-import android.content.Context;
-import android.content.Intent;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class ProgressCallbackEntity extends ByteArrayEntity {
-    private static final int DEFAULT_PIECE_SIZE = 4096;
-
-    public static final String PROGRESS_STATUS_ACTION = "com.android.mms.PROGRESS_STATUS";
-    public static final int PROGRESS_START    = -1;
-    public static final int PROGRESS_ABORT    = -2;
-    public static final int PROGRESS_COMPLETE = 100;
-
-    private final Context mContext;
-    private final byte[] mContent;
-    private final long mToken;
-
-    public ProgressCallbackEntity(Context context, long token, byte[] b) {
-        super(b);
-
-        mContext = context;
-        mContent = b;
-        mToken = token;
-    }
-
-    @Override
-    public void writeTo(final OutputStream outstream) throws IOException {
-        if (outstream == null) {
-            throw new IllegalArgumentException("Output stream may not be null");
-        }
-
-        boolean completed = false;
-        try {
-            broadcastProgressIfNeeded(PROGRESS_START);
-
-            int pos = 0, totalLen = mContent.length;
-            while (pos < totalLen) {
-                int len = totalLen - pos;
-                if (len > DEFAULT_PIECE_SIZE) {
-                    len = DEFAULT_PIECE_SIZE;
-                }
-                outstream.write(mContent, pos, len);
-                outstream.flush();
-
-                pos += len;
-
-                broadcastProgressIfNeeded(100 * pos / totalLen);
-            }
-
-            broadcastProgressIfNeeded(PROGRESS_COMPLETE);
-            completed = true;
-        } finally {
-            if (!completed) {
-                broadcastProgressIfNeeded(PROGRESS_ABORT);
-            }
-        }
-    }
-
-    private void broadcastProgressIfNeeded(int progress) {
-        if (mToken > 0) {
-            Intent intent = new Intent(PROGRESS_STATUS_ACTION);
-            intent.putExtra("progress", progress);
-            intent.putExtra("token", mToken);
-            mContext.sendBroadcast(intent);
-        }
-    }
-}
diff --git a/src/com/android/mms/transaction/PushReceiver.java b/src/com/android/mms/transaction/PushReceiver.java
deleted file mode 100644
index 02688e6..0000000
--- a/src/com/android/mms/transaction/PushReceiver.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import static android.provider.Telephony.Sms.Intents.WAP_PUSH_RECEIVED_ACTION;
-import static com.google.android.mms.pdu.PduHeaders.MESSAGE_TYPE_DELIVERY_IND;
-import static com.google.android.mms.pdu.PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND;
-import static com.google.android.mms.pdu.PduHeaders.MESSAGE_TYPE_READ_ORIG_IND;
-
-import com.google.android.mms.ContentType;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.DeliveryInd;
-import com.google.android.mms.pdu.GenericPdu;
-import com.google.android.mms.pdu.NotificationInd;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduParser;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.pdu.ReadOrigInd;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.BroadcastReceiver;
-import android.content.ContentResolver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.Intent;
-import android.database.Cursor;
-import android.database.DatabaseUtils;
-import android.net.Uri;
-import android.os.AsyncTask;
-import android.os.PowerManager;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.Mms.Inbox;
-import android.util.Config;
-import android.util.Log;
-
-/**
- * Receives Intent.WAP_PUSH_RECEIVED_ACTION intents and starts the
- * TransactionService by passing the push-data to it.
- */
-public class PushReceiver extends BroadcastReceiver {
-    private static final String TAG = "PushReceiver";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private abstract class WakefulAsyncTask<Params,Progress,Result>
-                          extends AsyncTask<Params,Progress,Result> {
-        private PowerManager.WakeLock mWakeLock;
-        
-        public void useWakeLock(Context c, int wakeLockFlags, String tag) {
-            PowerManager pm = (PowerManager)c.getSystemService(Context.POWER_SERVICE);
-            mWakeLock = pm.newWakeLock(wakeLockFlags, tag);
-            mWakeLock.setReferenceCounted(false);
-        }
-        
-        @Override
-        protected void onPreExecute() {
-            if (mWakeLock != null) {
-                mWakeLock.acquire();
-            }
-        }
-        
-        @Override
-        protected void onPostExecute(Result result) {
-            if (mWakeLock != null) {
-                mWakeLock.release();
-            }
-        }
-    }
-    
-    private class ReceivePushTask extends WakefulAsyncTask<Intent,Void,Void> {
-        private Context mContext;
-        public ReceivePushTask(Context context) {
-            mContext = context;
-            useWakeLock(context, PowerManager.PARTIAL_WAKE_LOCK, "ReceivePushTask");
-        }
-
-        @Override
-        protected Void doInBackground(Intent... intents) {
-            Intent intent = intents[0];
-            
-            // Get raw PDU push-data from the message and parse it
-            byte[] pushData = intent.getByteArrayExtra("data");
-            PduParser parser = new PduParser(pushData);
-            GenericPdu pdu = parser.parse();
-
-            if (null == pdu) {
-                Log.e(TAG, "Invalid PUSH data");
-                return null;
-            }
-
-            PduPersister p = PduPersister.getPduPersister(mContext);
-            ContentResolver cr = mContext.getContentResolver();
-            int type = pdu.getMessageType();
-            long threadId = -1;
-
-            try {
-                switch (type) {
-                    case MESSAGE_TYPE_DELIVERY_IND:
-                    case MESSAGE_TYPE_READ_ORIG_IND: {
-                        threadId = findThreadId(mContext, pdu, type);
-                        if (threadId == -1) {
-                            // The associated SendReq isn't found, therefore skip
-                            // processing this PDU.
-                            break;
-                        }
-
-                        Uri uri = p.persist(pdu, Inbox.CONTENT_URI);
-                        // Update thread ID for ReadOrigInd & DeliveryInd.
-                        ContentValues values = new ContentValues(1);
-                        values.put(Mms.THREAD_ID, threadId);
-                        SqliteWrapper.update(mContext, cr, uri, values, null, null);
-                        break;
-                    }
-                    case MESSAGE_TYPE_NOTIFICATION_IND: {
-                        NotificationInd nInd = (NotificationInd) pdu;
-                        if (!isDuplicateNotification(mContext, nInd)) {
-                            Uri uri = p.persist(pdu, Inbox.CONTENT_URI);
-                            // Start service to finish the notification transaction.
-                            Intent svc = new Intent(mContext, TransactionService.class);
-                            svc.putExtra(TransactionBundle.URI, uri.toString());
-                            svc.putExtra(TransactionBundle.TRANSACTION_TYPE,
-                                    Transaction.NOTIFICATION_TRANSACTION);
-                            mContext.startService(svc);
-                        } else if (LOCAL_LOGV) {
-                            Log.v(TAG, "Skip downloading duplicate message: "
-                                    + new String(nInd.getContentLocation()));
-                        }
-                        break;
-                    }
-                    default:
-                        Log.e(TAG, "Received unrecognized PDU.");
-                }
-            } catch (MmsException e) {
-                Log.e(TAG, "Failed to save the data from PUSH: type=" + type, e);
-            } catch (RuntimeException e) {
-                Log.e(TAG, "Unexpected RuntimeException.", e);
-            }
-
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "PUSH Intent processed.");
-            }
-
-            return null;
-        }
-    }
-    
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        if (intent.getAction().equals(WAP_PUSH_RECEIVED_ACTION)
-                && ContentType.MMS_MESSAGE.equals(intent.getType())) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Received PUSH Intent: " + intent);
-            }
-            
-            new ReceivePushTask(context).execute(intent);
-        }
-    }
-
-    private static long findThreadId(Context context, GenericPdu pdu, int type) {
-        String messageId;
-
-        if (type == MESSAGE_TYPE_DELIVERY_IND) {
-            messageId = new String(((DeliveryInd) pdu).getMessageId());
-        } else {
-            messageId = new String(((ReadOrigInd) pdu).getMessageId());
-        }
-
-        StringBuilder sb = new StringBuilder('(');
-        sb.append(Mms.MESSAGE_ID);
-        sb.append('=');
-        sb.append(DatabaseUtils.sqlEscapeString(messageId));
-        sb.append(" AND ");
-        sb.append(Mms.MESSAGE_TYPE);
-        sb.append('=');
-        sb.append(PduHeaders.MESSAGE_TYPE_SEND_REQ);
-        // TODO ContentResolver.query() appends closing ')' to the selection argument
-        // sb.append(')');
-
-        Cursor cursor = SqliteWrapper.query(context, context.getContentResolver(),
-                            Mms.CONTENT_URI, new String[] { Mms.THREAD_ID },
-                            sb.toString(), null, null);
-        if (cursor != null) {
-            try {
-                if ((cursor.getCount() == 1) && cursor.moveToFirst()) {
-                    return cursor.getLong(0);
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-
-        return -1;
-    }
-
-    private static boolean isDuplicateNotification(
-            Context context, NotificationInd nInd) {
-        byte[] rawLocation = nInd.getContentLocation();
-        if (rawLocation != null) {
-            String location = new String(rawLocation);
-            String selection = Mms.CONTENT_LOCATION + " = ?";
-            String[] selectionArgs = new String[] { location };
-            Cursor cursor = SqliteWrapper.query(
-                    context, context.getContentResolver(),
-                    Mms.CONTENT_URI, new String[] { Mms._ID },
-                    selection, selectionArgs, null);
-            if (cursor != null) {
-                try {
-                    if (cursor.getCount() > 0) {
-                        // We already received the same notification before.
-                        return true;
-                    }
-                } finally {
-                    cursor.close();
-                }
-            }
-        }
-        return false;
-    }
-}
diff --git a/src/com/android/mms/transaction/ReadRecTransaction.java b/src/com/android/mms/transaction/ReadRecTransaction.java
deleted file mode 100644
index 0a104ac..0000000
--- a/src/com/android/mms/transaction/ReadRecTransaction.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.PduComposer;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.pdu.ReadRecInd;
-
-import android.content.Context;
-import android.net.Uri;
-import android.provider.Telephony.Mms.Sent;
-import android.util.Config;
-import android.util.Log;
-
-import java.io.IOException;
-
-/**
- * The ReadRecTransaction is responsible for sending read report
- * notifications (M-read-rec.ind) to clients that have requested them.
- * It:
- *
- * <ul>
- * <li>Loads the read report indication from storage (Outbox).
- * <li>Packs M-read-rec.ind and sends it.
- * <li>Notifies the TransactionService about succesful completion.
- * </ul>
- */
-public class ReadRecTransaction extends Transaction {
-    private static final String TAG = "ReadRecTransaction";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private final Uri mReadReportURI;
-
-    public ReadRecTransaction(Context context,
-            int transId,
-            TransactionSettings connectionSettings,
-            String uri) {
-        super(context, transId, connectionSettings);
-        mReadReportURI = Uri.parse(uri);
-        mId = uri;
-
-        // Attach the transaction to the instance of RetryScheduler.
-        attach(RetryScheduler.getInstance(context));
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see com.android.mms.Transaction#process()
-     */
-    @Override
-    public void process() {
-        PduPersister persister = PduPersister.getPduPersister(mContext);
-
-        try {
-            // Load M-read-rec.ind from outbox
-            ReadRecInd readRecInd = (ReadRecInd) persister.load(mReadReportURI);
-
-            // Pack M-read-rec.ind and send it
-            byte[] postingData = new PduComposer(mContext, readRecInd).make();
-            sendPdu(postingData);
-
-            Uri uri = persister.move(mReadReportURI, Sent.CONTENT_URI);
-            mTransactionState.setState(TransactionState.SUCCESS);
-            mTransactionState.setContentUri(uri);
-        } catch (IOException e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Failed to send M-Read-Rec.Ind.", e);
-            }
-        } catch (MmsException e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Failed to load message from Outbox.", e);
-            }
-        } catch (RuntimeException e) {
-            if (LOCAL_LOGV) {
-                Log.e(TAG, "Unexpected RuntimeException.", e);
-            }
-        } finally {
-            if (mTransactionState.getState() != TransactionState.SUCCESS) {
-                mTransactionState.setState(TransactionState.FAILED);
-                mTransactionState.setContentUri(mReadReportURI);
-            }
-            notifyObservers();
-        }
-    }
-
-    @Override
-    public int getType() {
-        return READREC_TRANSACTION;
-    }
-}
diff --git a/src/com/android/mms/transaction/RetrieveTransaction.java b/src/com/android/mms/transaction/RetrieveTransaction.java
deleted file mode 100644
index afa76e1..0000000
--- a/src/com/android/mms/transaction/RetrieveTransaction.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import com.android.mms.util.DownloadManager;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.AcknowledgeInd;
-import com.google.android.mms.pdu.PduComposer;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduParser;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.pdu.RetrieveConf;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.ContentValues;
-import android.content.Context;
-import android.database.Cursor;
-import android.net.Uri;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.Mms.Inbox;
-import android.util.Config;
-import android.util.Log;
-
-import java.io.IOException;
-
-/**
- * The RetrieveTransaction is responsible for retrieving multimedia
- * messages (M-Retrieve.conf) from the MMSC server.  It:
- *
- * <ul>
- * <li>Sends a GET request to the MMSC server.
- * <li>Retrieves the binary M-Retrieve.conf data and parses it.
- * <li>Persists the retrieve multimedia message.
- * <li>Determines whether an acknowledgement is required.
- * <li>Creates appropriate M-Acknowledge.ind and sends it to MMSC server.
- * <li>Notifies the TransactionService about succesful completion.
- * </ul>
- */
-public class RetrieveTransaction extends Transaction implements Runnable {
-    private static final String TAG = "RetrieveTransaction";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private final Uri mUri;
-    private final String mContentLocation;
-
-    public RetrieveTransaction(Context context, int serviceId,
-            TransactionSettings connectionSettings, String uri)
-            throws MmsException {
-        super(context, serviceId, connectionSettings);
-
-        if (uri.startsWith("content://")) {
-            mUri = Uri.parse(uri); // The Uri of the M-Notification.ind
-            mId = mContentLocation = getContentLocation(context, mUri);
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "X-Mms-Content-Location: " + mContentLocation);
-            }
-        } else {
-            throw new IllegalArgumentException(
-                    "Initializing from X-Mms-Content-Location is abandoned!");
-        }
-
-        // Attach the transaction to the instance of RetryScheduler.
-        attach(RetryScheduler.getInstance(context));
-    }
-
-    private static String getContentLocation(Context context, Uri uri)
-            throws MmsException {
-        Cursor cursor = SqliteWrapper.query(context, context.getContentResolver(),
-                            uri, new String[] {Mms.CONTENT_LOCATION}, null, null, null);
-
-        if (cursor != null) {
-            try {
-                if ((cursor.getCount() == 1) && cursor.moveToFirst()) {
-                    return cursor.getString(0);
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-
-        throw new MmsException("Cannot get X-Mms-Content-Location from: " + uri);
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see com.android.mms.transaction.Transaction#process()
-     */
-    @Override
-    public void process() {
-        new Thread(this).start();
-    }
-
-    public void run() {
-        try {
-            // Change the downloading state of the M-Notification.ind.
-            DownloadManager.getInstance().markState(
-                    mUri, DownloadManager.STATE_DOWNLOADING);
-
-            // Send GET request to MMSC and retrieve the response data.
-            byte[] resp = getPdu(mContentLocation);
-
-            // Parse M-Retrieve.conf
-            RetrieveConf retrieveConf = (RetrieveConf) new PduParser(resp).parse();
-            if (null == retrieveConf) {
-                throw new MmsException("Invalid M-Retrieve.conf PDU.");
-            }
-
-            if (isDuplicateMessage(mContext, retrieveConf)) {
-                // Mark this transaction as failed to prevent duplicate
-                // notification to user.
-                mTransactionState.setState(TransactionState.FAILED);
-                mTransactionState.setContentUri(mUri);
-            } else {
-                // Store M-Retrieve.conf into Inbox
-                PduPersister persister = PduPersister.getPduPersister(mContext);
-                Uri uri = persister.persist(retrieveConf, Inbox.CONTENT_URI);
-
-                // The M-Retrieve.conf has been successfully downloaded.
-                mTransactionState.setState(TransactionState.SUCCESS);
-                mTransactionState.setContentUri(uri);
-                // Remember the location the message was downloaded from.
-                // Since it's not critical, it won't fail the transaction.
-                updateContentLocation(mContext, uri, mContentLocation);
-            }
-
-            // Delete the corresponding M-Notification.ind.
-            SqliteWrapper.delete(mContext, mContext.getContentResolver(),
-                                 mUri, null, null);
-
-            // Send ACK to the Proxy-Relay to indicate we have fetched the
-            // MM successfully.
-            // Don't mark the transaction as failed if we failed to send it.
-            sendAcknowledgeInd(retrieveConf);
-        } catch (MmsException e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Unexpected MmsException.", e);
-            }
-        } catch (ClassCastException e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Invalid M-Retrieve.conf pdu.", e);
-            }
-        } catch (IOException e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Unexpected IOException.", e);
-            }
-        } catch (Exception e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Unexpected Exception.", e);
-            }
-        } finally {
-            if (mTransactionState.getState() != TransactionState.SUCCESS) {
-                mTransactionState.setState(TransactionState.FAILED);
-                mTransactionState.setContentUri(mUri);
-                Log.e(TAG, "Retrieval failed.");
-            }
-            notifyObservers();
-        }
-    }
-
-    private static boolean isDuplicateMessage(Context context, RetrieveConf rc) {
-        byte[] rawMessageId = rc.getMessageId();
-        if (rawMessageId != null) {
-            String messageId = new String(rawMessageId);
-            String selection = "(" + Mms.MESSAGE_ID + " = ? AND "
-                                   + Mms.MESSAGE_TYPE + " = ?)";
-            String[] selectionArgs = new String[] { messageId,
-                    String.valueOf(PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF) };
-            Cursor cursor = SqliteWrapper.query(
-                    context, context.getContentResolver(),
-                    Mms.CONTENT_URI, new String[] { Mms._ID },
-                    selection, selectionArgs, null);
-            if (cursor != null) {
-                try {
-                    if (cursor.getCount() > 0) {
-                        // We already received the same message before.
-                        return true;
-                    }
-                } finally {
-                    cursor.close();
-                }
-            }
-        }
-        return false;
-    }
-
-    private void sendAcknowledgeInd(RetrieveConf rc)
-            throws MmsException, IOException {
-        // Send M-Acknowledge.ind to MMSC if required.
-        // If the Transaction-ID isn't set in the M-Retrieve.conf, it means
-        // the MMS proxy-relay doesn't require an ACK.
-        byte[] tranId = rc.getTransactionId();
-        if (tranId != null) {
-            // Create M-Acknowledge.ind
-            AcknowledgeInd acknowledgeInd = new AcknowledgeInd(
-                    PduHeaders.CURRENT_MMS_VERSION, tranId);
-
-            // Pack M-Acknowledge.ind and send it
-            sendPdu(new PduComposer(mContext, acknowledgeInd).make());
-        }
-    }
-
-    private static void updateContentLocation(Context context, Uri uri,
-                                              String contentLocation) {
-        ContentValues values = new ContentValues(1);
-        values.put(Mms.CONTENT_LOCATION, contentLocation);
-        SqliteWrapper.update(context, context.getContentResolver(),
-                             uri, values, null, null);
-    }
-
-    @Override
-    public int getType() {
-        return RETRIEVE_TRANSACTION;
-    }
-}
diff --git a/src/com/android/mms/transaction/RetryScheduler.java b/src/com/android/mms/transaction/RetryScheduler.java
deleted file mode 100644
index d5a3f15..0000000
--- a/src/com/android/mms/transaction/RetryScheduler.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.transaction;
-
-import com.android.mms.util.DownloadManager;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.app.AlarmManager;
-import android.app.PendingIntent;
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.Intent;
-import android.database.Cursor;
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo;
-import android.net.Uri;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.MmsSms;
-import android.provider.Telephony.Sms;
-import android.provider.Telephony.MmsSms.PendingMessages;
-import android.text.format.DateFormat;
-import android.util.Config;
-import android.util.Log;
-
-public class RetryScheduler implements Observer {
-    private static final String TAG = "RetryScheduler";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private final Context mContext;
-    private final ContentResolver mContentResolver;
-
-    private RetryScheduler(Context context) {
-        mContext = context;
-        mContentResolver = context.getContentResolver();
-    }
-
-    private static RetryScheduler sInstance;
-    public static RetryScheduler getInstance(Context context) {
-        if (sInstance == null) {
-            sInstance = new RetryScheduler(context);
-        }
-        return sInstance;
-    }
-
-    private boolean isConnected() {
-        ConnectivityManager mConnMgr = (ConnectivityManager)
-                    mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
-        NetworkInfo networkInfo = mConnMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
-        return networkInfo.isConnected();
-    }
-
-    public void update(Observable observable) {
-        try {
-            Transaction t = (Transaction) observable;
-            // We are only supposed to handle M-Notification.ind, M-Send.req
-            // and M-ReadRec.ind.
-            if ((t instanceof NotificationTransaction)
-                    || (t instanceof RetrieveTransaction)
-                    || (t instanceof ReadRecTransaction)
-                    || (t instanceof SendTransaction)) {
-                try {
-                    TransactionState state = t.getState();
-                    if (state.getState() == TransactionState.FAILED) {
-                        Uri uri = state.getContentUri();
-                        if (uri != null) {
-                            scheduleRetry(uri);
-                        }
-                    }
-                } finally {
-                    t.detach(this);
-                }
-            }
-        } finally {
-            if (isConnected()) {
-                setRetryAlarm(mContext);
-            }
-        }
-    }
-
-    private void scheduleRetry(Uri uri) {
-        long msgId = ContentUris.parseId(uri);
-
-        Uri.Builder uriBuilder = PendingMessages.CONTENT_URI.buildUpon();
-        uriBuilder.appendQueryParameter("protocol", "mms");
-        uriBuilder.appendQueryParameter("message", String.valueOf(msgId));
-
-        Cursor cursor = SqliteWrapper.query(mContext, mContentResolver,
-                uriBuilder.build(), null, null, null, null);
-
-        if (cursor != null) {
-            try {
-                if ((cursor.getCount() == 1) && cursor.moveToFirst()) {
-                    int msgType = cursor.getInt(cursor.getColumnIndexOrThrow(
-                            PendingMessages.MSG_TYPE));
-
-                    int direction;
-                    switch (msgType) {
-                        case PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND:
-                            direction = AbstractRetryScheme.INCOMING;
-                            break;
-                        case PduHeaders.MESSAGE_TYPE_SEND_REQ:
-                        case PduHeaders.MESSAGE_TYPE_READ_REC_IND:
-                            direction = AbstractRetryScheme.OUTGOING;
-                            break;
-                        default:
-                            Log.w(TAG, "Bad message type found: " + msgType);
-                            return;
-                    }
-
-                    int retryIndex = cursor.getInt(cursor.getColumnIndexOrThrow(
-                            PendingMessages.RETRY_INDEX)) + 1; // Count this time.
-
-                    // TODO Should exactly understand what was happened.
-                    int errorType = MmsSms.ERR_TYPE_GENERIC;
-
-                    DefaultRetryScheme scheme = new DefaultRetryScheme(
-                            mContext, direction, retryIndex, errorType);
-
-                    ContentValues values = new ContentValues(4);
-                    long current = System.currentTimeMillis();
-                    boolean isRetryDownloading =
-                            (msgType == PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND);
-                    if (retryIndex < scheme.getRetryLimit()) {
-                        long retryAt = current + scheme.getWaitingInterval();
-
-                        if (LOCAL_LOGV) {
-                            Log.v(TAG, "Retry for " + uri + " is scheduled to "
-                                    + DateFormat.format("kk:mm:ss.", retryAt)
-                                    + (retryAt % 1000));
-                        }
-
-                        values.put(PendingMessages.DUE_TIME, retryAt);
-
-                        if (isRetryDownloading) {
-                            // Downloading process is transiently failed.
-                            DownloadManager.getInstance().markState(
-                                    uri, DownloadManager.STATE_TRANSIENT_FAILURE);
-                        }
-                    } else {
-                        errorType = MmsSms.ERR_TYPE_GENERIC_PERMANENT;
-                        if (isRetryDownloading) {
-                            Cursor c = SqliteWrapper.query(mContext, mContext.getContentResolver(), uri,
-                                    new String[] { Mms.THREAD_ID }, null, null, null);
-                            
-                            long threadId = -1;
-                            if (c != null) {
-                                try {
-                                    if (c.moveToFirst()) {
-                                        threadId = c.getLong(0);
-                                    }
-                                } finally {
-                                    c.close();
-                                }
-                            }
-
-                            if (threadId != -1) {
-                                // Downloading process is permanently failed.
-                                MessagingNotification.notifyDownloadFailed(mContext, threadId);
-                            }
-
-                            DownloadManager.getInstance().markState(
-                                    uri, DownloadManager.STATE_PERMANENT_FAILURE);
-                        } else {
-                            MessagingNotification.notifySendFailed(mContext, true);
-                        }
-                    }
-
-                    values.put(PendingMessages.ERROR_TYPE,  errorType);
-                    values.put(PendingMessages.RETRY_INDEX, retryIndex);
-                    values.put(PendingMessages.LAST_TRY,    current);
-
-                    int columnIndex = cursor.getColumnIndexOrThrow(
-                            PendingMessages._ID);
-                    long id = cursor.getLong(columnIndex);
-                    SqliteWrapper.update(mContext, mContentResolver,
-                            PendingMessages.CONTENT_URI,
-                            values, PendingMessages._ID + "=" + id, null);
-                } else if (LOCAL_LOGV) {
-                    Log.v(TAG, "Cannot found correct pending status for: " + msgId);
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-    }
-
-    public static void setRetryAlarm(Context context) {
-        Cursor cursor = PduPersister.getPduPersister(context).getPendingMessages(
-                Long.MAX_VALUE);
-        if (cursor != null) {
-            try {
-                if (cursor.moveToFirst()) {
-                    // The result of getPendingMessages() is order by due time.
-                    long retryAt = cursor.getLong(cursor.getColumnIndexOrThrow(
-                            PendingMessages.DUE_TIME));
-
-                    Intent service = new Intent(TransactionService.ACTION_ONALARM,
-                                        null, context, TransactionService.class);
-                    PendingIntent operation = PendingIntent.getService(
-                            context, 0, service, PendingIntent.FLAG_ONE_SHOT);
-                    AlarmManager am = (AlarmManager) context.getSystemService(
-                            Context.ALARM_SERVICE);
-                    am.set(AlarmManager.RTC, retryAt, operation);
-
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, "Next retry is scheduled at: "
-                                + DateFormat.format("kk:mm:ss.", retryAt)
-                                + (retryAt % 1000));
-                    }
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-    }
-}
diff --git a/src/com/android/mms/transaction/SendTransaction.java b/src/com/android/mms/transaction/SendTransaction.java
deleted file mode 100644
index 1b96a70..0000000
--- a/src/com/android/mms/transaction/SendTransaction.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import com.android.mms.util.RateController;
-import com.android.mms.util.SendingProgressTokenManager;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.PduComposer;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduParser;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.pdu.SendConf;
-import com.google.android.mms.pdu.SendReq;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.net.Uri;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.Mms.Sent;
-import android.util.Config;
-import android.util.Log;
-
-import java.io.IOException;
-import java.util.Arrays;
-
-/**
- * The SendTransaction is responsible for sending multimedia messages
- * (M-Send.req) to the MMSC server.  It:
- *
- * <ul>
- * <li>Loads the multimedia message from storage (Outbox).
- * <li>Packs M-Send.req and sends it.
- * <li>Retrieves confirmation data from the server  (M-Send.conf).
- * <li>Parses confirmation message and handles it.
- * <li>Moves sent multimedia message from Outbox to Sent.
- * <li>Notifies the TransactionService about successful completion.
- * </ul>
- */
-public class SendTransaction extends Transaction implements Runnable {
-    private static final String TAG = "SendTransaction";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private Thread mThread;
-    private final Uri mSendReqURI;
-
-    public SendTransaction(Context context,
-            int transId, TransactionSettings connectionSettings, String uri) {
-        super(context, transId, connectionSettings);
-        mSendReqURI = Uri.parse(uri);
-        mId = uri;
-
-        // Attach the transaction to the instance of RetryScheduler.
-        attach(RetryScheduler.getInstance(context));
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see com.android.mms.Transaction#process()
-     */
-    @Override
-    public void process() {
-        mThread = new Thread(this);
-        mThread.start();
-    }
-
-    public void run() {
-        try {
-            RateController rateCtlr = RateController.getInstance();
-            if (rateCtlr.isLimitSurpassed() && !rateCtlr.isAllowedByUser()) {
-                throw new MmsException("Sending rate limit surpassed.");
-            }
-
-            // Load M-Send.req from outbox
-            PduPersister persister = PduPersister.getPduPersister(mContext);
-            SendReq sendReq = (SendReq) persister.load(mSendReqURI);
-
-            // Update the 'date' field of the PDU right before sending it.
-            long date = System.currentTimeMillis() / 1000L;
-            sendReq.setDate(date);
-
-            // Persist the new date value into database.
-            ContentValues values = new ContentValues(1);
-            values.put(Mms.DATE, date);
-            SqliteWrapper.update(mContext, mContext.getContentResolver(),
-                                 mSendReqURI, values, null, null);
-
-            // Pack M-Send.req, send it, retrieve confirmation data, and parse it
-            long tokenKey = ContentUris.parseId(mSendReqURI);
-            byte[] response = sendPdu(SendingProgressTokenManager.get(tokenKey),
-                                      new PduComposer(mContext, sendReq).make());
-            SendingProgressTokenManager.remove(tokenKey);
-
-            SendConf conf = (SendConf) new PduParser(response).parse();
-            if (conf == null) {
-                throw new MmsException("None M-Send.conf received.");
-            }
-
-            // Check whether the responding Transaction-ID is consistent
-            // with the sent one.
-            if (!Arrays.equals(sendReq.getTransactionId(), conf.getTransactionId())) {
-                throw new MmsException("Inconsistent Transaction-ID.");
-            }
-
-            // From now on, we won't save the whole M-Send.conf into
-            // our database. Instead, we just save some interesting fields
-            // into the related M-Send.req.
-            values = new ContentValues(2);
-            int respStatus = conf.getResponseStatus();
-            values.put(Mms.RESPONSE_STATUS, respStatus);
-
-            if (respStatus != PduHeaders.RESPONSE_STATUS_OK) {
-                SqliteWrapper.update(mContext, mContext.getContentResolver(),
-                                     mSendReqURI, values, null, null);
-                throw new MmsException("Server returns an error code: " + respStatus);
-            }
-
-            String messageId = PduPersister.toIsoString(conf.getMessageId());
-            values.put(Mms.MESSAGE_ID, messageId);
-            SqliteWrapper.update(mContext, mContext.getContentResolver(),
-                                 mSendReqURI, values, null, null);
-
-            // Move M-Send.req from Outbox into Sent.
-            Uri uri = persister.move(mSendReqURI, Sent.CONTENT_URI);
-
-            mTransactionState.setState(TransactionState.SUCCESS);
-            mTransactionState.setContentUri(uri);
-        } catch (IOException e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Unexpected IOException", e);
-            }
-        } catch (MmsException e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Unexpected MmsException", e);
-            }
-        } catch (ClassCastException e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Unexpected ClassCastException", e);
-            }
-        } catch (RuntimeException e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Unexpected RuntimeException", e);
-            }
-        } catch (Exception e) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Unexpected Exception.", e);
-            }
-        } finally {
-            if (mTransactionState.getState() != TransactionState.SUCCESS) {
-                mTransactionState.setState(TransactionState.FAILED);
-                mTransactionState.setContentUri(mSendReqURI);
-                Log.e(TAG, "Delivery failed.");
-            }
-            notifyObservers();
-        }
-    }
-
-    @Override
-    public int getType() {
-        return SEND_TRANSACTION;
-    }
-}
diff --git a/src/com/android/mms/transaction/SimFullReceiver.java b/src/com/android/mms/transaction/SimFullReceiver.java
deleted file mode 100644
index c6a5b28..0000000
--- a/src/com/android/mms/transaction/SimFullReceiver.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import com.android.mms.R;
-import com.android.mms.ui.ManageSimMessages;
-
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.app.PendingIntent;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.provider.Settings;
-import android.provider.Telephony;
-
-/**
- * Receive Intent.SIM_FULL_ACTION.  Handle notification that SIM is full.
- */
-public class SimFullReceiver extends BroadcastReceiver {
-    
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        if (Settings.Secure.getInt(context.getContentResolver(),
-            Settings.Secure.DEVICE_PROVISIONED, 0) == 1 &&
-            Telephony.Sms.Intents.SIM_FULL_ACTION.equals(intent.getAction())) {
-            
-            NotificationManager nm = (NotificationManager)
-                context.getSystemService(Context.NOTIFICATION_SERVICE);
-
-            Intent viewSimIntent = new Intent(context, ManageSimMessages.class);
-            viewSimIntent.setAction(Intent.ACTION_VIEW);
-            viewSimIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            PendingIntent pendingIntent = PendingIntent.getActivity(
-                    context, 0, viewSimIntent, 0);
-
-            Notification notification = new Notification();
-            notification.icon = R.drawable.stat_sys_no_sim;
-            notification.tickerText = context.getString(R.string.sim_full_title);
-            notification.defaults = Notification.DEFAULT_ALL;
-            
-            notification.setLatestEventInfo(
-                    context, context.getString(R.string.sim_full_title), 
-                    context.getString(R.string.sim_full_body),
-                    pendingIntent);
-            nm.notify(ManageSimMessages.SIM_FULL_NOTIFICATION_ID, notification);
-       }
-    }
-
-}
diff --git a/src/com/android/mms/transaction/SmsMessageSender.java b/src/com/android/mms/transaction/SmsMessageSender.java
deleted file mode 100644
index 680997b..0000000
--- a/src/com/android/mms/transaction/SmsMessageSender.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.transaction;
-
-import com.android.mms.ui.MessagingPreferenceActivity;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.app.PendingIntent;
-import android.content.ContentUris;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.database.Cursor;
-import android.database.sqlite.SQLiteException;
-import android.net.Uri;
-import android.preference.PreferenceManager;
-import android.provider.Telephony.Sms;
-import android.provider.Telephony.Threads;
-import android.provider.Telephony.Sms.Conversations;
-import android.telephony.gsm.SmsManager;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-
-public class SmsMessageSender implements MessageSender {
-    private final Context mContext;
-    private final int mNumberOfDests;
-    private final String[] mDests;
-    private final String mMessageText;
-    private final String mServiceCenter;
-    private final long mThreadId;
-    private long mTimestamp;
-    
-    // Default preference values
-    private static final boolean DEFAULT_DELIVERY_REPORT_MODE  = false;
-
-    private static final String[] SERVICE_CENTER_PROJECTION = new String[] {
-        Sms.Conversations.REPLY_PATH_PRESENT,
-        Sms.Conversations.SERVICE_CENTER,
-    };
-
-    private static final String[] DATE_PROJECTION = new String[] {
-        Sms.DATE
-    };
-    
-    private static final int COLUMN_REPLY_PATH_PRESENT = 0;
-    private static final int COLUMN_SERVICE_CENTER     = 1;
-
-    public SmsMessageSender(Context context, String[] dests, String msgText,
-            long threadId) {
-        mContext = context;
-        mMessageText = msgText;
-        mNumberOfDests = dests.length;
-        mDests = new String[mNumberOfDests];
-        System.arraycopy(dests, 0, mDests, 0, mNumberOfDests);
-        mTimestamp = System.currentTimeMillis();
-        mThreadId = threadId > 0 ? threadId
-                        : Threads.getOrCreateThreadId(context,
-                                    new HashSet<String>(Arrays.asList(dests)));
-        mServiceCenter = getOutgoingServiceCenter(mThreadId);
-    }
-
-    public boolean sendMessage(long token) throws MmsException {
-        if ((mMessageText == null) || (mNumberOfDests == 0)) {
-            // Don't try to send an empty message.
-            throw new MmsException("Null message body or dest.");
-        }
-
-        SmsManager smsManager = SmsManager.getDefault();
-
-        for (int i = 0; i < mNumberOfDests; i++) {
-            ArrayList<String> messages = smsManager.divideMessage(mMessageText);
-            int messageCount = messages.size();
-            ArrayList<PendingIntent> deliveryIntents =
-                    new ArrayList<PendingIntent>(messageCount);
-            ArrayList<PendingIntent> sentIntents =
-                    new ArrayList<PendingIntent>(messageCount);
-            SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mContext);
-            boolean requestDeliveryReport = prefs.getBoolean(
-                    MessagingPreferenceActivity.SMS_DELIVERY_REPORT_MODE,
-                    DEFAULT_DELIVERY_REPORT_MODE);
-            Uri uri = null;
-            try {
-                uri = Sms.Outbox.addMessage(mContext.getContentResolver(), mDests[i],
-                            mMessageText, null, mTimestamp, requestDeliveryReport, mThreadId);
-            } catch (SQLiteException e) {
-                SqliteWrapper.checkSQLiteException(mContext, e);
-            }
-
-            for (int j = 0; j < messageCount; j++) {
-                if (requestDeliveryReport) {
-                    // TODO: Fix: It should not be necessary to
-                    // specify the class in this intent.  Doing that
-                    // unnecessarily limits customizability.
-                    deliveryIntents.add(PendingIntent.getBroadcast(
-                            mContext, 0,
-                            new Intent(
-                                    MessageStatusReceiver.MESSAGE_STATUS_RECEIVED_ACTION,
-                                    uri,
-                                    mContext,
-                                    MessageStatusReceiver.class),
-                            0));
-                }
-                sentIntents.add(PendingIntent.getBroadcast(
-                        mContext, 0,
-                        new Intent(SmsReceiverService.MESSAGE_SENT_ACTION,
-                                uri,
-                                mContext,
-                                SmsReceiver.class),
-                        0));
-            }
-            smsManager.sendMultipartTextMessage(
-                    mDests[i], mServiceCenter, messages, sentIntents,
-                    deliveryIntents);
-        }
-        return false;
-    }
-
-    /**
-     * Get the service center to use for a reply.
-     *
-     * The rule from TS 23.040 D.6 is that we send reply messages to
-     * the service center of the message to which we're replying, but
-     * only if we haven't already replied to that message and only if
-     * <code>TP-Reply-Path</code> was set in that message.
-     *
-     * Therefore, return the service center from the most recent
-     * message in the conversation, but only if it is a message from
-     * the other party, and only if <code>TP-Reply-Path</code> is set.
-     * Otherwise, return null.
-     */
-    private String getOutgoingServiceCenter(long threadId) {
-        Cursor cursor = null;
-
-        try {
-            cursor = SqliteWrapper.query(mContext, mContext.getContentResolver(),
-                            Sms.CONTENT_URI, SERVICE_CENTER_PROJECTION,
-                            "thread_id = " + threadId, null, "date DESC");
-
-            if ((cursor == null) || !cursor.moveToFirst()) {
-                return null;
-            }
-
-            boolean replyPathPresent = (1 == cursor.getInt(COLUMN_REPLY_PATH_PRESENT));
-            return replyPathPresent ? cursor.getString(COLUMN_SERVICE_CENTER) : null;
-        } finally {
-            if (cursor != null) {
-                cursor.close();
-            }
-        }
-    }
-}
diff --git a/src/com/android/mms/transaction/SmsReceiver.java b/src/com/android/mms/transaction/SmsReceiver.java
deleted file mode 100644
index 6d8ab2b..0000000
--- a/src/com/android/mms/transaction/SmsReceiver.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import android.app.Service;
-import android.content.BroadcastReceiver;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.provider.Telephony.Sms.Intents;
-import android.os.PowerManager;
-
-/**
- * Handle incoming SMSes.  Just dispatches the work off to a Service.
- */
-public class SmsReceiver extends BroadcastReceiver {
-    static final Object mStartingServiceSync = new Object();
-    static PowerManager.WakeLock mStartingService;
-
-    @Override
-    public void onReceive(Context context, Intent intent) {
-        onReceiveWithPrivilege(context, intent, false);
-    }
-
-    protected void onReceiveWithPrivilege(Context context, Intent intent, boolean privileged) {
-        // If 'privileged' is false, it means that the intent was delivered to the base
-        // no-permissions receiver class.  If we get an SMS_RECEIVED message that way, it
-        // means someone has tried to spoof the message by delivering it outside the normal
-        // permission-checked route, so we just ignore it.
-        if (!privileged && intent.getAction().equals(Intents.SMS_RECEIVED_ACTION)) {
-            return;
-        }
-
-        intent.setClass(context, SmsReceiverService.class);
-        intent.putExtra("result", getResultCode());
-        beginStartingService(context, intent);
-    }
-
-    // N.B.: <code>beginStartingService</code> and
-    // <code>finishStartingService</code> were copied from
-    // <code>com.android.calendar.AlertReceiver</code>.  We should
-    // factor them out or, even better, improve the API for starting
-    // services under wake locks.
-
-    /**
-     * Start the service to process the current event notifications, acquiring
-     * the wake lock before returning to ensure that the service will run.
-     */
-    public static void beginStartingService(Context context, Intent intent) {
-        synchronized (mStartingServiceSync) {
-            if (mStartingService == null) {
-                PowerManager pm =
-                    (PowerManager)context.getSystemService(Context.POWER_SERVICE);
-                mStartingService = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
-                        "StartingAlertService");
-                mStartingService.setReferenceCounted(false);
-            }
-            mStartingService.acquire();
-            context.startService(intent);
-        }
-    }
-
-    /**
-     * Called back by the service when it has finished processing notifications,
-     * releasing the wake lock if the service is now stopping.
-     */
-    public static void finishStartingService(Service service, int startId) {
-        synchronized (mStartingServiceSync) {
-            if (mStartingService != null) {
-                if (service.stopSelfResult(startId)) {
-                    mStartingService.release();
-                }
-            }
-        }
-    }
-}
diff --git a/src/com/android/mms/transaction/SmsReceiverService.java b/src/com/android/mms/transaction/SmsReceiverService.java
deleted file mode 100644
index eef3236..0000000
--- a/src/com/android/mms/transaction/SmsReceiverService.java
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import static android.content.Intent.ACTION_BOOT_COMPLETED;
-import static android.provider.Telephony.Sms.Intents.SMS_RECEIVED_ACTION;
-
-import com.android.internal.telephony.TelephonyIntents;
-import com.android.mms.R;
-import com.android.mms.ui.ClassZeroActivity;
-import com.android.mms.util.SendingProgressTokenManager;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.app.Activity;
-import android.app.Service;
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.Intent;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.IBinder;
-import android.os.Looper;
-import android.os.Message;
-import android.os.Process;
-import android.provider.Telephony.Sms;
-import android.provider.Telephony.Sms.Inbox;
-import android.provider.Telephony.Sms.Intents;
-import android.provider.Telephony.Sms.Outbox;
-import android.telephony.ServiceState;
-import android.telephony.gsm.SmsManager;
-import android.telephony.gsm.SmsMessage;
-import android.util.Config;
-import android.util.Log;
-import android.widget.Toast;
-
-/**
- * This service essentially plays the role of a "worker thread", allowing us to store
- * incoming messages to the database, update notifications, etc. without blocking the
- * main thread that SmsReceiver runs on.
- */
-public class SmsReceiverService extends Service {
-    private static final String TAG = "SmsReceiverService";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private ServiceHandler mServiceHandler;
-    private Looper mServiceLooper;
-    private final Object mLock = new Object();
-
-    public static final String MESSAGE_SENT_ACTION =
-        "com.android.mms.transaction.MESSAGE_SENT";
-
-    // This must match the column IDs below.
-    private static final String[] SEND_PROJECTION = new String[] {
-        Sms._ID,        //0
-        Sms.THREAD_ID,  //1
-        Sms.ADDRESS,    //2
-        Sms.BODY,       //3
-
-    };
-
-    public Handler mToastHandler = new Handler() {
-        @Override
-        public void handleMessage(Message msg) {
-            Toast.makeText(SmsReceiverService.this, getString(R.string.message_queued),
-                    Toast.LENGTH_SHORT).show();
-        }
-    };
-
-    // This must match SEND_PROJECTION.
-    private static final int SEND_COLUMN_ID         = 0;
-    private static final int SEND_COLUMN_THREAD_ID  = 1;
-    private static final int SEND_COLUMN_ADDRESS    = 2;
-    private static final int SEND_COLUMN_BODY       = 3;
-
-    private int mResultCode;
-
-    @Override
-    public void onCreate() {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Creating SmsReceiverService");
-        }
-
-        // Start up the thread running the service.  Note that we create a
-        // separate thread because the service normally runs in the process's
-        // main thread, which we don't want to block.
-        HandlerThread thread = new HandlerThread(TAG, Process.THREAD_PRIORITY_BACKGROUND);
-        thread.start();
-
-        mServiceLooper = thread.getLooper();
-        mServiceHandler = new ServiceHandler(mServiceLooper);
-    }
-
-    @Override
-    public void onStart(Intent intent, int startId) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Starting #" + startId + ": " + intent.getExtras());
-        }
-
-        mResultCode = intent.getIntExtra("result", 0);
-
-        Message msg = mServiceHandler.obtainMessage();
-        msg.arg1 = startId;
-        msg.obj = intent;
-        mServiceHandler.sendMessage(msg);
-    }
-
-    @Override
-    public void onDestroy() {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Destroying SmsReceiverService");
-        }
-        mServiceLooper.quit();
-    }
-
-    @Override
-    public IBinder onBind(Intent intent) {
-        return null;
-    }
-
-    private final class ServiceHandler extends Handler {
-        public ServiceHandler(Looper looper) {
-            super(looper);
-        }
-
-        /**
-         * Handle incoming transaction requests.
-         * The incoming requests are initiated by the MMSC Server or by the
-         * MMS Client itself.
-         */
-        @Override
-        public void handleMessage(Message msg) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Handling incoming message: " + msg);
-            }
-            int serviceId = msg.arg1;
-            Intent intent = (Intent)msg.obj;
-
-            String action = intent.getAction();
-
-            if (MESSAGE_SENT_ACTION.equals(intent.getAction())) {
-                handleSmsSent(intent);
-            } else if (SMS_RECEIVED_ACTION.equals(action)) {
-                handleSmsReceived(intent);
-            } else if (ACTION_BOOT_COMPLETED.equals(action)) {
-                handleBootCompleted();
-            } else if (TelephonyIntents.ACTION_SERVICE_STATE_CHANGED.equals(action)) {
-                handleServiceStateChanged(intent);
-            }
-
-            // NOTE: We MUST not call stopSelf() directly, since we need to
-            // make sure the wake lock acquired by AlertReceiver is released.
-            SmsReceiver.finishStartingService(SmsReceiverService.this, serviceId);
-        }
-    }
-
-    private void handleServiceStateChanged(Intent intent) {
-        // If service just returned, start sending out the queued messages
-        ServiceState serviceState = ServiceState.newFromBundle(intent.getExtras());
-        if (serviceState.getState() == ServiceState.STATE_IN_SERVICE) {
-            sendFirstQueuedMessage();
-        }
-    }
-
-    public synchronized void sendFirstQueuedMessage() {
-        // get all the queued messages from the database
-        final Uri uri = Uri.parse("content://sms/queued");
-        ContentResolver resolver = getContentResolver();
-        Cursor c = SqliteWrapper.query(this, resolver, uri,
-                        SEND_PROJECTION, null, null, null);
-
-        if (c != null) {
-            try {
-                if (c.moveToFirst()) {
-                    int msgId = c.getInt(SEND_COLUMN_ID);
-                    String msgText = c.getString(SEND_COLUMN_BODY);
-                    String[] address = new String[1];
-                    address[0] = c.getString(SEND_COLUMN_ADDRESS);
-                    int threadId = c.getInt(SEND_COLUMN_THREAD_ID);
-
-                    SmsMessageSender sender = new SmsMessageSender(this,
-                            address, msgText, threadId);
-                    try {
-                        sender.sendMessage(SendingProgressTokenManager.NO_TOKEN);
-
-                        // Since sendMessage adds a new message to the outbox rather than
-                        // moving the old one, the old one must be deleted here
-                        Uri msgUri = ContentUris.withAppendedId(Sms.CONTENT_URI, msgId);
-                        SqliteWrapper.delete(this, resolver, msgUri, null, null);
-                    } catch (MmsException e) {
-                        Log.e(TAG, "Failed to send message: " + e);
-                    }
-                }
-            } finally {
-                c.close();
-            }
-        }
-    }
-
-    private void handleSmsSent(Intent intent) {
-        Uri uri = intent.getData();
-
-        if (mResultCode == Activity.RESULT_OK) {
-            Sms.moveMessageToFolder(this, uri, Sms.MESSAGE_TYPE_SENT);
-            sendFirstQueuedMessage();
-
-            // Update the notification for failed messages since they
-            // may be deleted.
-            MessagingNotification.updateSendFailedNotification(
-                    this);
-        } else if ((mResultCode == SmsManager.RESULT_ERROR_RADIO_OFF) ||
-                (mResultCode == SmsManager.RESULT_ERROR_NO_SERVICE)) {
-            Sms.moveMessageToFolder(this, uri, Sms.MESSAGE_TYPE_QUEUED);
-            mToastHandler.sendEmptyMessage(1);
-        } else {
-            Sms.moveMessageToFolder(this, uri, Sms.MESSAGE_TYPE_FAILED);
-            MessagingNotification.notifySendFailed(getApplicationContext(), false);
-            sendFirstQueuedMessage();
-        }
-    }
-
-    private void handleSmsReceived(Intent intent) {
-        SmsMessage[] msgs = Intents.getMessagesFromIntent(intent);
-        Uri messageUri = insertMessage(this, msgs);
-
-        if (messageUri != null) {
-            MessagingNotification.updateNewMessageIndicator(this, true);
-        }
-    }
-
-    private void handleBootCompleted() {
-        moveOutboxMessagesToQueuedBox();
-        sendFirstQueuedMessage();
-        MessagingNotification.updateNewMessageIndicator(this);
-    }
-
-    private void moveOutboxMessagesToQueuedBox() {
-        ContentValues values = new ContentValues(1);
-
-        values.put(Sms.TYPE, Sms.MESSAGE_TYPE_QUEUED);
-
-        SqliteWrapper.update(
-                getApplicationContext(), getContentResolver(), Outbox.CONTENT_URI,
-                values, "type = " + Sms.MESSAGE_TYPE_OUTBOX, null);
-    }
-
-    public static final String CLASS_ZERO_BODY_KEY = "CLASS_ZERO_BODY";
-    public static final String CLASS_ZERO_TITLE_KEY = "CLASS_ZERO_TITLE";
-
-    public static final int NOTIFICATION_NEW_MESSAGE = 1;
-
-    // This must match the column IDs below.
-    private final static String[] REPLACE_PROJECTION = new String[] {
-        Sms._ID,
-        Sms.ADDRESS,
-        Sms.PROTOCOL
-    };
-
-    // This must match REPLACE_PROJECTION.
-    private static final int REPLACE_COLUMN_ID = 0;
-
-    /**
-     * If the message is a class-zero message, display it immediately
-     * and return null.  Otherwise, store it using the
-     * <code>ContentResolver</code> and return the
-     * <code>Uri</code> of the thread containing this message
-     * so that we can use it for notification.
-     */
-    private Uri insertMessage(Context context, SmsMessage[] msgs) {
-        // Build the helper classes to parse the messages.
-        SmsMessage sms = msgs[0];
-
-        if (sms.getMessageClass() == SmsMessage.MessageClass.CLASS_0) {
-            displayClassZeroMessage(context, sms);
-            return null;
-        } else if (sms.isReplace()) {
-            return replaceMessage(context, msgs);
-        } else {
-            return storeMessage(context, msgs);
-        }
-    }
-
-    /**
-     * This method is used if this is a "replace short message" SMS.
-     * We find any existing message that matches the incoming
-     * message's originating address and protocol identifier.  If
-     * there is one, we replace its fields with those of the new
-     * message.  Otherwise, we store the new message as usual.
-     *
-     * See TS 23.040 9.2.3.9.
-     */
-    private Uri replaceMessage(Context context, SmsMessage[] msgs) {
-        SmsMessage sms = msgs[0];
-        ContentValues values = extractContentValues(sms);
-
-        values.put(Inbox.BODY, sms.getMessageBody());
-
-        ContentResolver resolver = context.getContentResolver();
-        String originatingAddress = sms.getOriginatingAddress();
-        int protocolIdentifier = sms.getProtocolIdentifier();
-        String selection =
-                Sms.ADDRESS + " = ? AND " +
-                Sms.PROTOCOL + " = ?";
-        String[] selectionArgs = new String[] {
-            originatingAddress, Integer.toString(protocolIdentifier)
-        };
-
-        Cursor cursor = SqliteWrapper.query(context, resolver, Inbox.CONTENT_URI,
-                            REPLACE_PROJECTION, selection, selectionArgs, null);
-
-        if (cursor != null) {
-            try {
-                if (cursor.moveToFirst()) {
-                    long messageId = cursor.getLong(REPLACE_COLUMN_ID);
-                    Uri messageUri = ContentUris.withAppendedId(
-                            Sms.CONTENT_URI, messageId);
-
-                    SqliteWrapper.update(context, resolver, messageUri,
-                                        values, null, null);
-                    return messageUri;
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-        return storeMessage(context, msgs);
-    }
-
-    private Uri storeMessage(Context context, SmsMessage[] msgs) {
-        SmsMessage sms = msgs[0];
-
-        // Store the message in the content provider.
-        ContentValues values = extractContentValues(sms);
-        int pduCount = msgs.length;
-
-        if (pduCount == 1) {
-            // There is only one part, so grab the body directly.
-            values.put(Inbox.BODY, sms.getDisplayMessageBody());
-        } else {
-            // Build up the body from the parts.
-            StringBuilder body = new StringBuilder();
-            for (int i = 0; i < pduCount; i++) {
-                sms = msgs[i];
-                body.append(sms.getDisplayMessageBody());
-            }
-            values.put(Inbox.BODY, body.toString());
-        }
-
-        ContentResolver resolver = context.getContentResolver();
-
-        return SqliteWrapper.insert(context, resolver, Inbox.CONTENT_URI, values);
-    }
-
-    /**
-     * Extract all the content values except the body from an SMS
-     * message.
-     */
-    private ContentValues extractContentValues(SmsMessage sms) {
-        // Store the message in the content provider.
-        ContentValues values = new ContentValues();
-
-        values.put(Inbox.ADDRESS, sms.getDisplayOriginatingAddress());
-
-        // Use now for the timestamp to avoid confusion with clock
-        // drift between the handset and the SMSC.
-        values.put(Inbox.DATE, new Long(System.currentTimeMillis()));
-        values.put(Inbox.PROTOCOL, sms.getProtocolIdentifier());
-        values.put(Inbox.READ, Integer.valueOf(0));
-        if (sms.getPseudoSubject().length() > 0) {
-            values.put(Inbox.SUBJECT, sms.getPseudoSubject());
-        }
-        values.put(Inbox.REPLY_PATH_PRESENT, sms.isReplyPathPresent() ? 1 : 0);
-        values.put(Inbox.SERVICE_CENTER, sms.getServiceCenterAddress());
-        return values;
-    }
-
-    /**
-     * Displays a class-zero message immediately in a pop-up window
-     * with the number from where it received the Notification with
-     * the body of the message
-     *
-     */
-    private void displayClassZeroMessage(Context context, SmsMessage sms) {
-        // Using NEW_TASK here is necessary because we're calling
-        // startActivity from outside an activity.
-        Intent smsDialogIntent = new Intent(context, ClassZeroActivity.class)
-                .putExtra(CLASS_ZERO_BODY_KEY, sms.getMessageBody())
-                .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
-                          | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
-
-        context.startActivity(smsDialogIntent);
-    }
-
-
-}
diff --git a/src/com/android/mms/transaction/Transaction.java b/src/com/android/mms/transaction/Transaction.java
deleted file mode 100644
index 5d582e3..0000000
--- a/src/com/android/mms/transaction/Transaction.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import com.android.mms.util.SendingProgressTokenManager;
-
-import android.content.Context;
-import android.net.Uri;
-import android.net.NetworkUtils;
-import android.net.ConnectivityManager;
-
-import java.io.IOException;
-
-/**
- * Transaction is an abstract class for notification transaction, send transaction
- * and other transactions described in MMS spec.
- * It provides the interfaces of them and some common methods for them.
- */
-public abstract class Transaction extends Observable {
-    private final int mServiceId;
-
-    protected Context mContext;
-    protected String mId;
-    protected TransactionState mTransactionState;
-    protected TransactionSettings mTransactionSettings;
-
-    /**
-     * Identifies push requests.
-     */
-    public static final int NOTIFICATION_TRANSACTION = 0;
-    /**
-     * Identifies deferred retrieve requests.
-     */
-    public static final int RETRIEVE_TRANSACTION     = 1;
-    /**
-     * Identifies send multimedia message requests.
-     */
-    public static final int SEND_TRANSACTION         = 2;
-    /**
-     * Identifies send read report requests.
-     */
-    public static final int READREC_TRANSACTION      = 3;
-
-    public Transaction(Context context, int serviceId,
-            TransactionSettings settings) {
-        mContext = context;
-        mTransactionState = new TransactionState();
-        mServiceId = serviceId;
-        mTransactionSettings = settings;
-    }
-
-    /**
-     * Returns the transaction state of this transaction.
-     *
-     * @return Current state of the Transaction.
-     */
-    @Override
-    public TransactionState getState() {
-        return mTransactionState;
-    }
-
-    /**
-     * An instance of Transaction encapsulates the actions required
-     * during a MMS Client transaction.
-     */
-    public abstract void process();
-
-    /**
-     * Used to determine whether a transaction is equivalent to this instance.
-     *
-     * @param transaction the transaction which is compared to this instance.
-     * @return true if transaction is equivalent to this instance, false otherwise.
-     */
-    public boolean isEquivalent(Transaction transaction) {
-        return getClass().equals(transaction.getClass())
-                && mId.equals(transaction.mId);
-    }
-
-    /**
-     * Get the service-id of this transaction which was assigned by the framework.
-     * @return the service-id of the transaction
-     */
-    public int getServiceId() {
-        return mServiceId;
-    }
-
-    public TransactionSettings getConnectionSettings() {
-        return mTransactionSettings;
-    }
-    public void setConnectionSettings(TransactionSettings settings) {
-        mTransactionSettings = settings;
-    }
-
-    /**
-     * A common method to send a PDU to MMSC.
-     *
-     * @param pdu A byte array which contains the data of the PDU.
-     * @return A byte array which contains the response data.
-     *         If an HTTP error code is returned, an IOException will be thrown.
-     * @throws IOException if any error occurred on network interface or
-     *         an HTTP error code(>=400) returned from the server.
-     */
-    protected byte[] sendPdu(byte[] pdu) throws IOException {
-        String mmscUrl = mTransactionSettings.getMmscUrl();
-        ensureRouteToHost(mmscUrl, mTransactionSettings);
-        return HttpUtils.httpConnection(
-                mContext, SendingProgressTokenManager.NO_TOKEN,
-                mmscUrl,
-                pdu, HttpUtils.HTTP_POST_METHOD,
-                mTransactionSettings.isProxySet(),
-                mTransactionSettings.getProxyAddress(),
-                mTransactionSettings.getProxyPort());
-    }
-
-    /**
-     * A common method to send a PDU to MMSC.
-     *
-     * @param token The token to identify the sending progress.
-     * @param pdu A byte array which contains the data of the PDU.
-     * @return A byte array which contains the response data.
-     *         If an HTTP error code is returned, an IOException will be thrown.
-     * @throws IOException if any error occurred on network interface or
-     *         an HTTP error code(>=400) returned from the server.
-     */
-    protected byte[] sendPdu(long token, byte[] pdu) throws IOException {
-        String mmscUrl = mTransactionSettings.getMmscUrl();
-        ensureRouteToHost(mmscUrl, mTransactionSettings);
-        return HttpUtils.httpConnection(
-                mContext, token,
-                mmscUrl,
-                pdu, HttpUtils.HTTP_POST_METHOD,
-                mTransactionSettings.isProxySet(),
-                mTransactionSettings.getProxyAddress(),
-                mTransactionSettings.getProxyPort());
-    }
-
-    /**
-     * A common method to retrieve a PDU from MMSC.
-     *
-     * @param url The URL of the message which we are going to retrieve.
-     * @return A byte array which contains the data of the PDU.
-     *         If the status code is not correct, an IOException will be thrown.
-     * @throws IOException if any error occurred on network interface or
-     *         an HTTP error code(>=400) returned from the server.
-     */
-    protected byte[] getPdu(String url) throws IOException {
-        ensureRouteToHost(url, mTransactionSettings);
-        return HttpUtils.httpConnection(
-                mContext, SendingProgressTokenManager.NO_TOKEN,
-                url, null, HttpUtils.HTTP_GET_METHOD,
-                mTransactionSettings.isProxySet(),
-                mTransactionSettings.getProxyAddress(),
-                mTransactionSettings.getProxyPort());
-    }
-
-    /**
-     * Make sure that a network route exists to allow us to reach the host in the
-     * supplied URL, and to the MMS proxy host as well, if a proxy is used.
-     * @param url The URL of the MMSC to which we need a route
-     * @param settings Specifies the address of the proxy host, if any
-     * @throws IOException if the host doesn't exist, or adding the route fails.
-     */
-    private void ensureRouteToHost(String url, TransactionSettings settings) throws IOException {
-        ConnectivityManager connMgr =
-                (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
-
-        int inetAddr;
-        if (settings.isProxySet()) {
-            String proxyAddr = settings.getProxyAddress();
-            inetAddr = NetworkUtils.lookupHost(proxyAddr);
-            if (inetAddr == -1) {
-                throw new IOException("Cannot establish route for " + url + ": Unknown host");
-            } else {
-                if (!connMgr.requestRouteToHost(ConnectivityManager.TYPE_MOBILE, inetAddr)) {
-                    throw new IOException("Cannot establish route to proxy " + inetAddr);
-                }
-            }
-        } else {
-            Uri uri = Uri.parse(url);
-            inetAddr = NetworkUtils.lookupHost(uri.getHost());
-            if (inetAddr == -1) {
-                throw new IOException("Cannot establish route for " + url + ": Unknown host");
-            } else {
-                if (!connMgr.requestRouteToHost(ConnectivityManager.TYPE_MOBILE, inetAddr)) {
-                    throw new IOException("Cannot establish route to " + inetAddr + " for " + url);
-                }
-            }
-        }
-    }
-
-    @Override
-    public String toString() {
-        return getClass().getName() + ": serviceId=" + mServiceId;
-    }
-
-    /**
-     * Get the type of the transaction.
-     *
-     * @return Transaction type in integer.
-     */
-    abstract public int getType();
-}
diff --git a/src/com/android/mms/transaction/TransactionBundle.java b/src/com/android/mms/transaction/TransactionBundle.java
deleted file mode 100644
index 848b7b0..0000000
--- a/src/com/android/mms/transaction/TransactionBundle.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import android.os.Bundle;
-
-/**
- * A wrapper around the Bundle instances used to start the TransactionService.
- * It provides high-level APIs to set the information required for the latter to
- * instantiate transactions.
- */
-public class TransactionBundle {
-    /**
-     * Key for the transaction-type.
-     * Allowed values for this key are: TYPE_PUSH_TRANSACTION, TYPE_RETRIEVE_TRANSACTION,
-     * TYPE_SEND_TRANSACTION, and TYPE_READREC_TRANSACTION.
-     */
-    public static final String TRANSACTION_TYPE = "type";
-
-    /**
-     * Key of the push-data.
-     * Used when TRANSACTION_TYPE is TYPE_PUSH_TRANSACTION.
-     */
-    private static final String PUSH_DATA = "mms-push-data";
-
-    /**
-     * Key of the MMSC server URL.
-     */
-    private static final String MMSC_URL = "mmsc-url";
-
-    /**
-     * Key of the HTTP Proxy address.
-     */
-    private static final String PROXY_ADDRESS = "proxy-address";
-
-    /**
-     * Key of the HTTP Proxy port.
-     */
-    private static final String PROXY_PORT = "proxy-port";
-
-    /**
-     * Key of the URI.
-     * Indicates the URL of the M-Retrieve.conf in TYPE_RETRIEVE_TRANSACTION, or the
-     * Uri of the M-Send.req/M-Read-Rec.ind in TYPE_SEND_TRANSACTION and
-     * TYPE_READREC_TRANSACTION, respectively.
-     */
-    public static final String URI = "uri";
-
-    /**
-     * This is the real Bundle to be sent to the TransactionService upon calling
-     * startService.
-     */
-    private final Bundle mBundle;
-
-    /**
-     * Private constructor.
-     *
-     * @param transactionType
-     */
-    private TransactionBundle(int transactionType) {
-        mBundle = new Bundle();
-        mBundle.putInt(TRANSACTION_TYPE, transactionType);
-    }
-
-    /**
-     * Constructor of a bundle used for TransactionBundle instances of type
-     * TYPE_RETRIEVE_TRANSACTION, TYPE_SEND_TRANSACTION, and TYPE_READREC_TRANSACTION.
-     *
-     * @param transactionType
-     * @param uri The relevant URI for this transaction. Indicates the URL of the
-     * M-Retrieve.conf in TYPE_RETRIEVE_TRANSACTION, or the Uri of the
-     * M-Send.req/M-Read-Rec.ind in TYPE_SEND_TRANSACTION and
-     * TYPE_READREC_TRANSACTION, respectively.
-     */
-    public TransactionBundle(int transactionType, String uri) {
-        this(transactionType);
-        mBundle.putString(URI, uri);
-    }
-
-    /**
-     * Constructor of a bundle used for TransactionBundle instances of type
-     * TYPE_PUSH_TRANSACTION.
-     *
-     * @param transactionType must be TYPE_PUSH_TRANSACTION
-     * @param pushData contains the body of the push-data
-     */
-    public TransactionBundle(int transactionType, byte[] pushData) {
-        this(transactionType);
-        mBundle.putByteArray(PUSH_DATA, pushData);
-    }
-
-    /**
-     * Constructor of a transaction bundle used for incoming bundle instances.
-     *
-     * @param bundle The incoming bundle
-     */
-    public TransactionBundle(Bundle bundle) {
-        mBundle = bundle;
-    }
-
-    public void setConnectionSettings(String mmscUrl,
-            String proxyAddress,
-            int proxyPort) {
-        mBundle.putString(MMSC_URL, mmscUrl);
-        mBundle.putString(PROXY_ADDRESS, proxyAddress);
-        mBundle.putInt(PROXY_PORT, proxyPort);
-    }
-
-    public void setConnectionSettings(TransactionSettings settings) {
-        setConnectionSettings(
-                settings.getMmscUrl(),
-                settings.getProxyAddress(),
-                settings.getProxyPort());
-    }
-
-    public Bundle getBundle() {
-        return mBundle;
-    }
-
-    public int getTransactionType() {
-        return mBundle.getInt(TRANSACTION_TYPE);
-    }
-
-    public String getUri() {
-        return mBundle.getString(URI);
-    }
-
-    public byte[] getPushData() {
-        return mBundle.getByteArray(PUSH_DATA);
-    }
-
-    public String getMmscUrl() {
-        return mBundle.getString(MMSC_URL);
-    }
-
-    public String getProxyAddress() {
-        return mBundle.getString(PROXY_ADDRESS);
-    }
-
-    public int getProxyPort() {
-        return mBundle.getInt(PROXY_PORT);
-    }
-}
diff --git a/src/com/android/mms/transaction/TransactionService.java b/src/com/android/mms/transaction/TransactionService.java
deleted file mode 100644
index cf867ca..0000000
--- a/src/com/android/mms/transaction/TransactionService.java
+++ /dev/null
@@ -1,741 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import com.android.internal.telephony.Phone;
-import com.android.mms.R;
-import com.android.mms.util.RateController;
-import com.google.android.mms.pdu.GenericPdu;
-import com.google.android.mms.pdu.NotificationInd;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduParser;
-import com.google.android.mms.pdu.PduPersister;
-
-import android.app.Service;
-import android.content.ContentUris;
-import android.content.Context;
-import android.content.Intent;
-import android.database.Cursor;
-import android.net.ConnectivityManager;
-import android.net.NetworkConnectivityListener;
-import android.net.NetworkInfo;
-import android.net.Uri;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.IBinder;
-import android.os.Looper;
-import android.os.Message;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.MmsSms;
-import android.provider.Telephony.MmsSms.PendingMessages;
-import android.text.TextUtils;
-import android.util.Config;
-import android.util.Log;
-import android.widget.Toast;
-
-import java.io.IOException;
-import java.util.ArrayList;
-
-/**
- * The TransactionService of the MMS Client is responsible for handling requests
- * to initiate client-transactions sent from:
- * <ul>
- * <li>The Proxy-Relay (Through Push messages)</li>
- * <li>The composer/viewer activities of the MMS Client (Through intents)</li>
- * </ul>
- * The TransactionService runs locally in the same process as the application.
- * It contains a HandlerThread to which messages are posted from the
- * intent-receivers of this application.
- * <p/>
- * <b>IMPORTANT</b>: This is currently the only instance in the system in
- * which simultaneous connectivity to both the mobile data network and
- * a Wi-Fi network is allowed. This makes the code for handling network
- * connectivity somewhat different than it is in other applications. In
- * particular, we want to be able to send or receive MMS messages when
- * a Wi-Fi connection is active (which implies that there is no connection
- * to the mobile data network). This has two main consequences:
- * <ul>
- * <li>Testing for current network connectivity ({@link android.net.NetworkInfo#isConnected()} is
- * not sufficient. Instead, the correct test is for network availability
- * ({@link android.net.NetworkInfo#isAvailable()}).</li>
- * <li>If the mobile data network is not in the connected state, but it is available,
- * we must initiate setup of the mobile data connection, and defer handling
- * the MMS transaction until the connection is established.</li>
- * </ul>
- */
-public class TransactionService extends Service implements Observer {
-    private static final String TAG = "TransactionService";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    /**
-     * Used to identify notification intents broadcasted by the
-     * TransactionService when a Transaction is completed.
-     */
-    public static final String TRANSACTION_COMPLETED_ACTION =
-            "android.intent.action.TRANSACTION_COMPLETED_ACTION";
-
-    /**
-     * Action for the Intent which is sent by Alarm service to launch
-     * TransactionService.
-     */
-    public static final String ACTION_ONALARM = "android.intent.action.ACTION_ONALARM";
-
-    /**
-     * Used as extra key in notification intents broadcasted by the TransactionService
-     * when a Transaction is completed (TRANSACTION_COMPLETED_ACTION intents).
-     * Allowed values for this key are: TransactionState.INITIALIZED,
-     * TransactionState.SUCCESS, TransactionState.FAILED.
-     */
-    public static final String STATE = "state";
-
-    /**
-     * Used as extra key in notification intents broadcasted by the TransactionService
-     * when a Transaction is completed (TRANSACTION_COMPLETED_ACTION intents).
-     * Allowed values for this key are any valid content uri.
-     */
-    public static final String STATE_URI = "uri";
-
-    /**
-     * Used as extra key in notification intents broadcasted by the TransactionService
-     * when a Transaction is completed (TRANSACTION_COMPLETED_ACTION intents).
-     * Allowed values for this key  are the Uri's of stored messages relevant
-     * for the completed  Transaction,
-     * i.e.: Uri of DeliveryInd for DeliveryTransaction,
-     * NotificationInd for NotificationTransaction,
-     * ReadOrigInd for  ReadOrigTransaction,
-     * null for ReadRecTransaction,
-     * RetrieveConf for  RetrieveTransaction,
-     * SendReq for SendTransaction.
-     */
-    public static final String CONTENT_URI = "content_uri";
-
-    private static final int EVENT_TRANSACTION_REQUEST = 1;
-    private static final int EVENT_DATA_STATE_CHANGED = 2;
-    private static final int EVENT_CONTINUE_MMS_CONNECTIVITY = 3;
-    private static final int EVENT_HANDLE_NEXT_PENDING_TRANSACTION = 4;
-    private static final int EVENT_QUIT = 100;
-    
-    private static final int TOAST_MSG_QUEUED = 1;
-    private static final int TOAST_DOWNLOAD_LATER = 2;
-    private static final int TOAST_NONE = -1;
-
-    // How often to extend the use of the MMS APN while a transaction
-    // is still being processed.
-    private static final int APN_EXTENSION_WAIT = 30 * 1000;
-
-    private ServiceHandler mServiceHandler;
-    private Looper mServiceLooper;
-    private final ArrayList<Transaction> mProcessing  = new ArrayList<Transaction>();
-    private final ArrayList<Transaction> mPending  = new ArrayList<Transaction>();
-    private ConnectivityManager mConnMgr;
-    private NetworkConnectivityListener mConnectivityListener;
-
-    public Handler mToastHandler = new Handler() {
-        @Override
-        public void handleMessage(Message msg) {
-            String str = null;
-
-            if (msg.what == TOAST_MSG_QUEUED) {
-                str = getString(R.string.message_queued);
-            } else if (msg.what == TOAST_DOWNLOAD_LATER) {
-                str = getString(R.string.download_later);
-            }
-
-            if (str != null) {
-            Toast.makeText(TransactionService.this, str,
-                        Toast.LENGTH_LONG).show();
-            }
-        }
-    };
-
-    @Override
-    public void onCreate() {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Creating TransactionService");
-        }
-
-        // Start up the thread running the service.  Note that we create a
-        // separate thread because the service normally runs in the process's
-        // main thread, which we don't want to block.
-        HandlerThread thread = new HandlerThread("TransactionService");
-        thread.start();
-
-        mServiceLooper = thread.getLooper();
-        mServiceHandler = new ServiceHandler(mServiceLooper);
-
-        mConnectivityListener = new NetworkConnectivityListener();
-        mConnectivityListener.registerHandler(mServiceHandler, EVENT_DATA_STATE_CHANGED);
-        mConnectivityListener.startListening(this);
-    }
-
-    @Override
-    public void onStart(Intent intent, int startId) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Starting #" + startId + ": " + intent.getExtras());
-        }
-
-        mConnMgr = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
-        boolean noNetwork = !isNetworkAvailable();
-
-        if (ACTION_ONALARM.equals(intent.getAction()) || (intent.getExtras() == null)) {
-            // Scan database to find all pending operations.
-            Cursor cursor = PduPersister.getPduPersister(this).getPendingMessages(
-                    System.currentTimeMillis());
-            if (cursor != null) {
-                try {
-                    if (cursor.getCount() == 0) {
-                        if (LOCAL_LOGV) {
-                            Log.v(TAG, "No pending messages. Stopping service.");
-                        }
-                        RetryScheduler.setRetryAlarm(this);
-                        stopSelfIfIdle(startId);
-                        return;
-                    }
-
-                    int columnIndexOfMsgId = cursor.getColumnIndexOrThrow(
-                            PendingMessages.MSG_ID);
-                    int columnIndexOfMsgType = cursor.getColumnIndexOrThrow(
-                            PendingMessages.MSG_TYPE);
-                    
-                    while (cursor.moveToNext()) {
-                        int msgType = cursor.getInt(columnIndexOfMsgType);
-                        int transactionType = getTransactionType(msgType);
-                        if (noNetwork) {
-                            onNetworkUnavailable(startId, transactionType);
-                            return;
-                        }
-                        switch (transactionType) {
-                            case -1:
-                                break;
-                            case Transaction.RETRIEVE_TRANSACTION:
-                                // If it's a transiently failed transaction,
-                                // we should retry it in spite of current
-                                // downloading mode.
-                                int failureType = cursor.getInt(
-                                        cursor.getColumnIndexOrThrow(
-                                                PendingMessages.ERROR_TYPE));
-                                if (!isTransientFailure(failureType)) {
-                                    break;
-                                }
-                                // fall-through
-                            default:
-                                Uri uri = ContentUris.withAppendedId(
-                                        Mms.CONTENT_URI,
-                                        cursor.getLong(columnIndexOfMsgId));
-                                TransactionBundle args = new TransactionBundle(
-                                        transactionType, uri.toString());
-                                // FIXME: We use the same startId for all MMs.
-                                launchTransaction(startId, args, false);
-                                break;
-                        }
-                    }
-                } finally {
-                    cursor.close();
-                }
-            } else {
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "No pending messages. Stopping service.");
-                }
-                RetryScheduler.setRetryAlarm(this);
-                stopSelfIfIdle(startId);
-            }
-        } else {
-            // For launching NotificationTransaction and test purpose.
-            TransactionBundle args = new TransactionBundle(intent.getExtras());
-            launchTransaction(startId, args, noNetwork);
-        }
-    }
-
-    private void stopSelfIfIdle(int startId) {
-        synchronized (mProcessing) {
-            if (mProcessing.isEmpty() && mPending.isEmpty()) {
-                stopSelf(startId);
-            }
-        }
-    }
-
-    private static boolean isTransientFailure(int type) {
-        return (type < MmsSms.ERR_TYPE_GENERIC_PERMANENT) && (type > MmsSms.NO_ERROR);
-    }
-
-    private boolean isNetworkAvailable() {
-        NetworkInfo networkInfo = mConnMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
-        return networkInfo.isAvailable();
-    }
-    
-    private int getTransactionType(int msgType) {
-        switch (msgType) {
-            case PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND:
-                return Transaction.RETRIEVE_TRANSACTION;
-            case PduHeaders.MESSAGE_TYPE_READ_REC_IND:
-                return Transaction.READREC_TRANSACTION;
-            case PduHeaders.MESSAGE_TYPE_SEND_REQ:
-                return Transaction.SEND_TRANSACTION;
-            default:
-                Log.w(TAG, "Unrecognized MESSAGE_TYPE: " + msgType);
-                return -1;
-        }
-    }
-
-    private void launchTransaction(int serviceId, TransactionBundle txnBundle, boolean noNetwork) {
-        if (noNetwork) {
-            onNetworkUnavailable(serviceId, txnBundle.getTransactionType());
-            return;
-        }
-        Message msg = mServiceHandler.obtainMessage(EVENT_TRANSACTION_REQUEST);
-        msg.arg1 = serviceId;
-        msg.obj = txnBundle;
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Sending: " + msg);
-        }
-        mServiceHandler.sendMessage(msg);
-    }
-
-    private void onNetworkUnavailable(int serviceId, int transactionType) {
-        int toastType = TOAST_NONE;
-        if (transactionType == Transaction.RETRIEVE_TRANSACTION) {
-            toastType = TOAST_DOWNLOAD_LATER;
-        } else if (transactionType == Transaction.SEND_TRANSACTION) {
-            toastType = TOAST_MSG_QUEUED;
-        }
-        if (toastType != TOAST_NONE) {
-            mToastHandler.sendEmptyMessage(toastType);
-        }
-        stopSelf(serviceId);
-    }
-
-    @Override
-    public void onDestroy() {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Destroying TransactionService");
-        }
-        if (!mPending.isEmpty()) {
-            Log.i(TAG, "TransactionService exiting with transaction still pending");
-        }
-
-        mConnectivityListener.unregisterHandler(mServiceHandler);
-        mConnectivityListener.stopListening();
-        mConnectivityListener = null;
-
-        mServiceHandler.sendEmptyMessage(EVENT_QUIT);
-    }
-
-    @Override
-    public IBinder onBind(Intent intent) {
-        return null;
-    }
-
-    /**
-     * Handle status change of Transaction (The Observable).
-     */
-    public void update(Observable observable) {
-        Transaction transaction = (Transaction) observable;
-        int serviceId = transaction.getServiceId();
-        try {
-            synchronized (mProcessing) {
-                mProcessing.remove(transaction);
-                if (mPending.size() > 0) {
-                    Message msg = mServiceHandler.obtainMessage(
-                            EVENT_HANDLE_NEXT_PENDING_TRANSACTION,
-                            transaction.getConnectionSettings());
-                    mServiceHandler.sendMessage(msg);
-                }
-                else {
-                    endMmsConnectivity();
-                }
-            }
-
-            Intent intent = new Intent(TRANSACTION_COMPLETED_ACTION);
-            TransactionState state = transaction.getState();
-            int result = state.getState();
-            intent.putExtra(STATE, result);
-
-            switch (result) {
-                case TransactionState.SUCCESS:
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, "Transaction complete: " + serviceId);
-                    }
-
-                    intent.putExtra(STATE_URI, state.getContentUri());
-
-                    // Notify user in the system-wide notification area.
-                    switch (transaction.getType()) {
-                        case Transaction.NOTIFICATION_TRANSACTION:
-                        case Transaction.RETRIEVE_TRANSACTION:
-                            MessagingNotification.updateNewMessageIndicator(this, true);
-                            MessagingNotification.updateDownloadFailedNotification(this);
-                            break;
-                        case Transaction.SEND_TRANSACTION:
-                            RateController.getInstance().update();
-                            break;
-                    }
-                    break;
-                case TransactionState.FAILED:
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, "Transaction failed: " + serviceId);
-                    }
-                    break;
-                default:
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, "Transaction state unknown: " +
-                                serviceId + " " + result);
-                    }
-                    break;
-            }
-
-            // Broadcast the result of the transaction.
-            sendBroadcast(intent);
-        } finally {
-            transaction.detach(this);
-            stopSelf(serviceId);
-        }
-    }
-
-    protected int beginMmsConnectivity() throws IOException {
-        int result = mConnMgr.startUsingNetworkFeature(
-                ConnectivityManager.TYPE_MOBILE, Phone.FEATURE_ENABLE_MMS);
-
-        switch (result) {
-            case Phone.APN_ALREADY_ACTIVE:
-            case Phone.APN_REQUEST_STARTED:
-                return result;
-        }
-
-        throw new IOException("Cannot establish MMS connectivity");
-    }
-
-    protected void endMmsConnectivity() {
-        // cancel timer for renewal of lease
-        mServiceHandler.removeMessages(EVENT_CONTINUE_MMS_CONNECTIVITY);
-        if (mConnMgr != null) {
-            mConnMgr.stopUsingNetworkFeature(
-                    ConnectivityManager.TYPE_MOBILE, Phone.FEATURE_ENABLE_MMS);
-        }
-    }
-
-    private final class ServiceHandler extends Handler {
-        public ServiceHandler(Looper looper) {
-            super(looper);
-        }
-
-        /**
-         * Handle incoming transaction requests.
-         * The incoming requests are initiated by the MMSC Server or by the
-         * MMS Client itself.
-         */
-        @Override
-        public void handleMessage(Message msg) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Handling incoming message: " + msg);
-            }
-
-            Transaction transaction = null;
-            switch (msg.what) {
-                case EVENT_QUIT:
-                    getLooper().quit();
-                    return;
-                    
-                case EVENT_CONTINUE_MMS_CONNECTIVITY:
-                    synchronized (mProcessing) {
-                        if (mProcessing.isEmpty()) {
-                            return;
-                        }
-                    }
-
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, "Extending MMS connectivity - still processing txn");
-                    }
-
-                    try {
-                        int result = beginMmsConnectivity();
-                        if (result != Phone.APN_ALREADY_ACTIVE) {
-                            Log.i(TAG, "Extending MMS connectivity returned " + result +
-                                    " instead of APN_ALREADY_ACTIVE");
-                            // Just wait for connectivity startup without
-                            // any new request of APN switch.
-                            return;
-                        }
-                    } catch (IOException e) {
-                        Log.w(TAG, "Attempt to extend use of MMS connectivity failed");
-                        return;
-                    }
-
-                    // Restart timer
-                    sendMessageDelayed(obtainMessage(EVENT_CONTINUE_MMS_CONNECTIVITY),
-                                       APN_EXTENSION_WAIT);
-                    return;
-
-                case EVENT_DATA_STATE_CHANGED:
-                    /*
-                     * If we are being informed that connectivity has been established
-                     * to allow MMS traffic, then proceed with processing the pending
-                     * transaction, if any.
-                     */
-                    if (mConnectivityListener == null) {
-                        return;
-                    }
-
-                    NetworkInfo info = mConnectivityListener.getNetworkInfo();
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, "Got DATA_STATE_CHANGED event: " + info);
-                    }
-
-                    // Check availability of the mobile network.
-                    if ((info == null) || (info.getType() != ConnectivityManager.TYPE_MOBILE)) {
-                        return;
-                    }
-
-                    if (!info.isConnected()) {
-                        return;
-                    }
-
-                    TransactionSettings settings = new TransactionSettings(
-                            TransactionService.this, info.getExtraInfo());
-
-                    if (TextUtils.isEmpty(settings.getMmscUrl())) {
-                        Log.e(TAG, "Invalid APN settings");
-                        return;
-                    }
-
-                    // Set a timer to keep renewing our "lease" on the MMS connection
-                    sendMessageDelayed(obtainMessage(EVENT_CONTINUE_MMS_CONNECTIVITY),
-                                       APN_EXTENSION_WAIT);
-
-                    processPendingTransaction(transaction, settings);
-                    return;
-                
-                case EVENT_TRANSACTION_REQUEST:
-                    int serviceId = msg.arg1;
-                    try {
-                        TransactionBundle args = (TransactionBundle) msg.obj;
-                        TransactionSettings transactionSettings;
-
-                        // Set the connection settings for this transaction.
-                        // If these have not been set in args, load the default settings.
-                        String mmsc = args.getMmscUrl();
-                        if (mmsc != null) {
-                            transactionSettings = new TransactionSettings(
-                                    mmsc, args.getProxyAddress(), args.getProxyPort());
-                        } else {
-                            transactionSettings = new TransactionSettings(
-                                                    TransactionService.this, null);
-                        }
-
-                        // Create appropriate transaction
-                        switch (args.getTransactionType()) {
-                            case Transaction.NOTIFICATION_TRANSACTION:
-                                String uri = args.getUri();
-                                if (uri != null) {
-                                    transaction = new NotificationTransaction(
-                                            TransactionService.this, serviceId,
-                                            transactionSettings, uri);
-                                } else {
-                                    // Now it's only used for test purpose.
-                                    byte[] pushData = args.getPushData();
-                                    PduParser parser = new PduParser(pushData);
-                                    GenericPdu ind = parser.parse();
-
-                                    int type = PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND;
-                                    if ((ind != null) && (ind.getMessageType() == type)) {
-                                        transaction = new NotificationTransaction(
-                                                TransactionService.this, serviceId,
-                                                transactionSettings, (NotificationInd) ind);
-                                    } else {
-                                        Log.e(TAG, "Invalid PUSH data.");
-                                        transaction = null;
-                                        return;
-                                    }
-                                }
-                                break;
-                            case Transaction.RETRIEVE_TRANSACTION:
-                                transaction = new RetrieveTransaction(
-                                        TransactionService.this, serviceId,
-                                        transactionSettings, args.getUri());
-                                break;
-                            case Transaction.SEND_TRANSACTION:
-                                transaction = new SendTransaction(
-                                        TransactionService.this, serviceId,
-                                        transactionSettings, args.getUri());
-                                break;
-                            case Transaction.READREC_TRANSACTION:
-                                transaction = new ReadRecTransaction(
-                                        TransactionService.this, serviceId,
-                                        transactionSettings, args.getUri());
-                                break;
-                            default:
-                                Log.w(TAG, "Invalid transaction type: " + serviceId);
-                                transaction = null;
-                                return;
-                        }
-
-                        if (!processTransaction(transaction)) {
-                            transaction = null;
-                            return;
-                        }
-
-                        if (LOCAL_LOGV) {
-                            Log.v(TAG, "Started processing of incoming message: " + msg);
-                        }
-                    } catch (Exception ex) {
-                        if (LOCAL_LOGV) {
-                            Log.v(TAG, "Exception occurred while handling message: " + msg, ex);
-                        }
-
-                        if (transaction != null) {
-                            try {
-                                transaction.detach(TransactionService.this);
-                                if (mProcessing.contains(transaction)) {
-                                    synchronized (mProcessing) {
-                                        mProcessing.remove(transaction);
-                                    }
-                                }
-                            } catch (Throwable t) {
-                                Log.e(TAG, "Unexpected Throwable.", t);
-                            } finally {
-                                // Set transaction to null to allow stopping the
-                                // transaction service.
-                                transaction = null;
-                            }
-                        }
-                    } finally {
-                        if (transaction == null) {
-                            if (LOCAL_LOGV) {
-                                Log.v(TAG, "Transaction was null. Stopping self: " + serviceId);
-                            }
-                            endMmsConnectivity();
-                            stopSelf(serviceId);
-                        }
-                    }
-                    return;
-                case EVENT_HANDLE_NEXT_PENDING_TRANSACTION:
-                    processPendingTransaction(transaction, (TransactionSettings) msg.obj);
-                    return;
-                default:
-                    Log.w(TAG, "what=" + msg.what);
-                    return;
-            }
-        }
-
-        private void processPendingTransaction(Transaction transaction, TransactionSettings settings) {
-            int numProcessTransaction = 0;
-            synchronized (mProcessing) {
-                if (mPending.size() != 0) {
-                    transaction = mPending.remove(0);
-                }
-                numProcessTransaction = mProcessing.size();
-            }
-
-            if (transaction != null) {
-                if (settings != null) {
-                    transaction.setConnectionSettings(settings);
-                }
-   
-                /*
-                 * Process deferred transaction
-                 */
-                try {
-                    int serviceId = transaction.getServiceId();
-                    if (processTransaction(transaction)) {
-                        if (LOCAL_LOGV) {
-                            Log.v(TAG, "Started deferred processing of transaction: "
-                                    + transaction);
-                        }
-                    } else {
-                        transaction = null;
-                        stopSelf(serviceId);
-                    }
-                } catch (IOException e) {
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, e.getMessage(), e);
-                    }
-                }
-            }
-            else {
-                if (numProcessTransaction == 0) {
-                    endMmsConnectivity();
-                }
-            }
-        }
-
-        /**
-         * Internal method to begin processing a transaction.
-         * @param transaction the transaction. Must not be {@code null}.
-         * @return {@code true} if process has begun or will begin. {@code false}
-         * if the transaction should be discarded.
-         * @throws IOException if connectivity for MMS traffic could not be
-         * established.
-         */
-        private boolean processTransaction(Transaction transaction) throws IOException {
-            // Check if transaction already processing
-            synchronized (mProcessing) {
-                for (Transaction t : mPending) {
-                    if (t.isEquivalent(transaction)) {
-                        if (LOCAL_LOGV) {
-                            Log.v(TAG, "Transaction already pending: " +
-                                    transaction.getServiceId());
-                        }
-                        return true;
-                    }
-                }
-                for (Transaction t : mProcessing) {
-                    if (t.isEquivalent(transaction)) {
-                        if (LOCAL_LOGV) {
-                            Log.v(TAG, "Duplicated transaction: " + transaction.getServiceId());
-                        }
-                        return true;
-                    }
-                }
-
-                /*
-                * Make sure that the network connectivity necessary
-                * for MMS traffic is enabled. If it is not, we need
-                * to defer processing the transaction until
-                * connectivity is established.
-                */
-                int connectivityResult = beginMmsConnectivity();
-                if (connectivityResult == Phone.APN_REQUEST_STARTED) {
-                    mPending.add(transaction);
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, "Defer txn processing pending MMS connectivity");
-                    }
-                    return true;
-                }
-
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "Adding transaction to list: " + transaction);
-                }
-                mProcessing.add(transaction);
-            }
-
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Starting transaction: " + transaction);
-            }
-
-            // Set a timer to keep renewing our "lease" on the MMS connection
-            sendMessageDelayed(obtainMessage(EVENT_CONTINUE_MMS_CONNECTIVITY),
-                               APN_EXTENSION_WAIT);
-
-            // Attach to transaction and process it
-            transaction.attach(TransactionService.this);
-            transaction.process();
-            return true;
-        }
-    }
-}
diff --git a/src/com/android/mms/transaction/TransactionSettings.java b/src/com/android/mms/transaction/TransactionSettings.java
deleted file mode 100644
index a6d7f4e..0000000
--- a/src/com/android/mms/transaction/TransactionSettings.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.transaction;
-
-import com.android.internal.telephony.Phone;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.Context;
-import android.database.Cursor;
-import android.net.Uri;
-import android.provider.Telephony;
-import android.text.TextUtils;
-import android.util.Config;
-import android.util.Log;
-
-
-/**
- * Container of transaction settings. Instances of this class are contained
- * within Transaction instances to allow overriding of the default APN
- * settings or of the MMS Client.
- */
-public class TransactionSettings {
-    private static final String TAG = "TransactionSettings";
-    private static final boolean DEBUG = true;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private String mServiceCenter;
-    private String mProxyAddress;
-    private int mProxyPort = -1;
-
-    /**
-     * Constructor that uses the default settings of the MMS Client.
-     *
-     * @param context The context of the MMS Client
-     */
-    public TransactionSettings(Context context, String apnName) {
-        String selection = (apnName != null)?
-                Telephony.Carriers.APN + "='"+apnName+"'": null;
-        
-        Cursor cursor = SqliteWrapper.query(context, context.getContentResolver(),
-                            Uri.withAppendedPath(Telephony.Carriers.CONTENT_URI, "current"),
-                            null, selection, null, null);
-
-        if (cursor == null) {
-            Log.e(TAG, "Apn is not found in Database!");
-            return;
-        }
-
-        try {
-            while (cursor.moveToNext() && TextUtils.isEmpty(mServiceCenter)) {
-                // Read values from APN settings
-                if (isValidApnType(cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.TYPE)), Phone.APN_TYPE_MMS)) {
-                    mServiceCenter = cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSC));
-                    mProxyAddress = cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSPROXY));
-                    if (isProxySet()) {
-                        String portString = cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSPORT));
-                        try {
-                            mProxyPort = Integer.parseInt(portString);
-                        } catch (NumberFormatException e) {
-                            Log.e(TAG, "Bad port number format: " + portString, e);
-                        }
-                    }
-                }
-            }
-        } finally {
-            cursor.close();
-        }
-    }
-
-    /**
-     * Constructor that overrides the default settings of the MMS Client.
-     *
-     * @param mmscUrl The MMSC URL
-     * @param proxyAddr The proxy address
-     * @param proxyPort The port used by the proxy address
-     * immediately start a SendTransaction upon completion of a NotificationTransaction,
-     * false otherwise.
-     */
-    public TransactionSettings(String mmscUrl, String proxyAddr, int proxyPort) {
-        mServiceCenter = mmscUrl;
-        mProxyAddress = proxyAddr;
-        mProxyPort = proxyPort;
-    }
-
-    public String getMmscUrl() {
-        return mServiceCenter;
-    }
-
-    public String getProxyAddress() {
-        return mProxyAddress;
-    }
-
-    public int getProxyPort() {
-        return mProxyPort;
-    }
-
-    public boolean isProxySet() {
-        return (mProxyAddress != null) && (mProxyAddress.trim().length() != 0);
-    }
-
-    static private boolean isValidApnType(String types, String requestType) {
-        String[] typeList;
-        // If unset, set to DEFAULT.
-        if (types == null || types.equals("")) {
-            typeList = new String[1];
-            typeList[0] = Phone.APN_TYPE_ALL;
-        } else {
-            typeList = types.split(",");
-        }
-        
-        for (String t : typeList) {
-            if (t.equals(requestType) || t.equals(Phone.APN_TYPE_ALL)) {
-                return true;
-            }
-        }
-        return false;
-    }
-}
diff --git a/src/com/android/mms/transaction/TransactionState.java b/src/com/android/mms/transaction/TransactionState.java
deleted file mode 100644
index ff42d1d..0000000
--- a/src/com/android/mms/transaction/TransactionState.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2007 Esmertec AG.
- * Copyright (C) 2007 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.
- */
-
-package com.android.mms.transaction;
-
-import android.net.Uri;
-
-/**
- * TransactionState intends to encapsulate all the informations which would
- * be known by the observers of transactions. To encapsulate Transaction-
- * State into an intent, it should implement Parcelable interface.
- */
-public class TransactionState {
-    /**
-     * Result code indicates the Transaction has not started.
-     */
-    public static final int INITIALIZED = 0;
-    /**
-     * Result code indicates the Transaction successfully complete.
-     */
-    public static final int SUCCESS = 1;
-    /**
-     * Result code indicates the Transaction failed.
-     */
-    public static final int FAILED  = 2;
-
-    private Uri mContentUri;
-    private int mState;
-
-    public TransactionState() {
-        mState = INITIALIZED;
-        mContentUri = null;
-    }
-
-    /**
-     * To represent the current state(or the result of processing) to the
-     * ones who wants to know the state.
-     *
-     * @return Current state of the Transaction.
-     */
-    public synchronized int getState() {
-        return mState;
-    }
-
-    /**
-     * To set the state of transaction. This method is only invoked by
-     * the transactions.
-     *
-     * @param state The current state of transaction.
-     */
-    synchronized void setState(int state) {
-        if ((state < INITIALIZED) && (state > FAILED)) {
-            throw new IllegalArgumentException("Bad state: " + state);
-        }
-        mState = state;
-    }
-
-    /**
-     * To represent the result uri of transaction such as uri of MM.
-     *
-     * @return Result uri.
-     */
-    public synchronized Uri getContentUri() {
-        return mContentUri;
-    }
-
-    /**
-     * To set the result uri. This method is only invoked by the transactions.
-     *
-     * @param uri The result uri.
-     */
-    synchronized void setContentUri(Uri uri) {
-        mContentUri = uri;
-    }
-}
diff --git a/src/com/android/mms/ui/AdaptableSlideViewInterface.java b/src/com/android/mms/ui/AdaptableSlideViewInterface.java
deleted file mode 100644
index 55dac66..0000000
--- a/src/com/android/mms/ui/AdaptableSlideViewInterface.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-/**
- * The view interface of a slide which elements can be resize.
- */
-public interface AdaptableSlideViewInterface extends SlideViewInterface {
-    /**
-     * Set the display region of the text view.
-     */
-    void setTextRegion(int left, int top, int width, int height);
-    /**
-     * Set the display region of the image view.
-     */
-    void setImageRegion(int left, int top, int width, int height);
-    /**
-     * Set the display region of the video view.
-     */
-    void setVideoRegion(int left, int top, int width, int height);
-    /**
-     * Set the listener which will be triggered when the size of
-     * the view is changed.
-     */
-    void setOnSizeChangedListener(OnSizeChangedListener l);
-
-    public interface OnSizeChangedListener {
-        void onSizeChanged(int width, int height);
-    }
-}
diff --git a/src/com/android/mms/ui/AttachmentEditor.java b/src/com/android/mms/ui/AttachmentEditor.java
deleted file mode 100644
index 7b8748f..0000000
--- a/src/com/android/mms/ui/AttachmentEditor.java
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.android.mms.model.AudioModel;
-import com.android.mms.model.ImageModel;
-import com.android.mms.model.SlideModel;
-import com.android.mms.model.SlideshowModel;
-import com.android.mms.model.VideoModel;
-import com.google.android.mms.MmsException;
-
-import android.content.Context;
-import android.net.Uri;
-import android.os.Handler;
-import android.os.Message;
-import android.view.View;
-import android.view.ViewStub;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.ImageButton;
-import android.widget.LinearLayout;
-
-/**
- * This is an embedded editor/view to add photos and sound/video clips
- * into a multimedia message.
- */
-public class AttachmentEditor {
-    private static final String TAG = "AttachmentEditor";
-
-    public static final int EMPTY                     = -1;
-    public static final int TEXT_ONLY                 = 0;
-    public static final int IMAGE_ATTACHMENT          = 1;
-    public static final int VIDEO_ATTACHMENT          = 2;
-    public static final int AUDIO_ATTACHMENT          = 3;
-    public static final int SLIDESHOW_ATTACHMENT      = 4;
-    public static final int CAPTURED_IMAGE_ATTACHMENT = 5;
-    public static final int CAPTURED_VIDEO_ATTACHMENT = 6;
-    public static final int CAPTURED_AUDIO_ATTACHMENT = 7;
-
-    static final int MSG_EDIT_SLIDESHOW   = 1;
-    static final int MSG_SEND_SLIDESHOW   = 2;
-    static final int MSG_PLAY_SLIDESHOW   = 3;
-    static final int MSG_REPLACE_IMAGE    = 4;
-    static final int MSG_REPLACE_VIDEO    = 5;
-    static final int MSG_REPLACE_AUDIO    = 6;
-    static final int MSG_PLAY_VIDEO       = 7;
-    static final int MSG_PLAY_AUDIO       = 8;
-    static final int MSG_VIEW_IMAGE       = 9;
-
-    private final Context mContext;
-    private final Handler mHandler;
-    private final View mRoot;
-
-    private SlideViewInterface mView;
-    private SlideshowModel mSlideshow;
-    private Presenter mPresenter;
-    private int mAttachmentType;
-    private OnAttachmentChangedListener mAttachmentChangedListener;
-    private boolean mCanSend;
-    private Button mSendButton;
-
-    public AttachmentEditor(Context context, Handler handler, View vRoot) {
-        mContext = context;
-        mHandler = handler;
-        mRoot = vRoot;
-    }
-
-    public void setCanSend(boolean enable) {
-        if (mCanSend != enable) {
-            mCanSend = enable;
-            updateSendButton();
-        }
-    }
-
-    private void updateSendButton() {
-        if (null != mSendButton) {
-            mSendButton.setEnabled(mCanSend);
-            mSendButton.setFocusable(mCanSend);
-        }
-    }
-
-    public int getAttachmentType() {
-        return mAttachmentType;
-    }
-
-    public void setAttachment(SlideshowModel slideshow, int attachmentType) {
-        if (attachmentType == EMPTY) {
-            throw new IllegalArgumentException(
-                    "Type of the attachment may not be EMPTY.");
-        }
-
-        mSlideshow = slideshow;
-
-        int oldAttachmentType = mAttachmentType;
-        mAttachmentType = attachmentType;
-
-        if (mView != null) {
-            ((View) mView).setVisibility(View.GONE);
-            mView = null;
-        }
-
-        if (attachmentType != TEXT_ONLY) {
-            mView = createView();
-
-            if ((mPresenter == null) || !mSlideshow.equals(mPresenter.getModel())) {
-                mPresenter = PresenterFactory.getPresenter(
-                        "MmsThumbnailPresenter", mContext, mView, mSlideshow);
-            } else {
-                mPresenter.setView(mView);
-            }
-
-            mPresenter.present();
-        }
-
-        if ((mAttachmentChangedListener != null) && (mAttachmentType != oldAttachmentType)) {
-            mAttachmentChangedListener.onAttachmentChanged(mAttachmentType, oldAttachmentType);
-        }
-    }
-
-    public void removeAttachment() {
-        SlideModel slide = mSlideshow.get(0);
-        slide.removeImage();
-        slide.removeVideo();
-        slide.removeAudio();
-    }
-    
-    public void hideView() {
-        if (mView != null) {
-            ((View)mView).setVisibility(View.GONE);
-        }
-    }
-
-    private View getStubView(int stubId, int viewId) {
-        View view = mRoot.findViewById(viewId);
-        if (view == null) {
-            ViewStub stub = (ViewStub) mRoot.findViewById(stubId);
-            view = stub.inflate();
-        }
-
-        return view;
-    }
-
-    private class MessageOnClick implements OnClickListener {
-        private int mWhat;
-        
-        public MessageOnClick(int what) {
-            mWhat = what;
-        }
-        
-        public void onClick(View v) {
-            Message msg = Message.obtain(mHandler, mWhat);
-            msg.sendToTarget();
-        }
-    }
-
-    private SlideViewInterface createView() {
-        switch(mAttachmentType) {
-        case IMAGE_ATTACHMENT:
-            return createMediaView(
-                    R.id.image_attachment_view_stub, R.id.image_attachment_view,
-                    R.id.view_image_button, R.id.replace_image_button, R.id.remove_image_button,
-                    MSG_VIEW_IMAGE, MSG_REPLACE_IMAGE);
-            
-        case VIDEO_ATTACHMENT:
-            return createMediaView(
-                    R.id.video_attachment_view_stub, R.id.video_attachment_view,
-                    R.id.view_video_button, R.id.replace_video_button, R.id.remove_video_button,
-                    MSG_PLAY_VIDEO, MSG_REPLACE_VIDEO);
-            
-        case AUDIO_ATTACHMENT:
-            return createMediaView(
-                    R.id.audio_attachment_view_stub, R.id.audio_attachment_view,
-                    R.id.play_audio_button, R.id.replace_audio_button, R.id.remove_audio_button,
-                    MSG_PLAY_AUDIO, MSG_REPLACE_AUDIO);
-            
-        case SLIDESHOW_ATTACHMENT:
-            return createSlideshowView();
-            
-        default:
-            throw new IllegalArgumentException();
-        }
-    }
-
-    private SlideViewInterface createMediaView(
-            int stub_view_id, int real_view_id,
-            int view_button_id, int replace_button_id, int remove_button_id,
-            int view_message, int replace_message) {
-        LinearLayout view = (LinearLayout)getStubView(stub_view_id, real_view_id);
-        view.setVisibility(View.VISIBLE);
-
-        Button viewButton = (Button) view.findViewById(view_button_id);
-        Button replaceButton = (Button) view.findViewById(replace_button_id);
-        Button removeButton = (Button) view.findViewById(remove_button_id);
-
-        viewButton.setOnClickListener(new MessageOnClick(view_message));
-        replaceButton.setOnClickListener(new MessageOnClick(replace_message));
-
-        removeButton.setOnClickListener(new OnClickListener() {
-            public void onClick(View v) {
-                removeAttachment();
-                ((View) mView).setVisibility(View.GONE);
-
-                int oldAttachmentType = mAttachmentType;
-                mAttachmentType = TEXT_ONLY;
-                if (mAttachmentChangedListener != null) {
-                    mAttachmentChangedListener.onAttachmentChanged(
-                            mAttachmentType, oldAttachmentType);
-                }
-            }
-        });
-
-        return (SlideViewInterface) view;
-    }
-    
-    private SlideViewInterface createSlideshowView() {
-        LinearLayout view =(LinearLayout) getStubView(
-                R.id.slideshow_attachment_view_stub, R.id.slideshow_attachment_view);
-        view.setVisibility(View.VISIBLE);
-
-        Button editBtn = (Button) view.findViewById(R.id.edit_slideshow_button);
-        mSendButton = (Button) view.findViewById(R.id.send_slideshow_button);
-        updateSendButton();
-        final ImageButton playBtn = (ImageButton) view.findViewById(
-                R.id.play_slideshow_button);
-
-        editBtn.setOnClickListener(new MessageOnClick(MSG_EDIT_SLIDESHOW));
-        mSendButton.setOnClickListener(new MessageOnClick(MSG_SEND_SLIDESHOW));
-        playBtn.setOnClickListener(new MessageOnClick(MSG_PLAY_SLIDESHOW));
-
-        return (SlideViewInterface) view;
-    }
-
-    public void changeImage(Uri uri) throws MmsException {
-        mSlideshow.get(0).add(new ImageModel(
-                mContext, uri, mSlideshow.getLayout().getImageRegion()));
-    }
-
-    public void changeVideo(Uri uri) throws MmsException {
-        VideoModel video = new VideoModel(mContext, uri,
-                mSlideshow.getLayout().getImageRegion());
-        SlideModel slide = mSlideshow.get(0);
-        slide.add(video);
-        slide.updateDuration(video.getDuration());
-    }
-
-    public void changeAudio(Uri uri) throws MmsException {
-        AudioModel audio = new AudioModel(mContext, uri);
-        SlideModel slide = mSlideshow.get(0);
-        slide.add(audio);
-        slide.updateDuration(audio.getDuration());
-    }
-
-    public void setOnAttachmentChangedListener(OnAttachmentChangedListener l) {
-        mAttachmentChangedListener = l;
-    }
-
-    public interface OnAttachmentChangedListener {
-        void onAttachmentChanged(int newType, int oldType);
-    }
-}
diff --git a/src/com/android/mms/ui/AttachmentTypeSelectorAdapter.java b/src/com/android/mms/ui/AttachmentTypeSelectorAdapter.java
deleted file mode 100644
index 7228c6f..0000000
--- a/src/com/android/mms/ui/AttachmentTypeSelectorAdapter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-
-import android.content.Context;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * An adapter to store icons and strings for attachment type list.
- */
-public class AttachmentTypeSelectorAdapter extends IconListAdapter {
-    public final static int MODE_WITH_SLIDESHOW    = 0;
-    public final static int MODE_WITHOUT_SLIDESHOW = 1;
-
-    public final static int ADD_IMAGE               = 0;
-    public final static int TAKE_PICTURE            = 1;
-    public final static int ADD_VIDEO               = 2;
-    public final static int RECORD_VIDEO            = 3;
-    public final static int ADD_SOUND               = 4;
-    public final static int RECORD_SOUND            = 5;
-    public final static int ADD_SLIDESHOW           = 6;
-
-    public AttachmentTypeSelectorAdapter(Context context, int mode) {
-        super(context, getData(mode, context));
-    }
-
-    protected static List<IconListItem> getData(int mode, Context context) {
-        List<IconListItem> data = new ArrayList<IconListItem>(7);
-        addItem(data, context.getString(R.string.attach_image),
-                R.drawable.ic_launcher_gallery);
-
-        addItem(data, context.getString(R.string.attach_take_photo),
-                R.drawable.ic_launcher_camera);
-
-        addItem(data, context.getString(R.string.attach_video),
-                R.drawable.ic_launcher_video_player);
-
-        addItem(data, context.getString(R.string.attach_record_video),
-                R.drawable.ic_launcher_camera_record);
-
-        addItem(data, context.getString(R.string.attach_sound),
-                R.drawable.ic_launcher_musicplayer_2);
-
-        addItem(data, context.getString(R.string.attach_record_sound),
-                R.drawable.ic_launcher_record_audio);
-
-        if (mode == MODE_WITH_SLIDESHOW) {
-            addItem(data, context.getString(R.string.attach_slideshow),
-                    R.drawable.ic_launcher_slideshow_add_sms);
-        }
-
-        return data;
-    }
-
-    protected static void addItem(List<IconListItem> data, String title, int resource) {
-        IconListItem temp = new IconListItem(title, resource);
-        data.add(temp);
-    }
-}
diff --git a/src/com/android/mms/ui/AudioAttachmentView.java b/src/com/android/mms/ui/AudioAttachmentView.java
deleted file mode 100644
index 48a6a51..0000000
--- a/src/com/android/mms/ui/AudioAttachmentView.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-
-import android.content.Context;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.media.AudioManager;
-import android.media.MediaPlayer;
-import android.media.MediaPlayer.OnCompletionListener;
-import android.media.MediaPlayer.OnErrorListener;
-import android.net.Uri;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import java.util.Map;
-
-/**
- * This class provides an embedded editor/viewer of audio attachment.
- */
-public class AudioAttachmentView extends LinearLayout implements
-        SlideViewInterface {
-    private static final String TAG = "AudioAttachmentView";
-
-    private final Resources mRes;
-    private TextView mNameView;
-    private TextView mAlbumView;
-    private TextView mArtistView;
-    private TextView mErrorMsgView;
-    private Uri mAudioUri;
-    private MediaPlayer mMediaPlayer;
-    private boolean mIsPlaying;
-
-    public AudioAttachmentView(Context context) {
-        super(context);
-        mRes = context.getResources();
-    }
-
-    public AudioAttachmentView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-        mRes = context.getResources();
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        mNameView = (TextView) findViewById(R.id.audio_name);
-        mAlbumView = (TextView) findViewById(R.id.album_name);
-        mArtistView = (TextView) findViewById(R.id.artist_name);
-        mErrorMsgView = (TextView) findViewById(R.id.audio_error_msg);
-    }
-
-    private void onPlaybackError() {
-        Log.e(TAG, "Error occurred while playing audio.");
-        showErrorMessage(mRes.getString(R.string.cannot_play_audio));
-        stopAudio();
-    }
-
-    private void cleanupMediaPlayer() {
-        if (mMediaPlayer != null) {
-            try {
-                mMediaPlayer.stop();
-                mMediaPlayer.release();
-            } finally {
-                mMediaPlayer = null;
-            }
-        }
-    }
-
-    synchronized public void startAudio() {
-        if (!mIsPlaying && (mAudioUri != null)) {
-            mMediaPlayer = MediaPlayer.create(mContext, mAudioUri);
-            if (mMediaPlayer != null) {
-                mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
-                mMediaPlayer.setOnCompletionListener(new OnCompletionListener() {
-                    public void onCompletion(MediaPlayer mp) {
-                        stopAudio();
-                    }
-                });
-                mMediaPlayer.setOnErrorListener(new OnErrorListener() {
-                    public boolean onError(MediaPlayer mp, int what, int extra) {
-                        onPlaybackError();
-                        return true;
-                    }
-                });
-
-                mIsPlaying = true;
-                mMediaPlayer.start();
-            }
-        }
-    }
-
-    public void startVideo() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setAudio(Uri audio, String name, Map<String, ?> extras) {
-        synchronized (this) {
-            mAudioUri = audio;
-        }
-
-        mNameView.setText(name);
-        mAlbumView.setText((String) extras.get("album"));
-        mArtistView.setText((String) extras.get("artist"));
-    }
-
-    public void setImage(String name, Bitmap bitmap) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setImageRegionFit(String fit) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setImageVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setText(String name, String text) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setTextVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setVideo(String name, Uri video) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setVideoVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-
-    }
-
-    synchronized public void stopAudio() {
-        try {
-            cleanupMediaPlayer();
-        } finally {
-            mIsPlaying = false;
-        }
-    }
-
-    public void stopVideo() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void reset() {
-        synchronized (this) {
-            if (mIsPlaying) {
-                stopAudio();
-            }
-        }
-        mErrorMsgView.setVisibility(GONE);
-    }
-
-    public void setVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-
-    }
-
-    private void showErrorMessage(String msg) {
-        mErrorMsgView.setText(msg);
-        mErrorMsgView.setVisibility(VISIBLE);
-    }
-
-    public void pauseAudio() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void pauseVideo() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekAudio(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekVideo(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-}
diff --git a/src/com/android/mms/ui/BasicSlideEditorView.java b/src/com/android/mms/ui/BasicSlideEditorView.java
deleted file mode 100644
index 8220d79..0000000
--- a/src/com/android/mms/ui/BasicSlideEditorView.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.media.MediaPlayer;
-import android.net.Uri;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * This is a basic view to show and edit a slide.
- */
-public class BasicSlideEditorView extends LinearLayout implements
-        SlideViewInterface {
-    private static final String TAG = "BasicSlideEditorView";
-
-    private ImageView mImageView;
-    private View mAudioView;
-    private TextView mAudioNameView;
-    private EditText mEditText;
-    private boolean mOnTextChangedListenerEnabled = true;
-    private OnTextChangedListener mOnTextChangedListener;
-
-    public BasicSlideEditorView(Context context) {
-        super(context);
-    }
-
-    public BasicSlideEditorView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    public void onFinishInflate() {
-        mImageView = (ImageView) findViewById(R.id.image);
-        mAudioView = findViewById(R.id.audio);
-        mAudioNameView = (TextView) findViewById(R.id.audio_name);
-        mEditText = (EditText) findViewById(R.id.text_message);
-        mEditText.addTextChangedListener(new TextWatcher() {
-            public void beforeTextChanged(CharSequence s, int start, int count,
-                    int after) {
-                // TODO Auto-generated method stub
-            }
-
-            public void onTextChanged(CharSequence s, int start, int before,
-                    int count) {
-                if (mOnTextChangedListenerEnabled && (mOnTextChangedListener != null)) {
-                    mOnTextChangedListener.onTextChanged(s.toString());
-                }
-            }
-
-            public void afterTextChanged(Editable s) {
-                // TODO Auto-generated method stub
-            }
-        });
-    }
-
-    public void startAudio() {
-        // TODO Auto-generated method stub
-    }
-
-    public void startVideo() {
-        // TODO Auto-generated method stub
-    }
-
-    public void setAudio(Uri audio, String name, Map<String, ?> extras) {
-        mAudioView.setVisibility(View.VISIBLE);
-        mAudioNameView.setText(name);
-    }
-
-    public void setImage(String name, Bitmap bitmap) {
-        if (bitmap != null) {
-            mImageView.setImageBitmap(bitmap);
-        }
-    }
-
-    public void setImageRegionFit(String fit) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setImageVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setText(String name, String text) {
-        mOnTextChangedListenerEnabled = false;
-        if ((text != null) && !text.equals(mEditText.getText().toString())) {
-            mEditText.setText(text);
-            mEditText.setSelection(text.length());
-        }
-        mOnTextChangedListenerEnabled = true;
-    }
-
-    public void setTextVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setVideo(String name, Uri video) {
-        MediaPlayer mp = new MediaPlayer();
-        try {
-            mp.setDataSource(mContext, video);
-            mImageView.setImageBitmap(mp.getFrameAt(1000));
-        } catch (IOException e) {
-            Log.e(TAG, "Unexpected IOException.", e);
-        } finally {
-            mp.release();
-        }
-    }
-
-    public void setVideoVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void stopAudio() {
-        // TODO Auto-generated method stub
-    }
-
-    public void stopVideo() {
-        // TODO Auto-generated method stub
-    }
-
-    public void reset() {
-        mImageView.setImageDrawable(null);
-        mAudioView.setVisibility(View.GONE);
-        mOnTextChangedListenerEnabled = false;
-        mEditText.setText("");
-        mOnTextChangedListenerEnabled = true;
-    }
-
-    public void setVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setOnTextChangedListener(OnTextChangedListener l) {
-        mOnTextChangedListener = l;
-    }
-
-    public interface OnTextChangedListener {
-        void onTextChanged(String s);
-    }
-
-    public void pauseAudio() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void pauseVideo() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekAudio(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekVideo(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-}
diff --git a/src/com/android/mms/ui/ClassZeroActivity.java b/src/com/android/mms/ui/ClassZeroActivity.java
deleted file mode 100644
index 705a08a..0000000
--- a/src/com/android/mms/ui/ClassZeroActivity.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.ui;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.DialogInterface;
-import android.content.DialogInterface.OnClickListener;
-import android.os.Bundle;
-import android.view.Window;
-
-import com.android.mms.R;
-import com.android.mms.transaction.SmsReceiverService;
-
-/**
- * Display a class-zero SMS message to the user.  Wait for the user to
- * dismiss it.
- */
-public class ClassZeroActivity extends Activity {
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
-        getWindow().setBackgroundDrawableResource(
-                R.drawable.class_zero_background);
-
-        CharSequence messageChars =  getIntent().getCharSequenceExtra(
-                SmsReceiverService.CLASS_ZERO_BODY_KEY);
-
-        new AlertDialog.Builder(this)
-                .setMessage(messageChars)
-                .setPositiveButton(android.R.string.ok, mOkListener)
-                .setCancelable(false)
-                .show();
-    }
-
-    private final OnClickListener mOkListener = new OnClickListener() {
-        public void onClick(DialogInterface dialog, int whichButton) {
-            ClassZeroActivity.this.finish();
-        }
-    };
-}
diff --git a/src/com/android/mms/ui/ComposeMessageActivity.java b/src/com/android/mms/ui/ComposeMessageActivity.java
deleted file mode 100644
index 357e610..0000000
--- a/src/com/android/mms/ui/ComposeMessageActivity.java
+++ /dev/null
@@ -1,3308 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import static android.content.res.Configuration.KEYBOARDHIDDEN_NO;
-import static com.android.mms.transaction.ProgressCallbackEntity.PROGRESS_ABORT;
-import static com.android.mms.transaction.ProgressCallbackEntity.PROGRESS_COMPLETE;
-import static com.android.mms.transaction.ProgressCallbackEntity.PROGRESS_START;
-import static com.android.mms.transaction.ProgressCallbackEntity.PROGRESS_STATUS_ACTION;
-import static com.android.mms.ui.MessageListAdapter.COLUMN_ID;
-import static com.android.mms.ui.MessageListAdapter.COLUMN_MSG_TYPE;
-import static com.android.mms.ui.MessageListAdapter.PROJECTION;
-
-import com.android.internal.telephony.CallerInfo;
-import com.android.mms.ExceedMessageSizeException;
-import com.android.mms.R;
-import com.android.mms.ResolutionException;
-import com.android.mms.UnsupportContentTypeException;
-import com.android.mms.model.SlideModel;
-import com.android.mms.model.SlideshowModel;
-import com.android.mms.model.TextModel;
-import com.android.mms.transaction.MessageSender;
-import com.android.mms.transaction.MessagingNotification;
-import com.android.mms.transaction.MmsMessageSender;
-import com.android.mms.transaction.SmsMessageSender;
-import com.android.mms.ui.AttachmentEditor.OnAttachmentChangedListener;
-import com.android.mms.ui.MessageUtils.ResizeImageResultCallback;
-import com.android.mms.ui.RecipientList.Recipient;
-import com.android.mms.ui.RecipientsEditor.RecipientContextMenuInfo;
-import com.android.mms.util.ContactInfoCache;
-import com.android.mms.util.SendingProgressTokenManager;
-import com.android.mms.util.SmileyParser;
-
-import com.google.android.mms.ContentType;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.EncodedStringValue;
-import com.google.android.mms.pdu.PduBody;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduPart;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.pdu.SendReq;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.AsyncQueryHandler;
-import android.content.BroadcastReceiver;
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.DialogInterface.OnClickListener;
-import android.content.res.Configuration;
-import android.content.res.Resources;
-import android.database.Cursor;
-import android.database.DatabaseUtils;
-import android.database.sqlite.SQLiteException;
-import android.graphics.Bitmap;
-import android.graphics.drawable.Drawable;
-import android.media.RingtoneManager;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.Message;
-import android.provider.Contacts;
-import android.provider.MediaStore;
-import android.provider.Settings;
-import android.provider.Contacts.People;
-import android.provider.Contacts.Intents.Insert;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.Sms;
-import android.provider.Telephony.Threads;
-import android.telephony.gsm.SmsMessage;
-import android.text.ClipboardManager;
-import android.text.Editable;
-import android.text.InputFilter;
-import android.text.SpannableString;
-import android.text.Spanned;
-import android.text.TextUtils;
-import android.text.TextWatcher;
-import android.text.method.TextKeyListener;
-import android.text.style.URLSpan;
-import android.text.util.Linkify;
-import android.util.Config;
-import android.util.Log;
-import android.view.ContextMenu;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewStub;
-import android.view.Window;
-import android.view.ContextMenu.ContextMenuInfo;
-import android.view.View.OnCreateContextMenuListener;
-import android.view.View.OnFocusChangeListener;
-import android.view.View.OnKeyListener;
-import android.view.inputmethod.InputMethodManager;
-import android.widget.AdapterView;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.ListView;
-import android.widget.SimpleAdapter;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import java.io.InputStream;
-import java.io.IOException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import android.webkit.MimeTypeMap;
-
-/**
- * This is the main UI for:
- * 1. Composing a new message;
- * 2. Viewing/managing message history of a conversation.
- *
- * This activity can handle following parameters from the intent
- * by which it's launched.
- * thread_id long Identify the conversation to be viewed. When creating a
- *         new message, this parameter shouldn't be present.
- * msg_uri Uri The message which should be opened for editing in the editor.
- * address String The addresses of the recipients in current conversation.
- * compose_mode boolean Setting compose_mode to true will force the activity
- *         to show the recipients editor and the attachment editor but hide
- *         the message history. By default, this flag is set to false.
- * exit_on_sent boolean Exit this activity after the message is sent.
- */
-public class ComposeMessageActivity extends Activity
-        implements View.OnClickListener, OnAttachmentChangedListener {
-    public static final int REQUEST_CODE_ATTACH_IMAGE     = 10;
-    public static final int REQUEST_CODE_TAKE_PICTURE     = 11;
-    public static final int REQUEST_CODE_ATTACH_VIDEO     = 12;
-    public static final int REQUEST_CODE_TAKE_VIDEO       = 13;
-    public static final int REQUEST_CODE_ATTACH_SOUND     = 14;
-    public static final int REQUEST_CODE_RECORD_SOUND     = 15;
-    public static final int REQUEST_CODE_CREATE_SLIDESHOW = 16;
-
-    private static final String TAG = "ComposeMessageActivity";
-    private static final boolean DEBUG = false;
-    private static final boolean TRACE = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    // Menu ID
-    private static final int MENU_ADD_SUBJECT           = 0;
-    private static final int MENU_DELETE_THREAD         = 1;
-    private static final int MENU_ADD_ATTACHMENT        = 2;
-    private static final int MENU_DISCARD               = 3;
-    private static final int MENU_SEND                  = 4;
-    private static final int MENU_CALL_RECIPIENT        = 5;
-    private static final int MENU_CONVERSATION_LIST     = 6;
-
-    // Context menu ID
-    private static final int MENU_VIEW_CONTACT          = 12;
-    private static final int MENU_ADD_TO_CONTACTS       = 13;
-
-    private static final int MENU_EDIT_MESSAGE          = 14;
-    private static final int MENU_VIEW_PICTURE          = 15;
-    private static final int MENU_VIEW_SLIDESHOW        = 16;
-    private static final int MENU_VIEW_MESSAGE_DETAILS  = 17;
-    private static final int MENU_DELETE_MESSAGE        = 18;
-    private static final int MENU_SEARCH                = 19;
-    private static final int MENU_DELIVERY_REPORT       = 20;
-    private static final int MENU_FORWARD_MESSAGE       = 21;
-    private static final int MENU_CALL_BACK             = 22;
-    private static final int MENU_SEND_EMAIL            = 23;
-    private static final int MENU_COPY_MESSAGE_TEXT     = 24;
-    private static final int MENU_COPY_TO_SDCARD        = 25;
-    private static final int MENU_INSERT_SMILEY         = 26;
-    private static final int MENU_ADD_ADDRESS_TO_CONTACTS = 27;
-
-    private static final int SUBJECT_MAX_LENGTH    =  40;
-    private static final int RECIPIENTS_MAX_LENGTH = 312;
-
-    private static final int MESSAGE_LIST_QUERY_TOKEN = 9527;
-    private static final int THREAD_READ_QUERY_TOKEN = 9696;
-
-    private static final int DELETE_MESSAGE_TOKEN  = 9700;
-    private static final int DELETE_CONVERSATION_TOKEN  = 9701;
-
-    private static final int MMS_THRESHOLD = 4;
-
-    private static final int CHARS_REMAINING_BEFORE_COUNTER_SHOWN = 10;
-
-    private static final long NO_DATE_FOR_DIALOG = -1L;
-
-
-    private ContentResolver mContentResolver;
-
-    // The parameters/states of the activity.
-    private long mThreadId;                 // Database key for the current conversation
-    private String mExternalAddress;        // Serialized recipients in the current conversation
-    private boolean mComposeMode;           // Should we show the recipients editor on startup?
-    private boolean mExitOnSent;            // Should we finish() after sending a message?
-
-    private View mTopPanel;                 // View containing the recipient and subject editors
-    private View mBottomPanel;              // View containing the text editor, send button, ec.
-    private EditText mTextEditor;           // Text editor to type your message into
-    private TextView mTextCounter;          // Shows the number of characters used in text editor
-    private Button mSendButton;             // Press to detonate
-
-    private String mMsgText;                // Text of message
-
-    private Cursor mMsgListCursor;          // Cursor for messages-in-thread query
-    private final Object mMsgListCursorLock = new Object();
-    private MsgListQueryHandler mMsgListQueryHandler;
-
-    private MessageListView mMsgListView;               // ListView for messages in this conversation
-    private MessageListAdapter mMsgListAdapter;  // and its corresponding ListAdapter
-
-    private RecipientList mRecipientList;        // List of recipients for this conversation
-    private RecipientsEditor mRecipientsEditor;  // UI control for editing recipients
-
-    private boolean mIsKeyboardOpen;             // Whether the hardware keyboard is visible
-    private boolean mIsLandscape;                // Whether we're in landscape mode
-
-    private boolean mPossiblePendingNotification;   // If the message list has changed, we may have
-                                                    // a pending notification to deal with.
-
-    private static final int RECIPIENTS_REQUIRE_MMS = (1 << 0);     // 1
-    private static final int HAS_SUBJECT = (1 << 1);                // 2
-    private static final int HAS_ATTACHMENT = (1 << 2);             // 4
-    private static final int LENGTH_REQUIRES_MMS = (1 << 3);        // 8
-
-    private int mMessageState;                  // A bitmap of the above indicating different
-                                                // properties of the message -- any bit set
-                                                // will require conversion to MMS.
-
-    private int mMsgCount;  // Number of SMS messages required to send the current message.
-
-    // These fields are only used in MMS compose mode (requiresMms() == true) and should
-    // otherwise be null.
-    private SlideshowModel mSlideshow;
-    private Uri mMessageUri;
-    private EditText mSubjectTextEditor;    // Text editor for MMS subject
-    private String mSubject;                // MMS subject
-    private AttachmentEditor mAttachmentEditor;
-    private PduPersister mPersister;
-
-    private AlertDialog mSmileyDialog;
-
-    //==========================================================
-    // Inner classes
-    //==========================================================
-
-    private final Handler mAttachmentEditorHandler = new Handler() {
-        @Override
-        public void handleMessage(Message msg) {
-            switch (msg.what) {
-                case AttachmentEditor.MSG_EDIT_SLIDESHOW: {
-                    Intent intent = new Intent(ComposeMessageActivity.this,
-                            SlideshowEditActivity.class);
-                    // Need this to make sure mMessageUri is set up.
-                    convertMessageIfNeeded(HAS_ATTACHMENT, true);
-                    intent.setData(mMessageUri);
-                    startActivityForResult(intent, REQUEST_CODE_CREATE_SLIDESHOW);
-                    break;
-                }
-                case AttachmentEditor.MSG_SEND_SLIDESHOW: {
-                    if (isPreparedForSending()) {
-                        ComposeMessageActivity.this.confirmSendMessageIfNeeded();
-                    }
-                    break;
-                }
-                case AttachmentEditor.MSG_VIEW_IMAGE:
-                case AttachmentEditor.MSG_PLAY_AUDIO:
-                case AttachmentEditor.MSG_PLAY_VIDEO:
-                case AttachmentEditor.MSG_PLAY_SLIDESHOW: {
-                    Intent intent = new Intent(ComposeMessageActivity.this,
-                            SlideshowActivity.class);
-                    intent.setData(mMessageUri);
-                    startActivity(intent);
-                    break;
-                }
-
-                case AttachmentEditor.MSG_REPLACE_IMAGE:
-                case AttachmentEditor.MSG_REPLACE_VIDEO:
-                case AttachmentEditor.MSG_REPLACE_AUDIO:
-                    mAttachmentEditor.removeAttachment();
-                    showAddAttachmentDialog();
-                    break;
-
-                default:
-                    break;
-            }
-        }
-    };
-
-    private final Handler mMessageListItemHandler = new Handler() {
-        @Override
-        public void handleMessage(Message msg) {
-            String type;
-            switch (msg.what) {
-                case MessageListItem.MSG_LIST_EDIT_MMS:
-                    type = "mms";
-                    break;
-                case MessageListItem.MSG_LIST_EDIT_SMS:
-                    type = "sms";
-                    break;
-                default:
-                    Log.w(TAG, "Unknown message: " + msg.what);
-                    return;
-            }
-
-            MessageItem msgItem = getMessageItem(type, (Long) msg.obj);
-            if (msgItem != null) {
-                editMessageItem(msgItem);
-                int attachmentType = requiresMms()
-                        ? MessageUtils.getAttachmentType(mSlideshow)
-                        : AttachmentEditor.TEXT_ONLY;
-                drawBottomPanel(attachmentType);
-            }
-        }
-    };
-
-    private final OnKeyListener mSubjectKeyListener = new OnKeyListener() {
-        public boolean onKey(View v, int keyCode, KeyEvent event) {
-            if (event.getAction() != KeyEvent.ACTION_DOWN) {
-                return false;
-            }
-
-            // When the subject editor is empty, press "DEL" to hide the input field.
-            if ((keyCode == KeyEvent.KEYCODE_DEL) && (mSubjectTextEditor.length() == 0)) {
-                mSubjectTextEditor.setVisibility(View.GONE);
-                ComposeMessageActivity.this.hideTopPanelIfNecessary();
-                convertMessageIfNeeded(HAS_SUBJECT, false);
-                return true;
-            }
-
-            return false;
-        }
-    };
-
-    private final OnKeyListener mEmbeddedTextEditorKeyListener =
-            new OnKeyListener() {
-                public boolean onKey(View v, int keyCode, KeyEvent event) {
-                    if ((event.getAction() == KeyEvent.ACTION_DOWN)
-                            && (keyCode == KeyEvent.KEYCODE_ENTER)
-                            && !event.isShiftPressed()) {
-                        if (isPreparedForSending()) {
-                            sendMessage();
-                        }
-                        return true;
-                    } else {
-                        return false;
-                    }
-                }
-            };
-
-    private MessageItem getMessageItem(String type, long msgId) {
-        // Check whether the cursor is valid or not.
-        if (mMsgListCursor.isClosed()
-                || mMsgListCursor.isBeforeFirst()
-                || mMsgListCursor.isAfterLast()) {
-            Log.e(TAG, "Bad cursor.", new RuntimeException());
-            return null;
-        }
-
-        return mMsgListAdapter.getCachedMessageItem(type, msgId, mMsgListCursor);
-    }
-
-    private void resetCounter() {
-        mMsgCount = 1;
-
-        mTextCounter.setText("");
-        mTextCounter.setVisibility(View.GONE);
-    }
-
-    private void updateCounter() {
-        String text = mTextEditor.getText().toString();
-
-        int[] params = SmsMessage.calculateLength(text, false);
-            /* SmsMessage.calculateLength returns an int[4] with:
-             *   int[0] being the number of SMS's required,
-             *   int[1] the number of code units used,
-             *   int[2] is the number of code units remaining until the next message.
-             *   int[3] is the encoding type that should be used for the message.
-             */
-        mMsgCount = params[0];
-        int remainingInCurrentMessage = params[2];
-
-        if (mMsgCount > 1 || remainingInCurrentMessage <= CHARS_REMAINING_BEFORE_COUNTER_SHOWN) {
-            // Update the remaining characters and number of messages required.
-            mTextCounter.setText(remainingInCurrentMessage + " / " + mMsgCount);
-            mTextCounter.setVisibility(View.VISIBLE);
-        } else {
-            mTextCounter.setVisibility(View.GONE);
-        }
-
-        convertMessageIfNeeded(LENGTH_REQUIRES_MMS, mMsgCount >= MMS_THRESHOLD);
-    }
-
-    private void initMmsComponents() {
-       // Initialize subject editor.
-        mSubjectTextEditor = (EditText) findViewById(R.id.subject);
-        mSubjectTextEditor.setOnKeyListener(mSubjectKeyListener);
-        mSubjectTextEditor.setFilters(new InputFilter[] {
-                new InputFilter.LengthFilter(SUBJECT_MAX_LENGTH) });
-        if (!TextUtils.isEmpty(mSubject)) {
-            mSubjectTextEditor.setText(mSubject);
-        }
-
-        try {
-            if (mMessageUri != null) {
-                // Move the message into Draft before editing it.
-                mMessageUri = mPersister.move(mMessageUri, Mms.Draft.CONTENT_URI);
-                mSlideshow = SlideshowModel.createFromMessageUri(this, mMessageUri);
-            } else {
-                mSlideshow = createNewMessage(this);
-                if (mMsgText != null) {
-                    mSlideshow.get(0).getText().setText(mMsgText);
-                }
-                mMessageUri = createTemporaryMmsMessage();
-            }
-        } catch (MmsException e) {
-            Log.e(TAG, e.getMessage(), e);
-            finish();
-            return;
-        }
-
-        // Set up the attachment editor.
-        mAttachmentEditor = new AttachmentEditor(this, mAttachmentEditorHandler,
-                findViewById(R.id.attachment_editor));
-        mAttachmentEditor.setOnAttachmentChangedListener(this);
-
-        int attachmentType = MessageUtils.getAttachmentType(mSlideshow);
-        if (attachmentType == AttachmentEditor.EMPTY) {
-            fixEmptySlideshow(mSlideshow);
-            attachmentType = AttachmentEditor.TEXT_ONLY;
-        }
-        mAttachmentEditor.setAttachment(mSlideshow, attachmentType);
-    }
-
-    synchronized private void uninitMmsComponents() {
-        // Get text from slideshow if needed.
-        if (mAttachmentEditor != null) {
-            int attachmentType = mAttachmentEditor.getAttachmentType();
-            if (AttachmentEditor.TEXT_ONLY == attachmentType && mSlideshow != null) {
-                SlideModel model = mSlideshow.get(0);
-                if (model != null) {
-                    TextModel textModel = model.getText();
-                    if (textModel != null) {
-                        mMsgText = textModel.getText();
-                    }
-                }
-            }
-        }
-
-        mMessageState = 0;
-        mSlideshow = null;
-        if (mMessageUri != null) {
-            // Not sure if this is the best way to do this..
-            if (mMessageUri.toString().startsWith(Mms.Draft.CONTENT_URI.toString())) {
-                SqliteWrapper.delete(this, mContentResolver, mMessageUri, null, null);
-                mMessageUri = null;
-            }
-        }
-        if (mSubjectTextEditor != null) {
-            mSubjectTextEditor.setText("");
-            mSubjectTextEditor.setVisibility(View.GONE);
-            hideTopPanelIfNecessary();
-            mSubjectTextEditor = null;
-        }
-        mSubject = null;
-        mAttachmentEditor = null;
-    }
-
-    synchronized private void refreshMmsComponents() {
-        mMessageState = RECIPIENTS_REQUIRE_MMS;
-        if (mSubjectTextEditor != null) {
-            mSubjectTextEditor.setText("");
-            mSubjectTextEditor.setVisibility(View.GONE);
-        }
-        mSubject = null;
-
-        try {
-            mSlideshow = createNewMessage(this);
-            if (mMsgText != null) {
-                mSlideshow.get(0).getText().setText(mMsgText);
-            }
-            mMessageUri = createTemporaryMmsMessage();
-        } catch (MmsException e) {
-            Log.e(TAG, e.getMessage(), e);
-            finish();
-            return;
-        }
-
-        int attachmentType = MessageUtils.getAttachmentType(mSlideshow);
-        if (attachmentType == AttachmentEditor.EMPTY) {
-            fixEmptySlideshow(mSlideshow);
-            attachmentType = AttachmentEditor.TEXT_ONLY;
-        }
-        mAttachmentEditor.setAttachment(mSlideshow, attachmentType);
-    }
-
-    private boolean requiresMms() {
-        return (mMessageState > 0);
-    }
-
-    private boolean recipientsRequireMms() {
-        return mRecipientList.containsBcc() || mRecipientList.containsEmail();
-    }
-
-    private boolean hasAttachment() {
-        return ((mAttachmentEditor != null)
-             && (mAttachmentEditor.getAttachmentType() > AttachmentEditor.TEXT_ONLY));
-    }
-
-    private void updateState(int whichState, boolean set) {
-        if (set) {
-            mMessageState |= whichState;
-        } else {
-            mMessageState &= ~whichState;
-        }
-    }
-
-    private void convertMessage(boolean toMms) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Message type: " + (requiresMms() ? "MMS" : "SMS")
-                    + " -> " + (toMms ? "MMS" : "SMS"));
-        }
-        if (toMms) {
-            // Hide the counter and alert the user with a toast
-            if (mTextCounter != null) {
-                mTextCounter.setVisibility(View.GONE);
-            }
-            initMmsComponents();
-        } else {
-            uninitMmsComponents();
-            // Show the counter if necessary
-            updateCounter();
-        }
-
-        updateSendButtonState();
-    }
-
-    private void toastConvertInfo(boolean toMms) {
-        // If we didn't know whether to convert (e.g. resetting after message
-        // send, we need to notify the user.
-        int resId = toMms  ? R.string.converting_to_picture_message
-                           : R.string.converting_to_text_message;
-        Toast.makeText(this, resId, Toast.LENGTH_SHORT).show();
-    }
-
-    private void convertMessageIfNeeded(int whichState, boolean set) {
-        int oldState = mMessageState;
-        updateState(whichState, set);
-
-        boolean toMms;
-        // If any bits are set in the new state and none were set in the
-        // old state, we need to convert to MMS.
-        if ((oldState == 0) && (mMessageState != 0)) {
-            toMms = true;
-        } else if ((oldState != 0) && (mMessageState == 0)) {
-            // Vice versa, to SMS.
-            toMms = false;
-        } else {
-            // If we changed state but didn't change SMS vs. MMS status,
-            // there is nothing to do.
-            return;
-        }
-
-        toastConvertInfo(toMms);
-        convertMessage(toMms);
-    }
-
-    private class DeleteMessageListener implements OnClickListener {
-        private final Uri mDeleteUri;
-        private final boolean mDeleteAll;
-
-        public DeleteMessageListener(Uri uri, boolean all) {
-            mDeleteUri = uri;
-            mDeleteAll = all;
-        }
-
-        public DeleteMessageListener(long msgId, String type) {
-            if ("mms".equals(type)) {
-                mDeleteUri = ContentUris.withAppendedId(
-                        Mms.CONTENT_URI, msgId);
-            } else {
-                mDeleteUri = ContentUris.withAppendedId(
-                        Sms.CONTENT_URI, msgId);
-            }
-            mDeleteAll = false;
-        }
-
-        public void onClick(DialogInterface dialog, int whichButton) {
-            int token = mDeleteAll ? DELETE_CONVERSATION_TOKEN
-                                   : DELETE_MESSAGE_TOKEN;
-            mMsgListQueryHandler.startDelete(token,
-                    null, mDeleteUri, null, null);
-        }
-    }
-
-    private void discardTemporaryMessage() {
-        if (requiresMms()) {
-            if (mMessageUri != null) {
-                SqliteWrapper.delete(ComposeMessageActivity.this,
-                        mContentResolver, mMessageUri, null, null);
-            }
-        } else if (mThreadId > 0) {
-            deleteTemporarySmsMessage(mThreadId);
-        }
-
-        // Don't save this message as a draft, even if it is only an SMS.
-        mMsgText = "";
-    }
-
-    private class DiscardDraftListener implements OnClickListener {
-        public void onClick(DialogInterface dialog, int whichButton) {
-            discardTemporaryMessage();
-            goToConversationList();
-            finish();
-        }
-    }
-
-    private class SendIgnoreInvalidRecipientListener implements OnClickListener {
-        public void onClick(DialogInterface dialog, int whichButton) {
-            sendMessage();
-        }
-    }
-
-    private class CancelSendingListener implements OnClickListener {
-        public void onClick(DialogInterface dialog, int whichButton) {
-            if (isRecipientsEditorVisible()) {
-                mRecipientsEditor.requestFocus();
-            }
-        }
-    }
-
-    private void confirmSendMessageIfNeeded() {
-        if (mRecipientList.hasInvalidRecipient()) {
-            if (mRecipientList.hasValidRecipient()) {
-                String title = getResourcesString(R.string.has_invalid_recipient,
-                        mRecipientList.getInvalidRecipientString());
-                new AlertDialog.Builder(this)
-                    .setIcon(android.R.drawable.ic_dialog_alert)
-                    .setTitle(title)
-                    .setMessage(R.string.invalid_recipient_message)
-                    .setPositiveButton(R.string.try_to_send,
-                            new SendIgnoreInvalidRecipientListener())
-                    .setNegativeButton(R.string.no, new CancelSendingListener())
-                    .show();
-            } else {
-                new AlertDialog.Builder(this)
-                    .setIcon(android.R.drawable.ic_dialog_alert)
-                    .setTitle(R.string.cannot_send_message)
-                    .setMessage(R.string.cannot_send_message_reason)
-                    .setPositiveButton(R.string.yes, new CancelSendingListener())
-                    .show();
-            }
-        } else {
-            sendMessage();
-        }
-    }
-
-    private final OnFocusChangeListener mRecipientsFocusListener = new OnFocusChangeListener() {
-        public void onFocusChange(View v, boolean hasFocus) {
-            if (!hasFocus) {
-                convertMessageIfNeeded(RECIPIENTS_REQUIRE_MMS, recipientsRequireMms());
-                updateWindowTitle();
-            }
-        }
-    };
-
-    private final TextWatcher mRecipientsWatcher = new TextWatcher() {
-        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-        }
-
-        public void onTextChanged(CharSequence s, int start, int before, int count) {
-            // This is a workaround for bug 1609057.  Since onUserInteraction() is
-            // not called when the user touches the soft keyboard, we pretend it was
-            // called when textfields changes.  This should be removed when the bug
-            // is fixed.
-            onUserInteraction();
-        }
-
-        public void afterTextChanged(Editable s) {
-            int oldValidCount = mRecipientList.size();
-            int oldTotal = mRecipientList.countInvalidRecipients() + oldValidCount;
-
-            // Bug 1474782 describes a situation in which we send to
-            // the wrong recipient.  We have been unable to reproduce this,
-            // but the best theory we have so far is that the contents of
-            // mRecipientList somehow become stale when entering
-            // ComposeMessageActivity via onNewIntent().  This assertion is
-            // meant to catch one possible path to that, of a non-visible
-            // mRecipientsEditor having its TextWatcher fire and refreshing
-            // mRecipientList with its stale contents.
-            if (!isRecipientsEditorVisible()) {
-                IllegalStateException e = new IllegalStateException(
-                        "afterTextChanged called with invisible mRecipientsEditor");
-                // Make sure the crash is uploaded to the service so we
-                // can see if this is happening in the field.
-                Log.e(TAG, "RecipientsWatcher called incorrectly", e);
-                throw e;
-            }
-
-            // Refresh our local copy of the recipient list.
-            mRecipientList = mRecipientsEditor.getRecipientList();
-            // If we have gone to zero recipients, disable send button.
-            updateSendButtonState();
-
-            // If a recipient has been added or deleted (or an invalid one has become valid),
-            // convert the message if necessary.  This causes us to "drop" conversions when
-            // a recipient becomes invalid, but we check again upon losing focus to ensure our
-            // state doesn't get too stale.  This keeps us from thrashing around between
-            // valid and invalid when typing in an email address.
-            int newValidCount = mRecipientList.size();
-            int newTotal = mRecipientList.countInvalidRecipients() + newValidCount;
-            if ((oldTotal != newTotal) || (newValidCount > oldValidCount)) {
-                convertMessageIfNeeded(RECIPIENTS_REQUIRE_MMS, recipientsRequireMms());
-            }
-
-            String recipients = s.toString();
-            if (recipients.endsWith(",") || recipients.endsWith(", ")) {
-                updateWindowTitle();
-            }
-        }
-    };
-
-    private final OnCreateContextMenuListener mRecipientsMenuCreateListener =
-        new OnCreateContextMenuListener() {
-        public void onCreateContextMenu(ContextMenu menu, View v,
-                ContextMenuInfo menuInfo) {
-            if (menuInfo != null) {
-                Recipient r = ((RecipientContextMenuInfo) menuInfo).recipient;
-                RecipientsMenuClickListener l = new RecipientsMenuClickListener(r);
-
-                menu.setHeaderTitle(r.name);
-
-                if (r.person_id != -1) {
-                    menu.add(0, MENU_VIEW_CONTACT, 0, R.string.menu_view_contact)
-                            .setOnMenuItemClickListener(l);
-                } else {
-                    menu.add(0, MENU_ADD_TO_CONTACTS, 0, R.string.menu_add_to_contacts)
-                            .setOnMenuItemClickListener(l);
-                }
-            }
-        }
-    };
-
-    private final class RecipientsMenuClickListener implements MenuItem.OnMenuItemClickListener {
-        private final Recipient mRecipient;
-
-        RecipientsMenuClickListener(Recipient recipient) {
-            mRecipient = recipient;
-        }
-
-        public boolean onMenuItemClick(MenuItem item) {
-            switch (item.getItemId()) {
-                // Context menu handlers for the recipients editor.
-                case MENU_VIEW_CONTACT: {
-                    Uri uri = ContentUris.withAppendedId(People.CONTENT_URI,
-                            mRecipient.person_id);
-                    Intent intent = new Intent(Intent.ACTION_VIEW, uri);
-                    ComposeMessageActivity.this.startActivity(intent);
-                    return true;
-                }
-                case MENU_ADD_TO_CONTACTS: {
-                    Intent intent = new Intent(Insert.ACTION, People.CONTENT_URI);
-                    if (Recipient.isPhoneNumber(mRecipient.number)) {
-                        intent.putExtra(Insert.PHONE, mRecipient.number);
-                    } else {
-                        intent.putExtra(Insert.EMAIL, mRecipient.number);
-                    }
-                    ComposeMessageActivity.this.startActivity(intent);
-                    return true;
-                }
-            }
-            return false;
-        }
-    }
-
-    private void addPositionBasedMenuItems(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
-        AdapterView.AdapterContextMenuInfo info;
-
-        try {
-            info = (AdapterView.AdapterContextMenuInfo) menuInfo;
-        } catch (ClassCastException e) {
-            Log.e(TAG, "bad menuInfo");
-            return;
-        }
-        final int position = info.position;
-
-        addUriSpecificMenuItems(menu, v, position);
-    }
-
-    private Uri getSelectedUriFromMessageList(ListView listView, int position) {
-        // If the context menu was opened over a uri, get that uri.
-        MessageListItem msglistItem = (MessageListItem) listView.getChildAt(position);
-        if (msglistItem == null) {
-            // FIXME: Should get the correct view. No such interface in ListView currently
-            // to get the view by position. The ListView.getChildAt(position) cannot
-            // get correct view since the list doesn't create one child for each item.
-            // And if setSelection(position) then getSelectedView(),
-            // cannot get corrent view when in touch mode.
-            return null;
-        }
-
-        TextView textView;
-        CharSequence text = null;
-        int selStart = -1;
-        int selEnd = -1;
-
-        //check if message sender is selected
-        textView = (TextView) msglistItem.findViewById(R.id.text_view);
-        if (textView != null) {
-            text = textView.getText();
-            selStart = textView.getSelectionStart();
-            selEnd = textView.getSelectionEnd();
-        }
-
-        if (selStart == -1) {
-            //sender is not being selected, it may be within the message body
-            textView = (TextView) msglistItem.findViewById(R.id.body_text_view);
-            if (textView != null) {
-                text = textView.getText();
-                selStart = textView.getSelectionStart();
-                selEnd = textView.getSelectionEnd();
-            }
-        }
-
-        // Check that some text is actually selected, rather than the cursor
-        // just being placed within the TextView.
-        if (selStart != selEnd) {
-            int min = Math.min(selStart, selEnd);
-            int max = Math.max(selStart, selEnd);
-
-            URLSpan[] urls = ((Spanned) text).getSpans(min, max,
-                                                        URLSpan.class);
-
-            if (urls.length == 1) {
-                return Uri.parse(urls[0].getURL());
-            }
-        }
-
-        //no uri was selected
-        return null;
-    }
-
-    private void addUriSpecificMenuItems(ContextMenu menu, View v, int position) {
-        Uri uri = getSelectedUriFromMessageList((ListView) v, position);
-
-        if (uri != null) {
-            Intent intent = new Intent(null, uri);
-            intent.addCategory(Intent.CATEGORY_SELECTED_ALTERNATIVE);
-            menu.addIntentOptions(0, 0, 0,
-                    new android.content.ComponentName(this, ComposeMessageActivity.class),
-                    null, intent, 0, null);
-        }
-    }
-
-    private final void addCallAndContactMenuItems(
-            ContextMenu menu, MsgListMenuClickListener l, MessageItem msgItem) {
-        // Add all possible links in the address & message
-        StringBuilder textToSpannify = new StringBuilder();
-        if (msgItem.mBoxId == Mms.MESSAGE_BOX_INBOX) {
-            textToSpannify.append(msgItem.mAddress + ": ");
-        }
-        textToSpannify.append(msgItem.mBody);
-
-        SpannableString msg = new SpannableString(textToSpannify.toString());
-        Linkify.addLinks(msg, Linkify.ALL);
-        ArrayList<String> uris =
-            MessageUtils.extractUris(msg.getSpans(0, msg.length(), URLSpan.class));
-
-        while (uris.size() > 0) {
-            String uriString = uris.remove(0);
-            // Remove any dupes so they don't get added to the menu multiple times
-            while (uris.contains(uriString)) {
-                uris.remove(uriString);
-            }
-            
-            int sep = uriString.indexOf(":");
-            String prefix = null;
-            if (sep >= 0) {
-                prefix = uriString.substring(0, sep);
-                uriString = uriString.substring(sep + 1);
-            }
-            boolean addToContacts = false;
-            if ("mailto".equalsIgnoreCase(prefix))  {
-                String sendEmailString = getString(
-                        R.string.menu_send_email).replace("%s", uriString);
-                menu.add(0, MENU_SEND_EMAIL, 0, sendEmailString)
-                    .setOnMenuItemClickListener(l)
-                    .setIntent(new Intent(
-                            Intent.ACTION_VIEW,
-                            Uri.parse("mailto:" + uriString)));
-                addToContacts = !haveEmailContact(uriString);
-            } else if ("tel".equalsIgnoreCase(prefix)) {
-                String callBackString = getString(
-                        R.string.menu_call_back).replace("%s", uriString);
-                menu.add(0, MENU_CALL_BACK, 0, callBackString)
-                    .setOnMenuItemClickListener(l)
-                    .setIntent(new Intent(
-                            Intent.ACTION_DIAL,
-                            Uri.parse("tel:" + uriString)));
-                addToContacts = !isNumberInContacts(uriString);
-            }
-            if (addToContacts) {
-                Intent intent = new Intent(Insert.ACTION, People.CONTENT_URI);
-                if (Recipient.isPhoneNumber(uriString)) {
-                    intent.putExtra(Insert.PHONE, uriString);
-                } else {
-                    intent.putExtra(Insert.EMAIL, uriString);
-                }
-
-                String addContactString = getString(
-                        R.string.menu_add_address_to_contacts).replace("%s", uriString);
-                menu.add(0, MENU_ADD_ADDRESS_TO_CONTACTS, 0, addContactString)
-                    .setOnMenuItemClickListener(l)
-                    .setIntent(intent);
-            }
-        }
-    }
-
-    private boolean haveEmailContact(String emailAddress) {
-        Cursor cursor = SqliteWrapper.query(this, getContentResolver(),
-                Contacts.ContactMethods.CONTENT_EMAIL_URI,
-                new String[] { Contacts.ContactMethods.NAME },
-                Contacts.ContactMethods.DATA + " = " + DatabaseUtils.sqlEscapeString(emailAddress),
-                null, null);
-
-        if (cursor != null) {
-            try {
-                while (cursor.moveToNext()) {
-                    String name = cursor.getString(0);
-                    if (!TextUtils.isEmpty(name)) {
-                        return true;
-                    }
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-        return false;
-    }
-
-    private boolean isNumberInContacts(String phoneNumber) {
-        CallerInfo ci = ContactInfoCache.getInstance().getCallerInfo(this, phoneNumber);
-        return !TextUtils.isEmpty(ci.name);
-    }
-
-    private final OnCreateContextMenuListener mMsgListMenuCreateListener =
-        new OnCreateContextMenuListener() {
-        public void onCreateContextMenu(ContextMenu menu, View v,
-                ContextMenuInfo menuInfo) {
-            String type = mMsgListCursor.getString(COLUMN_MSG_TYPE);
-            long msgId = mMsgListCursor.getLong(COLUMN_ID);
-
-            addPositionBasedMenuItems(menu, v, menuInfo);
-
-            MessageItem msgItem = mMsgListAdapter.getCachedMessageItem(type, msgId, mMsgListCursor);
-            if (msgItem == null) {
-                Log.e(TAG, "Cannot load message item for type = " + type
-                        + ", msgId = " + msgId);
-                return;
-            }
-
-            menu.setHeaderTitle(R.string.message_options);
-
-            MsgListMenuClickListener l = new MsgListMenuClickListener();
-            if (msgItem.isMms()) {
-                switch (msgItem.mBoxId) {
-                    case Mms.MESSAGE_BOX_INBOX:
-                        break;
-                    case Mms.MESSAGE_BOX_DRAFTS:
-                    case Mms.MESSAGE_BOX_OUTBOX:
-                        menu.add(0, MENU_EDIT_MESSAGE, 0, R.string.menu_edit)
-                                .setOnMenuItemClickListener(l);
-                        break;
-                }
-                switch (msgItem.mAttachmentType) {
-                    case AttachmentEditor.TEXT_ONLY:
-                        break;
-                    case AttachmentEditor.IMAGE_ATTACHMENT:
-                        menu.add(0, MENU_VIEW_PICTURE, 0, R.string.view_picture)
-                                .setOnMenuItemClickListener(l);
-                        if (haveSomethingToCopyToSDCard(msgItem.mMsgId)) {
-                            menu.add(0, MENU_COPY_TO_SDCARD, 0, R.string.copy_to_sdcard)
-                            .setOnMenuItemClickListener(l);
-                        }
-                        break;
-                    case AttachmentEditor.SLIDESHOW_ATTACHMENT:
-                    default:
-                        menu.add(0, MENU_VIEW_SLIDESHOW, 0, R.string.view_slideshow)
-                        .setOnMenuItemClickListener(l);
-                        if (haveSomethingToCopyToSDCard(msgItem.mMsgId)) {
-                            menu.add(0, MENU_COPY_TO_SDCARD, 0, R.string.copy_to_sdcard)
-                            .setOnMenuItemClickListener(l);
-                        }
-                        break;
-                }
-            } else {
-                // Message type is sms.
-                if ((msgItem.mBoxId == Sms.MESSAGE_TYPE_OUTBOX) ||
-                        (msgItem.mBoxId == Sms.MESSAGE_TYPE_FAILED)) {
-                    menu.add(0, MENU_EDIT_MESSAGE, 0, R.string.menu_edit)
-                            .setOnMenuItemClickListener(l);
-                }
-            }
-
-            addCallAndContactMenuItems(menu, l, msgItem);
-
-            // Forward is not available for undownloaded messages.
-            if (msgItem.isDownloaded()) {
-                menu.add(0, MENU_FORWARD_MESSAGE, 0, R.string.menu_forward)
-                        .setOnMenuItemClickListener(l);
-            }
-
-            // It is unclear what would make most sense for copying an MMS message
-            // to the clipboard, so we currently do SMS only.
-            if (msgItem.isSms()) {
-                menu.add(0, MENU_COPY_MESSAGE_TEXT, 0, R.string.copy_message_text)
-                        .setOnMenuItemClickListener(l);
-            }
-
-            menu.add(0, MENU_VIEW_MESSAGE_DETAILS, 0, R.string.view_message_details)
-                    .setOnMenuItemClickListener(l);
-            menu.add(0, MENU_DELETE_MESSAGE, 0, R.string.delete_message)
-                    .setOnMenuItemClickListener(l);
-            if (msgItem.mDeliveryReport || msgItem.mReadReport) {
-                menu.add(0, MENU_DELIVERY_REPORT, 0, R.string.view_delivery_report)
-                        .setOnMenuItemClickListener(l);
-            }
-        }
-    };
-
-    private void editMessageItem(MessageItem msgItem) {
-        if ("sms".equals(msgItem.mType)) {
-            editSmsMessageItem(msgItem);
-        } else {
-            editMmsMessageItem(msgItem);
-        }
-        if (MessageListItem.isFailedMessage(msgItem) && mMsgListAdapter.getCount() <= 1) {
-            // For messages with bad addresses, let the user re-edit the recipients.
-            initRecipientsEditor();
-        }
-    }
-
-    private void editSmsMessageItem(MessageItem msgItem) {
-        // Delete the old undelivered SMS and load its content.
-        Uri uri = ContentUris.withAppendedId(Sms.CONTENT_URI, msgItem.mMsgId);
-        SqliteWrapper.delete(ComposeMessageActivity.this,
-                mContentResolver, uri, null, null);
-        mMsgText = msgItem.mBody;
-    }
-
-    private void editMmsMessageItem(MessageItem msgItem) {
-        if (mMessageUri != null) {
-            // Delete the former draft.
-            SqliteWrapper.delete(ComposeMessageActivity.this,
-                    mContentResolver, mMessageUri, null, null);
-        }
-        mMessageUri = msgItem.mMessageUri;
-        ContentValues values = new ContentValues(1);
-        values.put(Mms.MESSAGE_BOX, Mms.MESSAGE_BOX_DRAFTS);
-        SqliteWrapper.update(ComposeMessageActivity.this,
-                mContentResolver, mMessageUri, values, null, null);
-
-        updateState(RECIPIENTS_REQUIRE_MMS, recipientsRequireMms());
-        if (!TextUtils.isEmpty(msgItem.mSubject)) {
-            mSubject = msgItem.mSubject;
-            updateState(HAS_SUBJECT, true);
-        }
-
-        if (msgItem.mAttachmentType > AttachmentEditor.TEXT_ONLY) {
-            updateState(HAS_ATTACHMENT, true);
-        }
-
-        convertMessage(true);
-        if (!TextUtils.isEmpty(mSubject)) {
-            mSubjectTextEditor.setVisibility(View.VISIBLE);
-            mTopPanel.setVisibility(View.VISIBLE);
-        } else {
-            mSubjectTextEditor.setVisibility(View.GONE);
-            hideTopPanelIfNecessary();
-        }
-    }
-
-    private void copyToClipboard(String str) {
-        ClipboardManager clip =
-            (ClipboardManager)getSystemService(Context.CLIPBOARD_SERVICE);
-        clip.setText(str);
-    }
-
-    /**
-     * Context menu handlers for the message list view.
-     */
-    private final class MsgListMenuClickListener implements MenuItem.OnMenuItemClickListener {
-        public boolean onMenuItemClick(MenuItem item) {
-            String type = mMsgListCursor.getString(COLUMN_MSG_TYPE);
-            long msgId = mMsgListCursor.getLong(COLUMN_ID);
-            MessageItem msgItem = getMessageItem(type, msgId);
-
-            if (msgItem == null) {
-                return false;
-            }
-
-            switch (item.getItemId()) {
-                case MENU_EDIT_MESSAGE: {
-                    editMessageItem(msgItem);
-                    int attachmentType = requiresMms()
-                            ? MessageUtils.getAttachmentType(mSlideshow)
-                            : AttachmentEditor.TEXT_ONLY;
-                    drawBottomPanel(attachmentType);
-                    return true;
-                }
-                case MENU_COPY_MESSAGE_TEXT: {
-                    copyToClipboard(msgItem.mBody);
-                    return true;
-                }
-                case MENU_FORWARD_MESSAGE: {
-                    Uri uri = null;
-                    Intent intent = new Intent(ComposeMessageActivity.this,
-                                               ComposeMessageActivity.class);
-
-                    intent.putExtra("compose_mode", true);
-                    intent.putExtra("exit_on_sent", true);
-                    if (type.equals("sms")) {
-                        uri = ContentUris.withAppendedId(
-                                Sms.CONTENT_URI, msgId);
-                        intent.putExtra("sms_body", msgItem.mBody);
-                    } else {
-                        SendReq sendReq = new SendReq();
-                        String subject = getString(R.string.forward_prefix);
-                        if (msgItem.mSubject != null) {
-                            subject += msgItem.mSubject;
-                        }
-                        sendReq.setSubject(new EncodedStringValue(subject));
-                        sendReq.setBody(msgItem.mSlideshow.makeCopy(
-                                ComposeMessageActivity.this));
-
-                        try {
-                            // Implicitly copy the parts of the message here.
-                            uri = mPersister.persist(sendReq, Mms.Draft.CONTENT_URI);
-                        } catch (MmsException e) {
-                            Log.e(TAG, "Failed to copy message: " + msgItem.mMessageUri, e);
-                            Toast.makeText(ComposeMessageActivity.this,
-                                    R.string.cannot_save_message, Toast.LENGTH_SHORT).show();
-                            return true;
-                        }
-
-                        intent.putExtra("msg_uri", uri);
-                        intent.putExtra("subject", subject);
-                    }
-                    startActivityIfNeeded(intent, -1);
-                    return true;
-                }
-                case MENU_VIEW_PICTURE:
-                    // FIXME: Use SlideshowActivity to view image for the time being.
-                    // As described in UI spec, Pressing an inline attachment will
-                    // open up the full view of the attachment in its associated app
-                    // (here should the pictures app).
-                    // But the <ViewImage> would only show images in MediaStore.
-                    // Should we save a copy to MediaStore temporarily for displaying?
-                case MENU_VIEW_SLIDESHOW: {
-                    Intent intent = new Intent(ComposeMessageActivity.this,
-                            SlideshowActivity.class);
-                    intent.setData(ContentUris.withAppendedId(Mms.CONTENT_URI, msgId));
-                    startActivity(intent);
-                    return true;
-                }
-                case MENU_VIEW_MESSAGE_DETAILS: {
-                    String messageDetails = MessageUtils.getMessageDetails(
-                            ComposeMessageActivity.this, mMsgListCursor, msgItem.mMessageSize);
-                    new AlertDialog.Builder(ComposeMessageActivity.this)
-                            .setTitle(R.string.message_details_title)
-                            .setMessage(messageDetails)
-                            .setPositiveButton(android.R.string.ok, null)
-                            .setCancelable(true)
-                            .show();
-                    return true;
-                }
-                case MENU_DELETE_MESSAGE: {
-                    DeleteMessageListener l = new DeleteMessageListener(
-                            msgItem.mMessageUri, false);
-                    confirmDeleteDialog(l, false);
-                    return true;
-                }
-                case MENU_DELIVERY_REPORT:
-                    showDeliveryReport(msgId, type);
-                    return true;
-
-                case MENU_COPY_TO_SDCARD: {
-                    int resId = copyMedia(msgId) ? R.string.copy_to_sdcard_success :
-                        R.string.copy_to_sdcard_fail;
-                    Toast.makeText(ComposeMessageActivity.this, resId, Toast.LENGTH_SHORT).show();
-                    return true;
-                }
-
-                default:
-                    return false;
-            }
-        }
-    }
-
-    /**
-     * Looks to see if there are any valid parts of the attachment that can be copied to a SD card.
-     * @param msgId
-     */
-    private boolean haveSomethingToCopyToSDCard(long msgId) {
-        PduBody body;
-        try {
-           body = SlideshowModel.getPduBody(this,
-                   ContentUris.withAppendedId(Mms.CONTENT_URI, msgId));
-        } catch (MmsException e) {
-            Log.e(TAG, e.getMessage(), e);
-            return false;
-        }
-
-        boolean result = false;
-        int partNum = body.getPartsNum();
-        for(int i = 0; i < partNum; i++) {
-            PduPart part = body.getPart(i);
-            String type = new String(part.getContentType());
-
-            if ((ContentType.isImageType(type) || ContentType.isVideoType(type) ||
-                    ContentType.isAudioType(type))) {
-                result = true;
-                break;
-            }
-        }
-        return result;
-    }
-
-    /**
-     * Copies media from an Mms to the "download" directory on the SD card
-     * @param msgId
-     */
-    private boolean copyMedia(long msgId) {
-        PduBody body;
-        boolean result = true;
-        try {
-           body = SlideshowModel.getPduBody(this, ContentUris.withAppendedId(Mms.CONTENT_URI, msgId));
-        } catch (MmsException e) {
-            Log.e(TAG, e.getMessage(), e);
-            return false;
-        }
-
-        int partNum = body.getPartsNum();
-        for(int i = 0; i < partNum; i++) {
-            PduPart part = body.getPart(i);
-            String type = new String(part.getContentType());
-
-            if ((ContentType.isImageType(type) || ContentType.isVideoType(type) ||
-                    ContentType.isAudioType(type))) {
-                result &= copyPart(part);   // all parts have to be successful for a valid result.
-            }
-        }
-        return result;
-    }
-
-    private boolean copyPart(PduPart part) {
-        Uri uri = part.getDataUri();
-
-        InputStream input = null;
-        FileOutputStream fout = null;
-        try {
-            input = mContentResolver.openInputStream(uri);
-            if (input instanceof FileInputStream) {
-                FileInputStream fin = (FileInputStream) input;
-
-                byte[] location = part.getName();
-                if (location == null) {
-                    location = part.getFilename();
-                }
-                if (location == null) {
-                    location = part.getContentLocation();
-                }
-
-                // Depending on the location, there may be an
-                // extension already on the name or not
-                String fileName = new String(location);
-                String dir = "/sdcard/download/";
-                String extension;
-                int index;
-                if ((index = fileName.indexOf(".")) == -1) {
-                    String type = new String(part.getContentType());
-                    extension = MimeTypeMap.getSingleton().getExtensionFromMimeType(type);
-                } else {
-                    extension = fileName.substring(index + 1, fileName.length());
-                    fileName = fileName.substring(0, index);
-                }
-
-                File file = getUniqueDestination(dir + fileName, extension);
-
-                // make sure the path is valid and directories created for this file.
-                File parentFile = file.getParentFile();
-                if (!parentFile.exists() && !parentFile.mkdirs()) {
-                    Log.e(TAG, "[MMS] copyPart: mkdirs for " + parentFile.getPath() + " failed!");
-                    return false;
-                }
-
-                fout = new FileOutputStream(file);
-
-                byte[] buffer = new byte[8000];
-                while(fin.read(buffer) != -1) {
-                    fout.write(buffer);
-                }
-
-                // Notify other applications listening to scanner events
-                // that a media file has been added to the sd card
-                sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,
-                        Uri.fromFile(file)));
-            }
-        } catch (IOException e) {
-            // Ignore
-            Log.e(TAG, "IOException caught while opening or reading stream", e);
-            return false;
-        } finally {
-            if (null != input) {
-                try {
-                    input.close();
-                } catch (IOException e) {
-                    // Ignore
-                    Log.e(TAG, "IOException caught while closing stream", e);
-                    return false;
-                }
-            }
-            if (null != fout) {
-                try {
-                    fout.close();
-                } catch (IOException e) {
-                    // Ignore
-                    Log.e(TAG, "IOException caught while closing stream", e);
-                    return false;
-                }
-            }
-        }
-        return true;
-    }
-
-    private File getUniqueDestination(String base, String extension) {
-        File file = new File(base + "." + extension);
-
-        for (int i = 2; file.exists(); i++) {
-            file = new File(base + "_" + i + "." + extension);
-        }
-        return file;
-    }
-
-    private void showDeliveryReport(long messageId, String type) {
-        Intent intent = new Intent(this, DeliveryReportActivity.class);
-        intent.putExtra("message_id", messageId);
-        intent.putExtra("message_type", type);
-
-        startActivity(intent);
-    }
-
-    private final IntentFilter mHttpProgressFilter = new IntentFilter(PROGRESS_STATUS_ACTION);
-
-    private final BroadcastReceiver mHttpProgressReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            if (PROGRESS_STATUS_ACTION.equals(intent.getAction())) {
-                long token = intent.getLongExtra("token",
-                                    SendingProgressTokenManager.NO_TOKEN);
-                if (token != mThreadId) {
-                    return;
-                }
-
-                int progress = intent.getIntExtra("progress", 0);
-                switch (progress) {
-                    case PROGRESS_START:
-                        setProgressBarVisibility(true);
-                        break;
-                    case PROGRESS_ABORT:
-                    case PROGRESS_COMPLETE:
-                        setProgressBarVisibility(false);
-                        break;
-                    default:
-                        setProgress(100 * progress);
-                }
-            }
-        }
-    };
-
-    //==========================================================
-    // Static methods
-    //==========================================================
-
-    private static SlideshowModel createNewMessage(Context context) {
-        SlideshowModel slideshow = SlideshowModel.createNew(context);
-        SlideModel slide = new SlideModel(slideshow);
-
-        TextModel text = new TextModel(
-                context, ContentType.TEXT_PLAIN, "text_0.txt",
-                slideshow.getLayout().getTextRegion());
-        slide.add(text);
-
-        slideshow.add(slide);
-        return slideshow;
-    }
-
-    private static EncodedStringValue[] encodeStrings(String[] array) {
-        int count = array.length;
-        if (count > 0) {
-            EncodedStringValue[] encodedArray = new EncodedStringValue[count];
-            for (int i = 0; i < count; i++) {
-                encodedArray[i] = new EncodedStringValue(array[i]);
-            }
-            return encodedArray;
-        }
-        return null;
-    }
-
-    // Get the recipients editor ready to be displayed onscreen.
-    private void initRecipientsEditor() {
-        ViewStub stub = (ViewStub)findViewById(R.id.recipients_editor_stub);
-        if (stub != null) {
-            mRecipientsEditor = (RecipientsEditor) stub.inflate();
-        } else {
-            mRecipientsEditor = (RecipientsEditor)findViewById(R.id.recipients_editor);
-            mRecipientsEditor.setVisibility(View.VISIBLE);
-        }
-
-        mRecipientsEditor.setAdapter(new RecipientsAdapter(this));
-        mRecipientsEditor.populate(mRecipientList);
-        mRecipientsEditor.setOnCreateContextMenuListener(mRecipientsMenuCreateListener);
-        mRecipientsEditor.addTextChangedListener(mRecipientsWatcher);
-        mRecipientsEditor.setOnFocusChangeListener(mRecipientsFocusListener);
-        mRecipientsEditor.setFilters(new InputFilter[] {
-                new InputFilter.LengthFilter(RECIPIENTS_MAX_LENGTH) });
-        mRecipientsEditor.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                // After the user selects an item in the pop-up contacts list, move the
-                // focus to the text editor if there is only one recipient.  This helps
-                // the common case of selecting one recipient and then typing a message,
-                // but avoids annoying a user who is trying to add five recipients and
-                // keeps having focus stolen away.
-                if (mRecipientList.size() == 1) {
-                    mTextEditor.requestFocus();
-                }
-            }
-        });
-
-        mTopPanel.setVisibility(View.VISIBLE);
-    }
-
-    //==========================================================
-    // Activity methods
-    //==========================================================
-
-    private static final String[] MMS_DRAFT_PROJECTION = {
-            Mms._ID,        // 0
-            Mms.SUBJECT     // 1
-        };
-
-    private static final int MMS_ID_INDEX       = 0;
-    private static final int MMS_SUBJECT_INDEX  = 1;
-
-    private Cursor queryMmsDraft(long threadId) {
-        final String selection = Mms.THREAD_ID + " = " + threadId;
-        return SqliteWrapper.query(this, mContentResolver,
-                    Mms.Draft.CONTENT_URI, MMS_DRAFT_PROJECTION,
-                    selection, null, null);
-    }
-
-    private void loadMmsDraftIfNeeded() {
-        Cursor cursor = queryMmsDraft(mThreadId);
-        if (cursor != null) {
-            try {
-                if ((cursor.getCount() == 1) && cursor.moveToFirst()) {
-                    mMessageUri = ContentUris.withAppendedId(Mms.Draft.CONTENT_URI,
-                                        cursor.getLong(MMS_ID_INDEX));
-                    mSubject = cursor.getString(MMS_SUBJECT_INDEX);
-                    if (!TextUtils.isEmpty(mSubject)) {
-                        updateState(HAS_SUBJECT, true);
-                    }
-
-                    if (!requiresMms()) {
-                        // it is an MMS draft, since it has no subject or
-                        // multiple recipients, it must have an attachment
-                        updateState(HAS_ATTACHMENT, true);
-                    }
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-    }
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        requestWindowFeature(Window.FEATURE_PROGRESS);
-        setContentView(R.layout.compose_message_activity);
-        setProgressBarVisibility(false);
-        setTitle("");
-
-        // Initialize members for UI elements.
-        initResourceRefs();
-
-        mContentResolver = getContentResolver();
-        mPersister = PduPersister.getPduPersister(this);
-
-        // Read parameters or previously saved state of this activity.
-        initActivityState(savedInstanceState, getIntent());
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "onCreate(): savedInstanceState = " + savedInstanceState);
-            Log.v(TAG, "onCreate(): intent = " + getIntent());
-            Log.v(TAG, "onCreate(): mThreadId = " + mThreadId);
-            Log.v(TAG, "onCreate(): mMessageUri = " + mMessageUri);
-        }
-
-        // Parse the recipient list.
-        mRecipientList = RecipientList.from(mExternalAddress, this);
-        updateState(RECIPIENTS_REQUIRE_MMS, recipientsRequireMms());
-
-        if (ConversationList.isFailedToDeliver(getIntent())) {
-            // Show a pop-up dialog to inform user the message was
-            // failed to deliver.
-            undeliveredMessageDialog(getMessageDate(mMessageUri));
-        }
-        loadMmsDraftIfNeeded();
-
-        // Initialize MMS-specific stuff if we need to.
-        if ((mMessageUri != null) || requiresMms()) {
-            convertMessage(true);
-
-            if (!TextUtils.isEmpty(mSubject)) {
-                mSubjectTextEditor.setVisibility(View.VISIBLE);
-                mTopPanel.setVisibility(View.VISIBLE);
-            } else {
-                mSubjectTextEditor.setVisibility(View.GONE);
-                hideTopPanelIfNecessary();
-            }
-        } else if (isEmptySms()) {
-            mMsgText = readTemporarySmsMessage(mThreadId);
-        }
-        
-        // If we are in an existing thread and we are not in "compose mode",
-        // start up the message list view.
-        boolean initRecipients = false;
-        if ((mThreadId > 0L) && !mComposeMode) {
-            initMessageList(false);
-        } else {
-            // Otherwise, show the recipients editor.
-            initRecipients = true;
-        }
-        if (initRecipients || (ConversationList.isFailedToDeliver(getIntent()) 
-                && mMsgListAdapter.getCount() <= 1)) {
-            initRecipientsEditor();
-        }
-        
-        int attachmentType = requiresMms()
-                ? MessageUtils.getAttachmentType(mSlideshow)
-                : AttachmentEditor.TEXT_ONLY;
-
-        updateSendButtonState();
-
-        handleSendIntent(getIntent());
-
-        drawBottomPanel(attachmentType);
-
-        mTopPanel.setFocusable(false);
-
-        Configuration config = getResources().getConfiguration();
-        mIsKeyboardOpen = config.keyboardHidden == KEYBOARDHIDDEN_NO;
-        mIsLandscape = config.orientation == Configuration.ORIENTATION_LANDSCAPE;
-        onKeyboardStateChanged(mIsKeyboardOpen);
-        
-        if (TRACE) {
-            android.os.Debug.startMethodTracing("compose");
-        }
-    }
-
-    private void hideTopPanelIfNecessary() {
-        if (!isSubjectEditorVisible() && !isRecipientsEditorVisible()) {
-            mTopPanel.setVisibility(View.GONE);
-        }
-    }
-
-    @Override
-    protected void onNewIntent(Intent intent) {
-        setIntent(intent);
-
-        long oldThreadId = mThreadId;
-        boolean oldIsMms = requiresMms();
-        mMessageState = 0;
-        String oldText = mMsgText;
-
-        // Read parameters or previously saved state of this activity.
-        initActivityState(null, intent);
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "onNewIntent(): intent = " + getIntent());
-            Log.v(TAG, "onNewIntent(): mThreadId = " + mThreadId);
-            Log.v(TAG, "onNewIntent(): mMessageUri = " + mMessageUri);
-        }
-
-        if (mThreadId != oldThreadId) {
-            // Save the old message as a draft.
-            if (oldIsMms) {
-                // Save the old temporary message if necessary.
-                if ((mMessageUri != null) && isPreparedForSending()) {
-                    updateTemporaryMmsMessage(false);
-                }
-            } else {
-                if (oldThreadId <= 0) {
-                    oldThreadId = getOrCreateThreadId(mRecipientList.getToNumbers());
-                }
-                updateTemporarySmsMessage(oldThreadId, oldText);
-            }
-
-            // Refresh the recipient list.
-            mRecipientList = RecipientList.from(mExternalAddress, this);
-            updateState(RECIPIENTS_REQUIRE_MMS, recipientsRequireMms());
-
-            if ((mThreadId > 0L) && !mComposeMode) {
-                // If we have already initialized the recipients editor, just
-                // hide it in the display.
-                if (mRecipientsEditor != null) {
-                    mRecipientsEditor.setVisibility(View.GONE);
-                    hideTopPanelIfNecessary();
-                }
-                initMessageList(false);
-            } else {
-                initRecipientsEditor();
-            }
-
-            boolean isMms = (mMessageUri != null) || requiresMms();
-            if (isMms != oldIsMms) {
-                convertMessage(isMms);
-            }
-
-            if (isMms) {
-                // Initialize subject editor.
-                if (!TextUtils.isEmpty(mSubject)) {
-                    mSubjectTextEditor.setText(mSubject);
-                    mSubjectTextEditor.setVisibility(View.VISIBLE);
-                    mTopPanel.setVisibility(View.VISIBLE);
-                } else {
-                    mSubjectTextEditor.setVisibility(View.GONE);
-                    hideTopPanelIfNecessary();
-                }
-
-                try {
-                    mSlideshow = createNewMessage(this);
-                    mMessageUri = createTemporaryMmsMessage();
-                    Toast.makeText(this, R.string.message_saved_as_draft,
-                            Toast.LENGTH_SHORT).show();
-                } catch (MmsException e) {
-                    Log.e(TAG, "Cannot create new slideshow and temporary message.");
-                    finish();
-                }
-            } else if (isEmptySms()) {
-                mMsgText = readTemporarySmsMessage(mThreadId);
-            }
-
-            int attachmentType = requiresMms() ? MessageUtils.getAttachmentType(mSlideshow)
-                                               : AttachmentEditor.TEXT_ONLY;
-            drawBottomPanel(attachmentType);
-
-            if (mMsgListCursor != null) {
-                mMsgListCursor.close();
-                mMsgListCursor = null;
-            }
-        }
-    }
-
-    @Override
-    protected void onStart() {
-        super.onStart();
-
-        updateWindowTitle();
-        initFocus();
-
-        // Register a BroadcastReceiver to listen on HTTP I/O process.
-        registerReceiver(mHttpProgressReceiver, mHttpProgressFilter);
-
-        if (mMsgListAdapter != null) {
-            mMsgListAdapter.registerObservers();
-            startMsgListQuery();
-        }
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-
-        if (mThreadId > 0 && hasWindowFocus()) {
-            MessageUtils.handleReadReport(
-                    ComposeMessageActivity.this, mThreadId,
-                    PduHeaders.READ_STATUS_READ, null);
-            MessageUtils.markAsRead(this, mThreadId);
-        }
-    }
-
-    @Override
-    public void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-
-        if (mThreadId > 0L) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "ONFREEZE: thread_id: " + mThreadId);
-            }
-            outState.putLong("thread_id", mThreadId);
-        }
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "ONFREEZE: address: " + mRecipientList.serialize());
-        }
-        outState.putString("address", mRecipientList.serialize());
-
-        if (needSaveAsMms()) {
-            if (isSubjectEditorVisible()) {
-                outState.putString("subject", mSubjectTextEditor.getText().toString());
-            }
-
-            if (mMessageUri != null) {
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "ONFREEZE: mMessageUri: " + mMessageUri);
-                }
-                updateTemporaryMmsMessage(false);
-                outState.putParcelable("msg_uri", mMessageUri);
-            }
-        } else {
-            outState.putString("sms_body", mMsgText);
-            if (mThreadId <= 0) {
-                mThreadId = getOrCreateThreadId(mRecipientList.getToNumbers());
-            }
-            updateTemporarySmsMessage(mThreadId, mMsgText);
-        }
-
-        if (mComposeMode) {
-            outState.putBoolean("compose_mode", mComposeMode);
-        }
-
-        if (mExitOnSent) {
-            outState.putBoolean("exit_on_sent", mExitOnSent);
-        }
-    }
-
-    private boolean isEmptyMessage() {
-        if (requiresMms()) {
-            return isEmptyMms();
-        }
-        return isEmptySms();
-    }
-
-    private boolean isEmptySms() {
-        return TextUtils.isEmpty(mMsgText);
-    }
-
-    private boolean isEmptyMms() {
-        return !(hasText() || hasSubject() || hasAttachment());
-    }
-
-    private boolean needSaveAsMms() {
-        // subject editor is visible without any contents.
-        if ( (mMessageState == HAS_SUBJECT) && !hasSubject()) {
-            convertMessage(false);
-            return false;
-        }
-        return requiresMms();
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-
-        if (isFinishing()) {
-            if (hasValidRecipient()) {
-                if (needSaveAsMms()) {
-                    if (mMessageUri != null) {
-                        if (isEmptyMms()) {
-                            SqliteWrapper.delete(ComposeMessageActivity.this,
-                                    mContentResolver, mMessageUri, null, null);
-                        } else {
-                            mThreadId = getOrCreateThreadId(mRecipientList.getToNumbers());
-                            updateTemporaryMmsMessage(true);
-                        }
-                    }
-                } else {
-                    if (isEmptySms()) {
-                        if (mThreadId > 0) {
-                            deleteTemporarySmsMessage(mThreadId);
-                        }
-                    } else {
-                        mThreadId = getOrCreateThreadId(mRecipientList.getToNumbers());
-                        updateTemporarySmsMessage(mThreadId, mMsgText);
-                        Toast.makeText(this, R.string.message_saved_as_draft,
-                                Toast.LENGTH_SHORT).show();
-                    }
-                }
-            } else {
-                discardTemporaryMessage();
-            }
-        }
-    }
-
-    @Override
-    protected void onStop() {
-        super.onStop();
-
-        if (mMsgListAdapter != null) {
-            synchronized (mMsgListCursorLock) {
-                mMsgListCursor = null;
-                mMsgListAdapter.changeCursor(null);
-            }
-        }
-
-        // Cleanup the BroadcastReceiver.
-        unregisterReceiver(mHttpProgressReceiver);
-    }
-
-    @Override
-    protected void onDestroy() {
-        if (TRACE) {
-            android.os.Debug.stopMethodTracing();
-        }
-
-        super.onDestroy();
-
-        if (mMsgListCursor != null) {
-            mMsgListCursor.close();
-        }
-    }
-
-    @Override
-    public void onConfigurationChanged(Configuration newConfig) {
-        super.onConfigurationChanged(newConfig);
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "onConfigurationChanged: " + newConfig);
-        }
-        
-        mIsKeyboardOpen = newConfig.keyboardHidden == KEYBOARDHIDDEN_NO;
-        mIsLandscape = newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE;
-        onKeyboardStateChanged(mIsKeyboardOpen);
-    }
-
-    private void onKeyboardStateChanged(boolean isKeyboardOpen) {
-        // If the keyboard is hidden, don't show focus highlights for
-        // things that cannot receive input.
-        if (isKeyboardOpen) {
-            if (mRecipientsEditor != null) {
-                mRecipientsEditor.setFocusableInTouchMode(true);
-            }
-            if (mSubjectTextEditor != null) {
-                mSubjectTextEditor.setFocusableInTouchMode(true);
-            }
-            mTextEditor.setFocusableInTouchMode(true);
-            mTextEditor.setHint(R.string.type_to_compose_text_enter_to_send);
-            initFocus();
-        } else {
-            if (mRecipientsEditor != null) {
-                mRecipientsEditor.setFocusable(false);
-            }
-            if (mSubjectTextEditor != null) {
-                mSubjectTextEditor.setFocusable(false);
-            }
-            mTextEditor.setFocusable(false);
-            mTextEditor.setHint(R.string.open_keyboard_to_compose_message);
-        }
-    }
-
-    @Override
-    public void onUserInteraction() {
-        checkPendingNotification();
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        switch (keyCode) {
-            case KeyEvent.KEYCODE_DEL:
-                if ((mMsgListAdapter != null) && mMsgListView.isFocused()) {
-                    Cursor cursor;
-                    try {
-                        cursor = (Cursor) mMsgListView.getSelectedItem();
-                    } catch (ClassCastException e) {
-                        Log.e(TAG, "Unexpected ClassCastException.", e);
-                        return super.onKeyDown(keyCode, event);
-                    }
-
-                    if (cursor != null) {
-                        DeleteMessageListener l = new DeleteMessageListener(
-                                cursor.getLong(COLUMN_ID),
-                                cursor.getString(COLUMN_MSG_TYPE));
-                        confirmDeleteDialog(l, false);
-                        return true;
-                    }
-                }
-                break;
-            case KeyEvent.KEYCODE_DPAD_CENTER:
-            case KeyEvent.KEYCODE_ENTER:
-                if (isPreparedForSending()) {
-                    confirmSendMessageIfNeeded();
-                    return true;
-                }
-                break;
-            case KeyEvent.KEYCODE_BACK:
-                exitComposeMessageActivity(new Runnable() {
-                    public void run() {
-                        finish();
-                    }
-                });
-                return true;
-        }
-        
-        return super.onKeyDown(keyCode, event);
-    }
-
-    @Override
-    public boolean onKeyUp(int keyCode, KeyEvent event) {
-        switch (keyCode) {
-        case KeyEvent.KEYCODE_CALL:
-            // We do this in onKeyUp in order to preserve the ability
-            // to longpress SEND.  Also, if we do it in onKeyDown, the
-            // Dialer is running by the time the key is released, and
-            // onKeyUp fires and immediately initiates the phone call.
-            if (isRecipientCallable()) {
-                dialRecipient();
-                // Fall through to allow the default key handler to cancel
-                // its long press timeout.
-            }
-            break;
-        }
-        return super.onKeyUp(keyCode, event);
-    }
-    
-    private void exitComposeMessageActivity(final Runnable exit) {
-        if (mThreadId != -1) {
-            if (isRecipientsEditorVisible()) {
-                if (hasValidRecipient()) {
-                    exit.run();
-                } else {
-                    if (isEmptyMessage()) {
-                        discardTemporaryMessage();
-                        exit.run();
-                    } else {
-                        MessageUtils.showDiscardDraftConfirmDialog(this,
-                                new DiscardDraftListener());
-                    }
-                }
-            } else {
-                exit.run();
-            }
-        }
-    }
-
-    private void goToConversationList() {
-        finish();
-        startActivity(new Intent(this, ConversationList.class));
-    }
-
-    private boolean isRecipientsEditorVisible() {
-        return (null != mRecipientsEditor)
-                    && (View.VISIBLE == mRecipientsEditor.getVisibility());
-    }
-
-    private boolean isSubjectEditorVisible() {
-        return (null != mSubjectTextEditor)
-                    && (View.VISIBLE == mSubjectTextEditor.getVisibility());
-    }
-    
-    public void onAttachmentChanged(int newType, int oldType) {
-        drawBottomPanel(newType);
-        if (newType > AttachmentEditor.TEXT_ONLY) {
-            if (!requiresMms() && !mComposeMode) {
-                toastConvertInfo(true);
-            }
-            updateState(HAS_ATTACHMENT, true);
-        } else {
-            convertMessageIfNeeded(HAS_ATTACHMENT, false);
-        }
-        updateSendButtonState();
-    }
-
-    // We don't want to show the "call" option unless there is only one
-    // recipient and it's a phone number.
-    private boolean isRecipientCallable() {
-        return (mRecipientList.size() == 1 && !mRecipientList.containsEmail());
-    }
-    
-    private void dialRecipient() {
-        String number = mRecipientList.getNumbers()[0];
-        Intent dialIntent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + number));
-        startActivity(dialIntent);
-    }
-    
-    @Override
-    public boolean onPrepareOptionsMenu(Menu menu) {
-        menu.clear();
-
-        if (isRecipientCallable()) {
-            menu.add(0, MENU_CALL_RECIPIENT, 0, R.string.menu_call).setIcon(
-                com.android.internal.R.drawable.ic_menu_call);
-        }
-        
-        menu.add(0, MENU_CONVERSATION_LIST, 0, R.string.all_threads).setIcon(
-                com.android.internal.R.drawable.ic_menu_friendslist);
-
-        if (isSubjectEditorVisible()) {
-            menu.add(0, MENU_ADD_SUBJECT, 0, R.string.add_subject).setIcon(
-                    com.android.internal.R.drawable.ic_menu_edit);
-        }
-
-        if ((mAttachmentEditor == null) || (mAttachmentEditor.getAttachmentType() == AttachmentEditor.TEXT_ONLY)) {
-            menu.add(0, MENU_ADD_ATTACHMENT, 0, R.string.add_attachment).setIcon(
-                    com.android.internal.R.drawable.ic_menu_attachment);
-        }
-
-        if (isPreparedForSending()) {
-            menu.add(0, MENU_SEND, 0, R.string.send).setIcon(android.R.drawable.ic_menu_send);
-        }
-
-        if (mThreadId > 0L) {
-            // Removed search as part of b/1205708
-            //menu.add(0, MENU_SEARCH, 0, R.string.menu_search).setIcon(
-            //        R.drawable.ic_menu_search);
-            if ((null != mMsgListCursor) && (mMsgListCursor.getCount() > 0)) {
-                menu.add(0, MENU_DELETE_THREAD, 0, R.string.delete_thread).setIcon(
-                    android.R.drawable.ic_menu_delete);
-            }
-        } else {
-            menu.add(0, MENU_DISCARD, 0, R.string.discard).setIcon(android.R.drawable.ic_menu_delete);
-        }
-
-        menu.add(0, MENU_INSERT_SMILEY, 0, R.string.menu_insert_smiley).setIcon(
-                com.android.internal.R.drawable.ic_menu_emoticons);
-
-        buildAddAddressToContactMenuItem(menu);
-        return true;
-    }
-    
-    private void buildAddAddressToContactMenuItem(Menu menu) {
-        if (mRecipientList.hasValidRecipient()) {
-            // Look for the first recipient we don't have a contact for and create a menu item to
-            // add the number to contacts.
-            for (String number : mRecipientList.getToNumbers()) {
-                if (Recipient.isPhoneNumber(number) && !isNumberInContacts(number)) {
-                    String addContactString = getString(
-                            R.string.menu_add_address_to_contacts).replace("%s", number);
-                    Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT);
-                    intent.setType(Contacts.People.CONTENT_ITEM_TYPE);
-                    intent.putExtra(Insert.PHONE, number);
-                    menu.add(0, MENU_ADD_ADDRESS_TO_CONTACTS, 0, addContactString)
-                    .setIntent(intent);
-                    break;
-                }
-            }
-        }
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case MENU_ADD_SUBJECT:
-                convertMessageIfNeeded(HAS_SUBJECT, true);
-                mSubjectTextEditor.setVisibility(View.VISIBLE);
-                mTopPanel.setVisibility(View.VISIBLE);
-                mSubjectTextEditor.requestFocus();
-                break;
-            case MENU_ADD_ATTACHMENT:
-                // Launch the add-attachment list dialog
-                showAddAttachmentDialog();
-                break;
-            case MENU_DISCARD:
-                discardTemporaryMessage();
-                finish();
-                break;
-            case MENU_SEND:
-                if (isPreparedForSending()) {
-                    confirmSendMessageIfNeeded();
-                }
-                break;
-            case MENU_SEARCH:
-                onSearchRequested();
-                break;
-            case MENU_DELETE_THREAD:
-                DeleteMessageListener l = new DeleteMessageListener(
-                        getThreadUri(), true);
-                confirmDeleteDialog(l, true);
-                break;
-            case MENU_CONVERSATION_LIST:
-                exitComposeMessageActivity(new Runnable() {
-                    public void run() {
-                        goToConversationList();
-                    }
-                });
-                break;
-            case MENU_CALL_RECIPIENT:
-                dialRecipient();
-                break;
-            case MENU_INSERT_SMILEY:
-                showSmileyDialog();
-                break;
-
-            case MENU_ADD_ADDRESS_TO_CONTACTS:
-                return false;   // so the intent attached to the menu item will get launched.
-        }
-
-        return true;
-    }
-
-    private void addAttachment(int type) {
-        switch (type) {
-            case AttachmentTypeSelectorAdapter.ADD_IMAGE:
-                MessageUtils.selectImage(this, REQUEST_CODE_ATTACH_IMAGE);
-                break;
-
-            case AttachmentTypeSelectorAdapter.TAKE_PICTURE: {
-                Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
-                startActivityForResult(intent, REQUEST_CODE_TAKE_PICTURE);
-            }
-                break;
-
-            case AttachmentTypeSelectorAdapter.ADD_VIDEO:
-                MessageUtils.selectVideo(this, REQUEST_CODE_ATTACH_VIDEO);
-                break;
-
-            case AttachmentTypeSelectorAdapter.RECORD_VIDEO: {
-                Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
-                intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0);
-                startActivityForResult(intent, REQUEST_CODE_TAKE_VIDEO);
-            }
-                break;
-
-            case AttachmentTypeSelectorAdapter.ADD_SOUND:
-                MessageUtils.selectAudio(this, REQUEST_CODE_ATTACH_SOUND);
-                break;
-
-            case AttachmentTypeSelectorAdapter.RECORD_SOUND:
-                MessageUtils.recordSound(this, REQUEST_CODE_RECORD_SOUND);
-                break;
-
-            case AttachmentTypeSelectorAdapter.ADD_SLIDESHOW: {
-                boolean wasSms = !requiresMms();
-
-                // SlideshowEditActivity needs mMessageUri to work with.
-                convertMessageIfNeeded(HAS_ATTACHMENT, true);
-
-                if (wasSms) {
-                    // If we are converting from SMS, make sure the SMS
-                    // text message gets imported into the first slide.
-                    TextModel text = mSlideshow.get(0).getText();
-                    if (text != null) {
-                        text.setText(mMsgText);
-                    }
-                }
-
-                Intent intent = new Intent(this, SlideshowEditActivity.class);
-                intent.setData(mMessageUri);
-                startActivityForResult(intent, REQUEST_CODE_CREATE_SLIDESHOW);
-            }
-                break;
-
-            default:
-                break;
-        }
-    }
-
-    private void showAddAttachmentDialog() {
-        AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        builder.setIcon(R.drawable.ic_dialog_attach);
-        builder.setTitle(R.string.add_attachment);
-
-        AttachmentTypeSelectorAdapter adapter = new AttachmentTypeSelectorAdapter(
-                this, AttachmentTypeSelectorAdapter.MODE_WITH_SLIDESHOW);
-
-        builder.setAdapter(adapter, new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int which) {
-                addAttachment(which);
-            }
-        });
-
-        builder.show();
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "onActivityResult: requestCode=" + requestCode
-                    + ", resultCode=" + resultCode + ", data=" + data);
-        }
-
-        if (resultCode != RESULT_OK) {
-            // Make sure if there was an error that our message
-            // type remains correct.
-            convertMessageIfNeeded(HAS_ATTACHMENT, hasAttachment());
-            return;
-        }
-
-        if (!requiresMms()) {
-            convertMessage(true);
-        }
-
-        switch(requestCode) {
-            case REQUEST_CODE_CREATE_SLIDESHOW:
-                try {
-                    // Refresh the slideshow model since it may be changed
-                    // by the slideshow editor.
-                    mSlideshow = SlideshowModel.createFromMessageUri(this, mMessageUri);
-                } catch (MmsException e) {
-                    Log.e(TAG, "Failed to load slideshow from " + mMessageUri);
-                    Toast.makeText(this, getString(R.string.cannot_load_message),
-                            Toast.LENGTH_SHORT).show();
-                    return;
-                }
-
-                // Find the most suitable type for the attachment.
-                int attachmentType = MessageUtils.getAttachmentType(mSlideshow);
-                switch (attachmentType) {
-                    case AttachmentEditor.EMPTY:
-                        fixEmptySlideshow(mSlideshow);
-                        attachmentType = AttachmentEditor.TEXT_ONLY;
-                        // fall-through
-                    case AttachmentEditor.TEXT_ONLY:
-                        mAttachmentEditor.setAttachment(mSlideshow, attachmentType);
-                        convertMessageIfNeeded(HAS_ATTACHMENT, false);
-                        drawBottomPanel(attachmentType);
-                        return;
-                    default:
-                        mAttachmentEditor.setAttachment(mSlideshow, attachmentType);
-                        break;
-                }
-
-                drawBottomPanel(attachmentType);
-                break;
-
-            case REQUEST_CODE_TAKE_PICTURE:
-                Bitmap bitmap = (Bitmap) data.getParcelableExtra("data");
-
-                if (bitmap == null) {
-                    Toast.makeText(this,
-                            getResourcesString(R.string.failed_to_add_media, getPictureString()),
-                            Toast.LENGTH_SHORT).show();
-                    return;
-                }
-                addImage(bitmap);
-                break;
-
-            case REQUEST_CODE_ATTACH_IMAGE:
-                addImage(data.getData());
-                break;
-
-            case REQUEST_CODE_TAKE_VIDEO:
-            case REQUEST_CODE_ATTACH_VIDEO:
-                addVideo(data.getData());
-                break;
-
-            case REQUEST_CODE_ATTACH_SOUND:
-            case REQUEST_CODE_RECORD_SOUND:
-                Uri uri;
-                if (requestCode == REQUEST_CODE_ATTACH_SOUND) {
-                    uri = (Uri) data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
-                    if (Settings.System.DEFAULT_RINGTONE_URI.equals(uri)) {
-                        uri = null;
-                    }
-                } else {
-                    uri = data.getData();
-                }
-
-                if (uri == null) {
-                    convertMessageIfNeeded(HAS_ATTACHMENT, hasAttachment());
-                    return;
-                }
-
-                try {
-                    mAttachmentEditor.changeAudio(uri);
-                    mAttachmentEditor.setAttachment(
-                            mSlideshow, AttachmentEditor.AUDIO_ATTACHMENT);
-                } catch (MmsException e) {
-                    Log.e(TAG, "add audio failed", e);
-                    Toast.makeText(this,
-                            getResourcesString(R.string.failed_to_add_media, getAudioString()),
-                            Toast.LENGTH_SHORT).show();
-                } catch (UnsupportContentTypeException e) {
-                    MessageUtils.showErrorDialog(ComposeMessageActivity.this,
-                            getResourcesString(R.string.unsupported_media_format, getAudioString()),
-                            getResourcesString(R.string.select_different_media, getAudioString()));
-                } catch (ExceedMessageSizeException e) {
-                    MessageUtils.showErrorDialog(ComposeMessageActivity.this,
-                            getResourcesString(R.string.exceed_message_size_limitation),
-                            getResourcesString(R.string.failed_to_add_media, getAudioString()));
-                }
-                break;
-
-            default:
-                // TODO
-                break;
-        }
-        // Make sure if there was an error that our message
-        // type remains correct. Excludes add image because it may be in async
-        // resize process.
-        if (!requiresMms() && (REQUEST_CODE_ATTACH_IMAGE != requestCode)) {
-            convertMessage(false);
-        }
-    }
-
-    private void addImage(Bitmap bitmap) {
-        try {
-            addImage(MessageUtils.saveBitmapAsPart(this, mMessageUri, bitmap));
-        } catch (MmsException e) {
-            handleAddImageFailure(e);
-        }
-    }
-
-    private final ResizeImageResultCallback mResizeImageCallback = new ResizeImageResultCallback() {
-        public void onResizeResult(PduPart part) {
-            Context context = ComposeMessageActivity.this;
-            Resources r = context.getResources();
-
-            if (part == null) {
-                Toast.makeText(context,
-                        r.getString(R.string.failed_to_add_media, getPictureString()),
-                        Toast.LENGTH_SHORT).show();
-                return;
-            }
-
-            convertMessageIfNeeded(HAS_ATTACHMENT, true);
-            try {
-                long messageId = ContentUris.parseId(mMessageUri);
-                Uri newUri = mPersister.persistPart(part, messageId);
-                mAttachmentEditor.changeImage(newUri);
-                mAttachmentEditor.setAttachment(
-                        mSlideshow, AttachmentEditor.IMAGE_ATTACHMENT);
-            } catch (MmsException e) {
-                Toast.makeText(context,
-                        r.getString(R.string.failed_to_add_media, getPictureString()),
-                        Toast.LENGTH_SHORT).show();
-            } catch (UnsupportContentTypeException e) {
-                MessageUtils.showErrorDialog(context,
-                        r.getString(R.string.unsupported_media_format, getPictureString()),
-                        r.getString(R.string.select_different_media, getPictureString()));
-            } catch (ResolutionException e) {
-                MessageUtils.showErrorDialog(context,
-                        r.getString(R.string.failed_to_resize_image),
-                        r.getString(R.string.resize_image_error_information));
-            } catch (ExceedMessageSizeException e) {
-                MessageUtils.showErrorDialog(context,
-                        r.getString(R.string.exceed_message_size_limitation),
-                        r.getString(R.string.failed_to_add_media, getPictureString()));
-            }
-        }
-    };
-
-    private void addImage(Uri uri) {
-        try {
-            mAttachmentEditor.changeImage(uri);
-            mAttachmentEditor.setAttachment(
-                    mSlideshow, AttachmentEditor.IMAGE_ATTACHMENT);
-        } catch (MmsException e) {
-            handleAddImageFailure(e);
-        } catch (UnsupportContentTypeException e) {
-            MessageUtils.showErrorDialog(
-                    ComposeMessageActivity.this,
-                    getResourcesString(R.string.unsupported_media_format, getPictureString()),
-                    getResourcesString(R.string.select_different_media, getPictureString()));
-        } catch (ResolutionException e) {
-            MessageUtils.resizeImageAsync(ComposeMessageActivity.this,
-                    uri, mAttachmentEditorHandler, mResizeImageCallback);
-        } catch (ExceedMessageSizeException e) {
-            MessageUtils.showErrorDialog(
-                    ComposeMessageActivity.this,
-                    getResourcesString(R.string.exceed_message_size_limitation),
-                    getResourcesString(R.string.failed_to_add_media, getPictureString()));
-        }
-    }
-
-    private void handleAddImageFailure(MmsException exception) {
-        Log.e(TAG, "add image failed", exception);
-        Toast.makeText(
-                this,
-                getResourcesString(R.string.failed_to_add_media, getPictureString()),
-                Toast.LENGTH_SHORT).show();
-    }
-
-    private void addVideo(Uri uri) {
-        try {
-            mAttachmentEditor.changeVideo(uri);
-            mAttachmentEditor.setAttachment(
-                    mSlideshow, AttachmentEditor.VIDEO_ATTACHMENT);
-        } catch (MmsException e) {
-            Log.e(TAG, "add video failed", e);
-            Toast.makeText(this,
-                    getResourcesString(R.string.failed_to_add_media, getVideoString()),
-                    Toast.LENGTH_SHORT).show();
-        } catch (UnsupportContentTypeException e) {
-            MessageUtils.showErrorDialog(ComposeMessageActivity.this,
-                    getResourcesString(R.string.unsupported_media_format, getVideoString()),
-                    getResourcesString(R.string.select_different_media, getVideoString()));
-        } catch (ExceedMessageSizeException e) {
-            MessageUtils.showErrorDialog(ComposeMessageActivity.this,
-                    getResourcesString(R.string.exceed_message_size_limitation),
-                    getResourcesString(R.string.failed_to_add_media, getVideoString()));
-        }
-    }
-    
-    private void handleSendIntent(Intent intent) {
-        Bundle extras = intent.getExtras();
-
-        if (!Intent.ACTION_SEND.equals(intent.getAction()) || (extras == null)) {
-            return;
-        }
-        
-        if (extras.containsKey(Intent.EXTRA_STREAM)) {
-            Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM);
-            if (uri != null) {
-                convertMessage(true);
-                if (intent.getType().startsWith("image/")) {
-                    addImage(uri);
-                } else if (intent.getType().startsWith("video/")) {
-                    addVideo(uri);
-                }
-            }
-        } else if (extras.containsKey(Intent.EXTRA_TEXT)) {
-            mMsgText = extras.getString(Intent.EXTRA_TEXT);
-        }
-    }
-
-    private String getAudioString() {
-        return getResourcesString(R.string.type_audio);
-    }
-
-    private String getPictureString() {
-        return getResourcesString(R.string.type_picture);
-    }
-
-    private String getVideoString() {
-        return getResourcesString(R.string.type_video);
-    }
-
-    private String getResourcesString(int id, String mediaName) {
-        Resources r = getResources();
-        return r.getString(id, mediaName);
-    }
-
-    private String getResourcesString(int id) {
-        Resources r = getResources();
-        return r.getString(id);
-    }
-
-    private void fixEmptySlideshow(SlideshowModel slideshow) {
-        if (slideshow.size() == 0) {
-            SlideModel slide = new SlideModel(slideshow);
-            slideshow.add(slide);
-        }
-
-        if (!slideshow.get(0).hasText()) {
-            TextModel text = new TextModel(
-                    this, ContentType.TEXT_PLAIN, "text_0.txt",
-                    slideshow.getLayout().getTextRegion());
-            slideshow.get(0).add(text);
-        }
-    }
-
-    private void drawBottomPanel(int attachmentType) {
-        // Reset the counter for text editor.
-        resetCounter();
-
-        switch (attachmentType) {
-            case AttachmentEditor.EMPTY:
-                throw new IllegalArgumentException(
-                        "Type of the attachment may not be EMPTY.");
-            case AttachmentEditor.SLIDESHOW_ATTACHMENT:
-                mBottomPanel.setVisibility(View.GONE);
-                findViewById(R.id.attachment_editor).requestFocus();
-                return;
-            default:
-                mBottomPanel.setVisibility(View.VISIBLE);
-                String text = null;
-                if (requiresMms()) {
-                    TextModel tm = mSlideshow.get(0).getText();
-                    if (tm != null) {
-                        text = tm.getText();
-                    }
-                } else {
-                    text = mMsgText;
-                }
-
-                if ((text != null) && !text.equals(mTextEditor.getText().toString())) {
-                    mTextEditor.setText(text);
-                }
-        }
-    }
-
-    //==========================================================
-    // Interface methods
-    //==========================================================
-
-    public void onClick(View v) {
-        if ((v == mSendButton) && isPreparedForSending()) {
-            confirmSendMessageIfNeeded();
-        }
-    }
-
-    private final TextWatcher mTextEditorWatcher = new TextWatcher() {
-        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-        }
-
-        public void onTextChanged(CharSequence s, int start, int before, int count) {
-            // This is a workaround for bug 1609057.  Since onUserInteraction() is
-            // not called when the user touches the soft keyboard, we pretend it was
-            // called when textfields changes.  This should be removed when the bug
-            // is fixed.
-            onUserInteraction();
-
-            String str = s.toString();
-
-            if (requiresMms()) {
-                // Update the content of the text model.
-                TextModel text = mSlideshow.get(0).getText();
-                if (text == null) {
-                    text = new TextModel(
-                                    ComposeMessageActivity.this,
-                                    ContentType.TEXT_PLAIN,
-                                    "text_0.txt",
-                                    mSlideshow.getLayout().getTextRegion()
-                           );
-                    mSlideshow.get(0).add(text);
-                }
-
-                if (!text.getText().equals(str)) {
-                    text.setText(str);
-                }
-            } else {
-                mMsgText = str;
-            }
-
-            updateSendButtonState();
-
-            updateCounter();
-        }
-
-        public void afterTextChanged(Editable s) {
-        }
-    };
-
-    //==========================================================
-    // Private methods
-    //==========================================================
-
-    /**
-     * Initialize all UI elements from resources.
-     */
-    private void initResourceRefs() {
-        mMsgListView = (MessageListView) findViewById(R.id.history);
-        mMsgListView.setDivider(null);      // no divider so we look like IM conversation.
-        mBottomPanel = findViewById(R.id.bottom_panel);
-        mTextEditor = (EditText) findViewById(R.id.embedded_text_editor);
-        mTextEditor.setOnKeyListener(mEmbeddedTextEditorKeyListener);
-        mTextEditor.addTextChangedListener(mTextEditorWatcher);
-        mTextCounter = (TextView) findViewById(R.id.text_counter);
-        mSendButton = (Button) findViewById(R.id.send_button);
-        mSendButton.setOnClickListener(this);
-        mTopPanel = findViewById(R.id.recipients_subject_linear);
-    }
-
-    private void confirmDeleteDialog(OnClickListener listener, boolean allMessages) {
-        AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        builder.setTitle(R.string.confirm_dialog_title);
-        builder.setIcon(android.R.drawable.ic_dialog_alert);
-        builder.setCancelable(true);
-        builder.setMessage(allMessages
-                ? R.string.confirm_delete_conversation
-                : R.string.confirm_delete_message);
-        builder.setPositiveButton(R.string.yes, listener);
-        builder.setNegativeButton(R.string.no, null);
-        builder.show();
-    }
-
-    void undeliveredMessageDialog(long date) {
-        String body;
-        LinearLayout dialog = (LinearLayout) LayoutInflater.from(this).inflate(
-                R.layout.retry_sending_dialog, null);
-
-        if (date >= 0) {
-            body = getString(R.string.undelivered_msg_dialog_body,
-                    MessageUtils.formatTimeStampString(this, date));
-        } else {
-            // FIXME: we can not get sms retry time.
-            body = getString(R.string.undelivered_sms_dialog_body);
-        }
-
-        ((TextView) dialog.findViewById(R.id.body_text_view)).setText(body);
-
-        Toast undeliveredDialog = new Toast(this);
-        undeliveredDialog.setView(dialog);
-        undeliveredDialog.setDuration(Toast.LENGTH_LONG);
-        undeliveredDialog.show();
-    }
-
-    private String deriveAddress(Intent intent) {
-        Uri recipientUri = intent.getData();
-        return (recipientUri == null)
-                ? null : recipientUri.getSchemeSpecificPart();
-    }
-
-    private Uri getThreadUri() {
-        return ContentUris.withAppendedId(Threads.CONTENT_URI, mThreadId);
-    }
-
-    private void startMsgListQuery() {
-        // Cancel any pending queries
-        mMsgListQueryHandler.cancelOperation(MESSAGE_LIST_QUERY_TOKEN);
-        try {
-            // Kick off the new query
-            mMsgListQueryHandler.startQuery(
-                    MESSAGE_LIST_QUERY_TOKEN, null, getThreadUri(),
-                    PROJECTION, null, null, null);
-        } catch (SQLiteException e) {
-            SqliteWrapper.checkSQLiteException(this, e);
-        }
-    }
-
-    private void initMessageList(boolean startNewQuery) {
-        // Initialize the list adapter with a null cursor.
-        mMsgListAdapter = new MessageListAdapter(
-                this, null, mMsgListView, true, getThreadType());
-        mMsgListAdapter.setOnDataSetChangedListener(mDataSetChangedListener);
-        mMsgListAdapter.setMsgListItemHandler(mMessageListItemHandler);
-        mMsgListView.setAdapter(mMsgListAdapter);
-        mMsgListView.setItemsCanFocus(false);
-        mMsgListView.setVisibility(View.VISIBLE);
-        mMsgListView.setOnCreateContextMenuListener(mMsgListMenuCreateListener);
-        mMsgListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                ((MessageListItem) view).onMessageListItemClick();
-            }
-        });
-
-        // Initialize the async query handler for the message list.
-        if (mMsgListQueryHandler == null) {
-            mMsgListQueryHandler = new MsgListQueryHandler(mContentResolver);
-        }
-
-        if (startNewQuery) {
-            startMsgListQuery();
-        }
-    }
-
-    private Uri createTemporaryMmsMessage() throws MmsException {
-        SendReq sendReq = new SendReq();
-        fillMessageHeaders(sendReq);
-        PduBody pb = mSlideshow.toPduBody();
-        sendReq.setBody(pb);
-        Uri res = mPersister.persist(sendReq, Mms.Draft.CONTENT_URI);
-        mSlideshow.sync(pb);
-        return res;
-    }
-
-    private void updateTemporaryMmsMessage(final boolean showToast) {
-        if (mMessageUri == null) {
-            try {
-                mMessageUri = createTemporaryMmsMessage();
-            } catch (MmsException e) {
-                Log.e(TAG, "updateTemporaryMmsMessage: cannot createTemporaryMmsMessage.", e);
-            }
-        } else {
-            SendReq sendReq = new SendReq();
-            fillMessageHeaders(sendReq);
-            mPersister.updateHeaders(mMessageUri, sendReq);
-            final PduBody pb = mSlideshow.toPduBody();
-
-            // PduPersister makes database calls and is known to ANR. Do the work on a
-            // background thread.
-            new Thread(new Runnable() {
-                public void run() {
-                    synchronized (mPersister) {
-                        try {
-                            mPersister.updateParts(mMessageUri, pb);
-                            if (showToast) {
-                                runOnUiThread(new Runnable() {
-                                    public void run() {
-                                        Toast.makeText(ComposeMessageActivity.this,
-                                                R.string.message_saved_as_draft,
-                                                Toast.LENGTH_SHORT).show();
-                                    }
-                                });
-                            }
-                        } catch (MmsException e) {
-                            Log.e(TAG, "updateTemporaryMmsMessage: cannot update message.", e);
-                        }
-                    }
-                }
-            }).run();
-
-            mSlideshow.sync(pb);
-        }
-        deleteTemporarySmsMessage(mThreadId);
-    }
-
-    private static final String[] SMS_BODY_PROJECTION = { Sms._ID, Sms.BODY };
-    private static final String SMS_DRAFT_WHERE = Sms.TYPE + "=" + Sms.MESSAGE_TYPE_DRAFT;
-    
-    /**
-     * Reads a draft message for the given thread ID from the database,
-     * if there is one, deletes it from the database, and returns it.
-     * @return The draft message or an empty string.
-     */
-    private String readTemporarySmsMessage(long thread_id) {
-        // If it's an invalid thread, don't bother.
-        if (thread_id <= 0) {
-            return "";
-        }
-
-        Uri thread_uri = ContentUris.withAppendedId(Sms.Conversations.CONTENT_URI, thread_id);
-        String body = "";
-        
-        Cursor c = SqliteWrapper.query(this, mContentResolver,
-                        thread_uri, SMS_BODY_PROJECTION, SMS_DRAFT_WHERE, null, null);
-        if (c != null) {
-            try {
-                if (c.moveToFirst()) {
-                    body = c.getString(1);
-                }
-            } finally {
-                c.close();
-            }
-        }
-
-        // Clean out drafts for this thread -- if the recipient set changes,
-        // we will lose track of the original draft and be unable to delete
-        // it later.  The message will be re-saved if necessary upon exit of
-        // the activity.
-        SqliteWrapper.delete(this, mContentResolver, thread_uri, SMS_DRAFT_WHERE, null);
-
-        return body;
-    }
-
-    private void updateTemporarySmsMessage(long thread_id, String contents) {
-        // If we don't have a valid thread, there's nothing to do.
-        if (thread_id <= 0) {
-            return;
-        }
-
-        // Don't bother saving an empty message.
-        if (TextUtils.isEmpty(contents)) {
-            // But delete the old temporary message if it's there.
-            deleteTemporarySmsMessage(thread_id);
-            return;
-        }
-        Uri thread_uri = ContentUris.withAppendedId(Sms.Conversations.CONTENT_URI, thread_id);
-        Cursor c = SqliteWrapper.query(this, mContentResolver,
-                thread_uri, SMS_BODY_PROJECTION, SMS_DRAFT_WHERE, null, null);
-
-        if (c.moveToFirst()) {
-            ContentValues values = new ContentValues(1);
-            values.put(Sms.BODY, contents);
-            SqliteWrapper.update(this, mContentResolver, thread_uri, values, SMS_DRAFT_WHERE, null);
-        } else {
-            ContentValues values = new ContentValues(3);
-            values.put(Sms.THREAD_ID, thread_id);
-            values.put(Sms.BODY, contents);
-            values.put(Sms.TYPE, Sms.MESSAGE_TYPE_DRAFT);
-            SqliteWrapper.insert(this, mContentResolver,
-                    Sms.CONTENT_URI, values);
-            deleteTemporaryMmsMessage(thread_id);
-        }
-
-        c.close();
-    }
-
-    private void deleteTemporarySmsMessage(long threadId) {
-        SqliteWrapper.delete(this, mContentResolver,
-                ContentUris.withAppendedId(Sms.Conversations.CONTENT_URI, threadId),
-                SMS_DRAFT_WHERE, null);
-    }
-
-    private void deleteTemporaryMmsMessage(long threadId) {
-        final String where = Mms.THREAD_ID + " = " + threadId;
-        SqliteWrapper.delete(this, mContentResolver, Mms.Draft.CONTENT_URI, where, null);
-    }
-
-    private String[] fillMessageHeaders(SendReq sendReq) {
-        // Set the numbers in the 'TO' field.
-        String[] dests = mRecipientList.getToNumbers();
-        EncodedStringValue[] encodedNumbers = encodeStrings(dests);
-        if (encodedNumbers != null) {
-            sendReq.setTo(encodedNumbers);
-        }
-
-        // Set the numbers in the 'BCC' field.
-        encodedNumbers = encodeStrings(mRecipientList.getBccNumbers());
-        if (encodedNumbers != null) {
-            sendReq.setBcc(encodedNumbers);
-        }
-
-        // Set the subject of the message.
-        String subject = (mSubjectTextEditor == null)
-                ? "" : mSubjectTextEditor.getText().toString();
-        sendReq.setSubject(new EncodedStringValue(subject));
-
-        // Update the 'date' field of the message before sending it.
-        sendReq.setDate(System.currentTimeMillis() / 1000L);
-
-        return dests;
-    }
-
-    private boolean hasRecipient() {
-        return hasValidRecipient() || hasInvalidRecipient();
-    }
-
-    private boolean hasValidRecipient() {
-        // If someone is in the recipient list, or if a valid recipient is
-        // currently in the recipients editor, we have recipients.
-        return (mRecipientList.hasValidRecipient())
-                 || ((mRecipientsEditor != null)
-                         && Recipient.isValid(mRecipientsEditor.getText().toString()));
-    }
-
-    private boolean hasInvalidRecipient() {
-        return (mRecipientList.hasInvalidRecipient())
-                 || ((mRecipientsEditor != null)
-                         && !TextUtils.isEmpty(mRecipientsEditor.getText().toString())
-                         && !Recipient.isValid(mRecipientsEditor.getText().toString()));
-    }
-
-    private boolean hasText() {
-        return mTextEditor.length() > 0;
-    }
-
-    private boolean hasSubject() {
-        return (null != mSubjectTextEditor)
-                && !TextUtils.isEmpty(mSubjectTextEditor.getText().toString());
-    }
-
-    private boolean isPreparedForSending() {
-        return hasRecipient() && (hasAttachment() || hasText());
-    }
-
-    private boolean preSendingMessage() {
-        // Nothing to do here for SMS.
-        
-        // needSaveAsMms will convert a message that is solely a Mms message because it has
-        // an empty subject back into an Sms message. Doesn't notify the user of the conversion.
-        if (!needSaveAsMms() && !requiresMms()) {
-            return true;
-        }
-
-        // Update contents of the message before sending it.
-        updateTemporaryMmsMessage(false);
-        return true;
-    }
-
-    private void sendMessage() {
-        boolean failed = false;
-
-        if (!preSendingMessage()) {
-            return;
-        }
-
-        String[] dests = fillMessageHeaders(new SendReq());
-        MessageSender msgSender = requiresMms()
-                ? new MmsMessageSender(this, mMessageUri)
-                : new SmsMessageSender(this, dests, mMsgText, mThreadId);
-
-        try {
-            if (!msgSender.sendMessage(mThreadId) && (mMessageUri != null)) {
-                // The message was sent through SMS protocol, we should
-                // delete the copy which was previously saved in MMS drafts.
-                SqliteWrapper.delete(this, mContentResolver, mMessageUri, null, null);
-            }
-        } catch (MmsException e) {
-            Log.e(TAG, "Failed to send message: " + mMessageUri, e);
-            // TODO Indicate this error to user(for example, show a warning
-            // icon beside the message.
-            failed = true;
-        } catch (Exception e) {
-            Log.e(TAG, "Failed to send message: " + mMessageUri, e);
-            // TODO Indicate this error to user(for example, show a warning
-            // icon beside the message.
-            failed = true;
-        } finally {
-            if (mExitOnSent) {
-                mMsgText = "";
-                mMessageUri = null;
-                finish();
-            } else if (!failed) {
-                postSendingMessage();
-            }
-        }
-    }
-
-    private long getOrCreateThreadId(String[] numbers) {
-        HashSet<String> recipients = new HashSet<String>();
-        recipients.addAll(Arrays.asList(numbers));
-        return Threads.getOrCreateThreadId(this, recipients);
-    }
-
-    private void postSendingMessage() {
-        if (!requiresMms()) {
-            // This should not be necessary because we delete the draft
-            // message from the database at the time we read it back,
-            // but I am paranoid.
-            deleteTemporarySmsMessage(mThreadId);
-        }
-
-        // Make the attachment editor hide its view before we destroy it.
-        if (mAttachmentEditor != null) {
-            mAttachmentEditor.hideView();
-        }
-
-        // Focus to the text editor.
-        mTextEditor.requestFocus();
-
-        // Setting mMessageUri to null here keeps the conversion back to
-        // SMS from deleting the "unnecessary" MMS in the database.
-        mMessageUri = null;
-
-        // We have to remove the text change listener while the text editor gets cleared and
-        // we subsequently turn the message back into SMS. When the listener is listening while
-        // doing the clearing, it's fighting to update its counts and itself try and turn
-        // the message one way or the other.
-        mTextEditor.removeTextChangedListener(mTextEditorWatcher);
-
-        // Clear the text box.
-        TextKeyListener.clear(mTextEditor.getText());
-
-        if (0 == (RECIPIENTS_REQUIRE_MMS & mMessageState)) {
-            // Start a new message as an SMS.
-            convertMessage(false);
-            mMsgText = "";  // must clear mMsgText because uninitMmsComponents (called from
-                            // convertMessage) resets mMsgText text from the text in the attachment
-                            // editor's slideshow. If mMsgText is not cleared, drawBottomPanel
-                            // will put mMsgText back into the compose text field.
-        } else {
-            // Start a new message as an MMS
-            refreshMmsComponents();
-        }
-
-        drawBottomPanel(AttachmentEditor.TEXT_ONLY);
-
-        // "Or not", in this case.
-        updateSendButtonState();
-
-        String[] numbers = mRecipientList.getToNumbers();
-        long threadId = getOrCreateThreadId(numbers);
-        if (threadId > 0) {
-            if (mRecipientsEditor != null) {
-                mRecipientsEditor.setVisibility(View.GONE);
-                hideTopPanelIfNecessary();
-            }
-
-            if ((mMsgListAdapter == null) || (threadId != mThreadId)) {
-                mThreadId = threadId;
-                initMessageList(true);
-            }
-        } else {
-            Log.e(TAG, "Failed to find/create thread with: "
-                    + Arrays.toString(numbers));
-            finish();
-            return;
-        }
-        // Our changes are done. Let the listener respond to text changes once again.
-        mTextEditor.addTextChangedListener(mTextEditorWatcher);
-        
-        // Close the soft on-screen keyboard if we're in landscape mode so the user can see the
-        // conversation.
-        if (mIsLandscape) {
-            InputMethodManager inputMethodManager = 
-                (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
-            
-            inputMethodManager.hideSoftInputFromWindow(mTextEditor.getWindowToken(), 0);
-        }
-   }
-
-    private void updateSendButtonState() {
-        boolean enable = false;
-        if (isPreparedForSending()) {
-            // When the type of attachment is slideshow, we should
-            // also hide the 'Send' button since the slideshow view
-            // already has a 'Send' button embedded.
-            if ((mAttachmentEditor == null) ||
-                (mAttachmentEditor.getAttachmentType() != AttachmentEditor.SLIDESHOW_ATTACHMENT)) {
-                enable = true;
-            } else {
-                mAttachmentEditor.setCanSend(true);
-            }
-        } else if (null != mAttachmentEditor){
-            mAttachmentEditor.setCanSend(false);
-        }
-
-        mSendButton.setEnabled(enable);
-        mSendButton.setFocusable(enable);
-    }
-
-    private long getMessageDate(Uri uri) {
-        if (uri != null) {
-            Cursor cursor = SqliteWrapper.query(this, mContentResolver,
-                    uri, new String[] { Mms.DATE }, null, null, null);
-            if (cursor != null) {
-                try {
-                    if ((cursor.getCount() == 1) && cursor.moveToFirst()) {
-                        return cursor.getLong(0) * 1000L;
-                    }
-                } finally {
-                    cursor.close();
-                }
-            }
-        }
-        return NO_DATE_FOR_DIALOG;
-    }
-
-    private void setSubjectFromIntent(Intent intent) {
-        String subject = intent.getStringExtra("subject");
-        if ( !TextUtils.isEmpty(subject) ) {
-            mSubject = subject;
-        }
-    }
-
-    private void initActivityState(Bundle savedInstanceState, Intent intent) {
-        if (savedInstanceState != null) {
-            mThreadId = savedInstanceState.getLong("thread_id", 0);
-            mMessageUri = (Uri) savedInstanceState.getParcelable("msg_uri");
-            mExternalAddress = savedInstanceState.getString("address");
-            mComposeMode = savedInstanceState.getBoolean("compose_mode", false);
-            mExitOnSent = savedInstanceState.getBoolean("exit_on_sent", false);
-            mSubject = savedInstanceState.getString("subject");
-            mMsgText = savedInstanceState.getString("sms_body");
-        } else {
-            mThreadId = intent.getLongExtra("thread_id", 0);
-            mMessageUri = (Uri) intent.getParcelableExtra("msg_uri");
-            if ((mMessageUri == null) && (mThreadId == 0)) {
-                // If we haven't been given a thread id or a URI in the extras,
-                // get it out of the intent.
-                Uri uri = intent.getData();
-                if ((uri != null) && (uri.getPathSegments().size() >= 2)) {
-                    try {
-                        mThreadId = Long.parseLong(uri.getPathSegments().get(1));
-                    } catch (NumberFormatException exception) {
-                        Log.e(TAG, "Thread ID must be a Long.");
-                    }
-                }
-            }
-            mExternalAddress = intent.getStringExtra("address");
-            mComposeMode = intent.getBooleanExtra("compose_mode", false);
-            mExitOnSent = intent.getBooleanExtra("exit_on_sent", false);
-            mMsgText = intent.getStringExtra("sms_body");
-
-            setSubjectFromIntent(intent);
-        }
-
-        if (!TextUtils.isEmpty(mSubject)) {
-            updateState(HAS_SUBJECT, true);
-        }
-
-        // If there was not a body already, start with a blank one.
-        if (mMsgText == null) {
-            mMsgText = "";
-        }
-
-        if (mExternalAddress == null) {
-            if (mThreadId > 0L) {
-                mExternalAddress = MessageUtils.getAddressByThreadId(
-                        this, mThreadId);
-            } else {
-                mExternalAddress = deriveAddress(intent);
-                // Even if we end up creating a thread here and the user
-                // discards the message, we will clean it up later when we
-                // delete obsolete threads.
-                if (!TextUtils.isEmpty(mExternalAddress)) {
-                    mThreadId = Threads.getOrCreateThreadId(this, mExternalAddress);
-                }
-            }
-        }
-    }
-
-    private int getThreadType() {
-        boolean isMms = (mMessageUri != null) || requiresMms();
-
-        return (!isMms
-                && (mRecipientList != null)
-                && (mRecipientList.size() > 1))
-                ? Threads.BROADCAST_THREAD
-                : Threads.COMMON_THREAD;
-    }
-
-    private void updateWindowTitle() {
-        StringBuilder sb = new StringBuilder();
-        Iterator<Recipient> iter = mRecipientList.iterator();
-        while (iter.hasNext()) {
-            Recipient r = iter.next();
-            sb.append(r.nameAndNumber).append(", ");;
-        }
-
-        ContactInfoCache cache = ContactInfoCache.getInstance();
-        String[] values = mRecipientList.getBccNumbers();
-        if (values.length > 0) {
-            sb.append("Bcc: ");
-            for (String v : values) {
-                sb.append(cache.getContactName(this, v)).append(", ");
-            }
-        }
-
-        if (sb.length() > 0) {
-            // Delete the trailing ", " characters.
-            int tail = sb.length() - 2;
-            setTitle(sb.delete(tail, tail + 2).toString());
-        } else {
-            setTitle(getString(R.string.compose_title));
-        }
-    }
-
-    private void initFocus() {
-        if (!mIsKeyboardOpen) {
-            return;
-        }
-
-        // If the recipients editor is visible, there is nothing in it,
-        // and the text editor is not already focused, focus the
-        // recipients editor.
-        if (isRecipientsEditorVisible() && TextUtils.isEmpty(mRecipientsEditor.getText())
-                                        && !mTextEditor.isFocused()) {
-            mRecipientsEditor.requestFocus();
-            return;
-        }
-
-        // If we decided not to focus the recipients editor, focus the text editor.
-        mTextEditor.requestFocus();
-    }
-
-    private final MessageListAdapter.OnDataSetChangedListener
-                    mDataSetChangedListener = new MessageListAdapter.OnDataSetChangedListener() {
-        public void onDataSetChanged(MessageListAdapter adapter) {
-            mPossiblePendingNotification = true;
-        }
-    };
-
-    private void checkPendingNotification() {
-        if (mPossiblePendingNotification && hasWindowFocus()) {
-            // start async query so as not to slow down user input
-            Uri.Builder builder = Threads.CONTENT_URI.buildUpon();
-            builder.appendQueryParameter("simple", "true");
-            mMsgListQueryHandler.startQuery(
-                    THREAD_READ_QUERY_TOKEN, null, builder.build(),
-                    new String[] { Threads.READ },
-                    "_id=" + mThreadId, null, null);
-
-            mPossiblePendingNotification = false;
-        }
-    }
-
-    private final class MsgListQueryHandler extends AsyncQueryHandler {
-        public MsgListQueryHandler(ContentResolver contentResolver) {
-            super(contentResolver);
-        }
-
-        @Override
-        protected void onQueryComplete(int token, Object cookie, Cursor cursor) {
-            switch(token) {
-                case MESSAGE_LIST_QUERY_TOKEN:
-                    synchronized (mMsgListCursorLock) {
-                        if (cursor != null) {
-                            mMsgListCursor = cursor;
-                            mMsgListAdapter.changeCursor(cursor);
-                        } else {
-                            if (mMsgListCursor != null) {
-                                mMsgListCursor.close();
-                            }
-                            Log.e(TAG, "Cannot init the cursor for the message list.");
-                            finish();
-                        }
-
-                        // Once we have completed the query for the message history, if
-                        // there is nothing in the cursor and we are not composing a new
-                        // message, we must be editing a draft in a new conversation.
-                        // Show the recipients editor to give the user a chance to add
-                        // more people before the conversation begins.
-                        if (mMsgListCursor.getCount() == 0 && !isRecipientsEditorVisible()) {
-                            initRecipientsEditor();
-                        }
-
-                        // FIXME: freshing layout changes the focused view to an unexpected
-                        // one, set it back to TextEditor forcely.
-                        mTextEditor.requestFocus();
-                    }
-                    return;
-
-                case THREAD_READ_QUERY_TOKEN:
-                    boolean isRead = (cursor.moveToFirst() && (cursor.getInt(0) == 1));
-                    if (!isRead) {
-                        MessageUtils.handleReadReport(
-                                ComposeMessageActivity.this, mThreadId,
-                                PduHeaders.READ_STATUS_READ, null);
-
-                        MessageUtils.markAsRead(ComposeMessageActivity.this, mThreadId);
-                    }
-                    cursor.close();
-                    return;
-            }
-        }
-
-        @Override
-        protected void onDeleteComplete(int token, Object cookie, int result) {
-            switch(token) {
-            case DELETE_MESSAGE_TOKEN:
-            case DELETE_CONVERSATION_TOKEN:
-                // Update the notification for new messages since they
-                // may be deleted.
-                MessagingNotification.updateNewMessageIndicator(
-                        ComposeMessageActivity.this);
-                // Update the notification for failed messages since they
-                // may be deleted.
-                MessagingNotification.updateSendFailedNotification(
-                        ComposeMessageActivity.this);
-                break;
-            }
-
-            if (token == DELETE_CONVERSATION_TOKEN) {
-                ComposeMessageActivity.this.discardTemporaryMessage();
-                ComposeMessageActivity.this.finish();
-            }
-        }
-    }
-
-    private void showSmileyDialog() {
-        if (mSmileyDialog == null) {
-            int[] icons = SmileyParser.DEFAULT_SMILEY_RES_IDS;
-            String[] names = getResources().getStringArray(
-                    SmileyParser.DEFAULT_SMILEY_NAMES);
-            final String[] texts = getResources().getStringArray(
-                    SmileyParser.DEFAULT_SMILEY_TEXTS);
-
-            final int N = names.length;
-
-            List<Map<String, ?>> entries = new ArrayList<Map<String, ?>>();
-            for (int i = 0; i < N; i++) {
-                // We might have different ASCII for the same icon, skip it if
-                // the icon is already added.
-                boolean added = false;
-                for (int j = 0; j < i; j++) {
-                    if (icons[i] == icons[j]) {
-                        added = true;
-                        break;
-                    }
-                }
-                if (!added) {
-                    HashMap<String, Object> entry = new HashMap<String, Object>();
-
-                    entry. put("icon", icons[i]);
-                    entry. put("name", names[i]);
-                    entry.put("text", texts[i]);
-
-                    entries.add(entry);
-                }
-            }
-
-            final SimpleAdapter a = new SimpleAdapter(
-                    this,
-                    entries,
-                    R.layout.smiley_menu_item,
-                    new String[] {"icon", "name", "text"},
-                    new int[] {R.id.smiley_icon, R.id.smiley_name, R.id.smiley_text});
-            SimpleAdapter.ViewBinder viewBinder = new SimpleAdapter.ViewBinder() {
-                public boolean setViewValue(View view, Object data, String textRepresentation) {
-                    if (view instanceof ImageView) {
-                        Drawable img = getResources().getDrawable((Integer)data);
-                        ((ImageView)view).setImageDrawable(img);
-                        return true;
-                    }
-                    return false;
-                }
-            };
-            a.setViewBinder(viewBinder);
-
-            AlertDialog.Builder b = new AlertDialog.Builder(this);
-
-            b.setTitle(getString(R.string.menu_insert_smiley));
-
-            b.setCancelable(true);
-            b.setAdapter(a, new DialogInterface.OnClickListener() {
-                public final void onClick(DialogInterface dialog, int which) {
-                    HashMap<String, Object> item = (HashMap<String, Object>) a.getItem(which);
-                    mTextEditor.append((String)item.get("text"));
-                }
-            });
-
-            mSmileyDialog = b.create();
-        }
-
-        mSmileyDialog.show();
-    }
-}
diff --git a/src/com/android/mms/ui/ConfirmRateLimitActivity.java b/src/com/android/mms/ui/ConfirmRateLimitActivity.java
deleted file mode 100644
index 2f35215..0000000
--- a/src/com/android/mms/ui/ConfirmRateLimitActivity.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import static com.android.mms.util.RateController.RATE_LIMIT_CONFIRMED_ACTION;
-
-import com.android.mms.R;
-import com.android.mms.util.RateController;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Bundle;
-import android.os.Handler;
-import android.util.Config;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.Window;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-
-public class ConfirmRateLimitActivity extends Activity {
-    private static final String TAG = "ConfirmRateLimitActivity";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private long mCreateTime;
-    private Handler mHandler;
-    private Runnable mRunnable;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
-        setContentView(R.layout.confirm_rate_limit_activity);
-
-        Button button = (Button) findViewById(R.id.btn_yes);
-        button.setOnClickListener(new OnClickListener() {
-            public void onClick(View v) {
-                doAnswer(true);
-            }
-        });
-
-        button = (Button) findViewById(R.id.btn_no);
-        button.setOnClickListener(new OnClickListener() {
-            public void onClick(View v) {
-                doAnswer(false);
-            }
-        });
-
-        mHandler = new Handler();
-        mRunnable = new Runnable() {
-            public void run() {
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "Runnable executed.");
-                }
-                doAnswer(false);
-            }
-        };
-
-        mCreateTime = System.currentTimeMillis();
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-
-        long delay = mCreateTime - System.currentTimeMillis()
-                        + (RateController.ANSWER_TIMEOUT - 500);
-
-        if (delay <= 0) {
-            doAnswer(false);
-        } else if (mHandler != null) {
-            // Close this activity after certain seconds if no user action.
-            mHandler.postDelayed(mRunnable, delay);
-        }
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-
-        if (mHandler != null) {
-            mHandler.removeCallbacks(mRunnable);
-        }
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        if ((keyCode == KeyEvent.KEYCODE_BACK)
-                && (event.getRepeatCount() == 0)) {
-            doAnswer(false);
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    private void doAnswer(boolean answer) {
-        Intent intent = new Intent(RATE_LIMIT_CONFIRMED_ACTION);
-        intent.putExtra("answer", answer);
-        sendBroadcast(intent);
-        finish();
-    }
-}
diff --git a/src/com/android/mms/ui/ConversationHeader.java b/src/com/android/mms/ui/ConversationHeader.java
deleted file mode 100644
index e897495..0000000
--- a/src/com/android/mms/ui/ConversationHeader.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-/**
- * A holder class for a conversation header.
- */
-public class ConversationHeader {
-    private long mThreadId;
-    private String mSubject;
-    private String mDate;
-    private boolean mHasAttachment;
-    private boolean mIsRead;
-    private boolean mHasError;
-    private boolean mHasDraft;
-    private int mMessageCount;
-
-    // Guards access to both mViewWaitingForFromChange and mFrom:
-    private final Object mFromLock = new Object();
-
-    // The formatted "from" display that the user sees.  May be null
-    // if the contact name(s) aren't loaded yet.
-    private String mFrom;
-
-    // Optional callback to run when mFrom changes.  This is used to
-    // update ConversationHeaderView asynchronously.  The view registers
-    // with the header using setOnFromChanged() below.
-    private ConversationHeaderView mViewWaitingForFromChange;
-
-    // Needed because it's Parcelable
-    public ConversationHeader() {
-    }
-
-    public ConversationHeader(
-            long threadId,
-            String from,  // may be null to signal async loading
-            String subject,
-            String date,
-            boolean isRead,
-            boolean hasError,
-            boolean hasDraft,
-            int messageCount)
-    {
-        mThreadId = threadId;
-        mFrom = from;  // may be null
-        mSubject = subject != null ? subject : "";
-        mDate = date != null ? date : "";
-        mIsRead = isRead;
-        mHasError = hasError;
-        mHasDraft = hasDraft;
-        mMessageCount = messageCount;
-    }
-
-    /**
-     * @return Returns the ID of the thread.
-     */
-    public long getThreadId() {
-        return mThreadId;
-    }
-
-    /**
-     * @return Returns the date.
-     */
-    public String getDate() {
-        return mDate;
-    }
-
-    /**
-     * @return Returns the from.  (formatted for display)
-     */
-    public String getFrom() {
-        synchronized (mFromLock) {
-            return mFrom;
-        }
-    }
-
-    public void setFrom(String from) {
-        synchronized (mFromLock) {
-            mFrom = from;
-            conditionallyRunFromChangedCallback();
-        }
-    }
-
-    /**
-     * Called by the {@link ConversationHeaderView} when it wants to
-     * register for updates to the model (only the from name of which
-     * is mutable.
-     */
-    public void setWaitingView(ConversationHeaderView headerView) {
-        synchronized (mFromLock) {
-            mViewWaitingForFromChange = headerView;
-            conditionallyRunFromChangedCallback();
-        }
-    }
-
-    private void conditionallyRunFromChangedCallback() {
-        synchronized (mFromLock) {
-            if (mViewWaitingForFromChange != null && mFrom != null) {
-                mViewWaitingForFromChange.onHeaderLoaded(this);
-                mViewWaitingForFromChange = null;
-            }
-        }
-    }
-
-    /**
-     * @return Returns the subject.
-     */
-    public String getSubject() {
-        return mSubject;
-    }
-
-    /**
-     * @return Returns the hasAttachment.
-     */
-    public boolean hasAttachment() {
-        return mHasAttachment;
-    }
-
-    /**
-     * @return Returns the isRead.
-     */
-    public boolean isRead() {
-        return mIsRead;
-    }
-
-    /**
-     * @return Whether the thread has a transmission error.
-     */
-    public boolean hasError() {
-        return mHasError;
-    }
-
-    /**
-     * @return Whether the thread has a draft.
-     */
-    public boolean hasDraft() {
-        return mHasDraft;
-    }
-
-    /**
-     * @return message count of the thread.
-     */
-    public int getMessageCount() {
-        return mMessageCount;
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see java.lang.Object#toString()
-     */
-    @Override
-    public String toString() {
-        return "[ConversationHeader from:" + getFrom() + " subject:" + getSubject()
-        + "]";
-    }
-}
diff --git a/src/com/android/mms/ui/ConversationHeaderView.java b/src/com/android/mms/ui/ConversationHeaderView.java
deleted file mode 100644
index 4c45c6d..0000000
--- a/src/com/android/mms/ui/ConversationHeaderView.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-
-import android.content.Context;
-import android.graphics.Typeface;
-import android.os.Handler;
-import android.text.Spannable;
-import android.text.SpannableStringBuilder;
-import android.text.style.ForegroundColorSpan;
-import android.text.style.TextAppearanceSpan;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.View;
-import android.widget.RelativeLayout;
-import android.widget.TextView;
-
-/**
- * This class manages the view for given conversation.
- */
-public class ConversationHeaderView extends RelativeLayout {
-    private static final String TAG = "ConversationHeaderView";
-    private static final boolean DEBUG = false;
-
-    private TextView mSubjectView;
-    private TextView mFromView;
-    private TextView mDateView;
-    private View mAttachmentView;
-    private View mUnreadIndicator;
-    private View mErrorIndicator;
-
-    // For posting UI update Runnables from other threads:
-    private Handler mHandler = new Handler();
-
-    // Access to mConversationHeader is guarded by mConversationHeaderLock.
-    private final Object mConversationHeaderLock = new Object();
-    private ConversationHeader mConversationHeader;
-
-    public ConversationHeaderView(Context context) {
-        super(context);
-    }
-
-    public ConversationHeaderView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-
-        mFromView = (TextView) findViewById(R.id.from);
-        mSubjectView = (TextView) findViewById(R.id.subject);
-
-        mDateView = (TextView) findViewById(R.id.date);
-        mAttachmentView = findViewById(R.id.attachment);
-        mUnreadIndicator = findViewById(R.id.unread_indicator);
-        mErrorIndicator = findViewById(R.id.error);
-    }
-
-    public ConversationHeader getConversationHeader() {
-        synchronized (mConversationHeaderLock) {
-            return mConversationHeader;
-        }
-    }
-
-    private void setConversationHeader(ConversationHeader header) {
-        synchronized (mConversationHeaderLock) {
-            mConversationHeader = header;
-        }
-    }
-
-    /**
-     * Only used for header binding.
-     */
-    public void bind(String title, String explain) {
-        mFromView.setText(title);
-        mSubjectView.setText(explain);
-    }
-
-    private CharSequence formatMessage(ConversationHeader ch) {
-        final int size = android.R.style.TextAppearance_Small;
-        final int color = android.R.styleable.Theme_textColorSecondary;
-        String from = ch.getFrom();
-        if (from == null) {
-            // The temporary text users see while the names of contacts are loading.
-            // TODO: evaluate a better or prettier solution for this?
-            from = "...";
-        }
-        SpannableStringBuilder buf = new SpannableStringBuilder(from);
-
-        if (ch.getMessageCount() > 1) {
-            buf.append(" (" + ch.getMessageCount() + ") ");
-        }
-
-        int before = buf.length();
-        if (ch.hasDraft()) {
-            buf.append(" ");
-            buf.append(mContext.getResources().getString(R.string.has_draft));
-            buf.setSpan(new TextAppearanceSpan(mContext, size, color), before,
-                    buf.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
-            buf.setSpan(new ForegroundColorSpan(
-                    mContext.getResources().getColor(R.drawable.text_color_red)),
-                    before, buf.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
-        }
-        return buf;
-    }
-
-    // Called by another thread that loaded an updated
-    // ConversationHeader for us.  Note, however, that this view
-    // might've been re-used for a different header in the meantime,
-    // so we have to double-check that we still want this header.
-    public void onHeaderLoaded(final ConversationHeader newHeader) {
-        synchronized (mConversationHeaderLock) {
-            if (mConversationHeader != newHeader) {
-                // The user scrolled away before the item loaded and
-                // this view has been repurposed.
-                return;
-            }
-
-            // TODO: as an optimization, send a message to mHandler instead
-            // of posting a Runnable.
-            mHandler.post(new Runnable() {
-                    public void run() {
-                        synchronized (mConversationHeaderLock) {
-                            if (mConversationHeader == newHeader) {
-                                mFromView.setText(formatMessage(newHeader));
-                            }
-                        }
-                    }
-                });
-        }
-    }
-
-    public final void bind(Context context, final ConversationHeader ch) {
-        if (DEBUG) Log.v(TAG, "bind()");
-
-        ConversationHeader oldHeader = getConversationHeader();
-        setConversationHeader(ch);
-
-        mAttachmentView.setVisibility(ch.hasAttachment() ? VISIBLE : GONE);
-
-        // Date
-        mDateView.setText(ch.getDate());
-
-        // From.
-        mFromView.setText(formatMessage(ch));
-
-        // The From above may be incomplete (still loading), so we register ourselves
-        // as a callback later to get woken up in onHeaderLoaded() when it changes.
-        if (ch.getFrom() == null) {
-            ch.setWaitingView(this);
-        }
-
-        boolean isRead = ch.isRead();
-
-        // Change font-face only if required.
-        if (oldHeader == null || oldHeader.isRead() != isRead) {
-            Typeface typeFace = isRead
-                    ? Typeface.DEFAULT
-                    : Typeface.DEFAULT_BOLD;
-            mDateView.setTypeface(typeFace);
-            mFromView.setTypeface(typeFace);
-        }
-
-        mUnreadIndicator.setVisibility(isRead ? INVISIBLE : VISIBLE);
-
-        // Subject
-        mSubjectView.setText(ch.getSubject());
-
-        // Transmission error indicator.
-        mErrorIndicator.setVisibility(ch.hasError() ? VISIBLE : GONE);
-    }
-}
diff --git a/src/com/android/mms/ui/ConversationList.java b/src/com/android/mms/ui/ConversationList.java
deleted file mode 100644
index dc69f13..0000000
--- a/src/com/android/mms/ui/ConversationList.java
+++ /dev/null
@@ -1,591 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.android.mms.transaction.MessagingNotification;
-import com.android.mms.util.ContactInfoCache;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.app.AlertDialog;
-import android.app.ListActivity;
-import android.content.AsyncQueryHandler;
-import android.content.ContentResolver;
-import android.content.ContentUris;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.DialogInterface.OnClickListener;
-import android.content.res.Configuration;
-import android.database.ContentObserver;
-import android.database.Cursor;
-import android.database.sqlite.SQLiteException;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Handler;
-import android.provider.Contacts;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.Sms;
-import android.provider.Telephony.Threads;
-import android.provider.Telephony.Sms.Conversations;
-import android.text.TextUtils;
-import android.util.Config;
-import android.util.Log;
-import android.view.ContextMenu;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.Window;
-import android.view.ContextMenu.ContextMenuInfo;
-import android.view.View.OnCreateContextMenuListener;
-import android.view.View.OnKeyListener;
-import android.widget.AdapterView;
-import android.widget.ListView;
-
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * This activity provides a list view of existing conversations.
- */
-public class ConversationList extends ListActivity {
-    private static final String TAG = "ConversationList";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = Config.LOGV && DEBUG;
-
-    private static final int THREAD_LIST_QUERY_TOKEN = 1701;
-    private static final int SEARCH_TOKEN            = 1702;
-
-    private static final int DELETE_CONVERSATION_TOKEN = 1801;
-    
-    // IDs of the main menu items.
-    private static final int MENU_COMPOSE_NEW            = 0;
-    private static final int MENU_SEARCH                 = 1;
-    private static final int MENU_DELETE_ALL             = 3;
-    private static final int MENU_PREFERENCES            = 4;
-    private static final int MENU_VIEW_BROADCAST_THREADS = 5;
-
-    // IDs of the context menu items for the list of conversations.
-    public static final int MENU_DELETE               = 0;
-    private static final int MENU_VIEW                 = 1;
-
-    private Cursor mCursor;
-    private ThreadListQueryHandler mQueryHandler;
-    private ConversationListAdapter mListAdapter;
-    private CharSequence mTitle;
-    private Uri mBaseUri;
-    private String mQuery;
-    private String[] mProjection;
-    private int mQueryToken;
-    private String mFilter;
-    private boolean mSearchFlag;
-    private CachingNameStore mCachingNameStore;
-
-    /**
-     * An interface that's passed down to ListAdapters to use
-     * for looking up the names of contact numbers.
-     */
-    public static interface CachingNameStore {
-        // Returns comma-separated list of contact's display names
-        // given a semicolon-delimited string of canonical phone
-        // numbers.
-        public String getContactNames(String addresses);
-    }
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
-        setContentView(R.layout.conversation_list_screen);
-
-        mQueryHandler = new ThreadListQueryHandler(getContentResolver());
-
-        ListView listView = getListView();
-        LayoutInflater inflater = LayoutInflater.from(this);
-        ConversationHeaderView headerView = (ConversationHeaderView)
-                inflater.inflate(R.layout.conversation_header, listView, false);
-        headerView.bind(getString(R.string.new_message),
-                getString(R.string.create_new_message));
-        listView.addHeaderView(headerView, null, true);
-
-        listView.setOnCreateContextMenuListener(mConvListOnCreateContextMenuListener);
-        listView.setOnKeyListener(mThreadListKeyListener);
-
-        mCachingNameStore = new CachingNameStoreImpl(this);
-
-        if (savedInstanceState != null) {
-            mBaseUri = (Uri) savedInstanceState.getParcelable("base_uri");
-            mSearchFlag = savedInstanceState.getBoolean("search_flag");
-            mFilter = savedInstanceState.getString("filter");
-            mQueryToken = savedInstanceState.getInt("query_token");
-        }
-        
-        if (isFailedToDeliver(getIntent())) {
-            // Cancel any failed message notifications
-            MessagingNotification.cancelNotification(getApplicationContext(),
-                        MessagingNotification.MESSAGE_FAILED_NOTIFICATION_ID);
-        }
-
-        handleCreationIntent(getIntent());
-    }
-
-    static public boolean isFailedToDeliver(Intent intent) {
-        return (intent != null) && intent.getBooleanExtra("undelivered_flag", false);
-    }
-
-    @Override
-    protected void onNewIntent(Intent intent) {
-        // Handle intents that occur after the activity has already been created.
-        handleCreationIntent(intent);
-    }
-
-    protected void handleCreationIntent(Intent intent) {
-        // Handle intents that occur upon creation of the activity.
-        initNormalQueryArgs();
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-
-        if (mListAdapter != null) {
-            mListAdapter.initDraftCache();  // we might have a draft now
-            mListAdapter.registerObservers();
-        }
-
-        getContentResolver().delete(Threads.OBSOLETE_THREADS_URI, null, null);
-
-        startAsyncQuery();
-    }
-
-    @Override
-    protected void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-
-        outState.putParcelable("base_uri", mBaseUri);
-        outState.putInt("query_token", mQueryToken);
-        outState.putBoolean("search_flag", mSearchFlag);
-        if (mSearchFlag) {
-            outState.putString("filter", mFilter);
-        }
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-
-        if (mListAdapter != null) {
-            mListAdapter.unregisterObservers();
-        }
-    }
-
-    @Override
-    protected void onStop() {
-        super.onStop();
-
-        if (mCursor != null) {
-            if (mListAdapter != null) {
-                mListAdapter.changeCursor(null);
-            }
-            mCursor.close();
-            mCursor = null;
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-
-        if (mCursor != null) {
-            mCursor.close();
-        }
-    }
-
-    private void initNormalQueryArgs() {
-        Uri.Builder builder = Threads.CONTENT_URI.buildUpon();
-        builder.appendQueryParameter("simple", "true");
-        mBaseUri = builder.build();
-        mQuery = null;
-        mProjection = ConversationListAdapter.PROJECTION;
-        mQueryToken = THREAD_LIST_QUERY_TOKEN;
-        mTitle = getString(R.string.app_label);
-    }
-
-    private void startAsyncQuery() {
-        try {
-            setTitle(getString(R.string.refreshing));
-            setProgressBarIndeterminateVisibility(true);
-
-            mQueryHandler.cancelOperation(THREAD_LIST_QUERY_TOKEN);
-            // FIXME: I have to pass the mQueryToken as cookie since the
-            // AsyncQueryHandler.onQueryComplete() method doesn't provide
-            // the same token as what I input here.
-            mQueryHandler.startQuery(0, mQueryToken, mBaseUri, mProjection, mQuery, null,
-                    Conversations.DEFAULT_SORT_ORDER);
-        } catch (SQLiteException e) {
-            SqliteWrapper.checkSQLiteException(this, e);
-        }
-    }
-
-    @Override
-    public boolean onPrepareOptionsMenu(Menu menu) {
-        menu.clear();
-
-        menu.add(0, MENU_COMPOSE_NEW, 0, R.string.menu_compose_new).setIcon(
-                com.android.internal.R.drawable.ic_menu_compose);
-        // Removed search as part of b/1205708
-        //menu.add(0, MENU_SEARCH, 0, R.string.menu_search).setIcon(
-        //        R.drawable.ic_menu_search).setAlphabeticShortcut(SearchManager.MENU_KEY);
-        if ((mCursor != null) && (mCursor.getCount() > 0) && !mSearchFlag) {
-            menu.add(0, MENU_DELETE_ALL, 0, R.string.menu_delete_all).setIcon(
-                    android.R.drawable.ic_menu_delete);
-        }
-
-        menu.add(0, MENU_PREFERENCES, 0, R.string.menu_preferences).setIcon(
-                android.R.drawable.ic_menu_preferences);
-
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch(item.getItemId()) {
-            case MENU_COMPOSE_NEW:
-                createNewMessage();
-                break;
-            case MENU_SEARCH:
-                onSearchRequested();
-                break;
-            case MENU_DELETE_ALL:
-                confirmDeleteDialog(new DeleteThreadListener(-1L), true);
-                break;
-            case MENU_PREFERENCES: {
-                Intent intent = new Intent(this, MessagingPreferenceActivity.class);
-                startActivityIfNeeded(intent, -1);
-                break;
-            }
-            default:
-                return true;
-        }
-        return false;
-    }
-
-    @Override
-    protected void onListItemClick(ListView l, View v, int position, long id) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "onListItemClick: position=" + position + ", id=" + id);
-        }
-
-        if (position == 0) {
-            createNewMessage();
-        } else if (v instanceof ConversationHeaderView) {
-            ConversationHeaderView headerView = (ConversationHeaderView) v;
-            ConversationHeader ch = headerView.getConversationHeader();
-
-            // TODO: The 'from' view of the ConversationHeader was
-            // repurposed to be the cached display value, rather than
-            // the old raw value, which openThread() wanted.  But it
-            // turns out openThread() doesn't need it:
-            // ComposeMessageActivity will load it.  That's not ideal,
-            // though, as it's an SQLite query.  So fix this later to
-            // save some latency on starting ComposeMessageActivity.
-            String somethingDelimitedAddresses = null;
-            openThread(ch.getThreadId(), somethingDelimitedAddresses);
-        }
-    }
-
-    private void createNewMessage() {
-        Intent intent = new Intent(this, ComposeMessageActivity.class);
-        startActivity(intent);
-    }
-
-    private void openThread(long threadId, String address) {
-        Intent intent = new Intent(this, ComposeMessageActivity.class);
-        intent.putExtra("thread_id", threadId);
-        if (!TextUtils.isEmpty(address)) {
-            intent.putExtra("address", address);
-        }
-        startActivity(intent);
-    }
-
-    private final OnCreateContextMenuListener mConvListOnCreateContextMenuListener =
-        new OnCreateContextMenuListener() {
-        public void onCreateContextMenu(ContextMenu menu, View v,
-                ContextMenuInfo menuInfo) {
-            if ((mCursor != null) && (mCursor.getCount() > 0) && !mSearchFlag) {
-                String address = MessageUtils.getRecipientsByIds(
-                        ConversationList.this,
-                        mCursor.getString(ConversationListAdapter.COLUMN_RECIPIENTS_IDS));
-                // The Recipient IDs column is separated with semicolons for some reason.
-                // We should fix this in the content provider rework.
-                CharSequence from = (ContactInfoCache.getInstance().getContactName(
-                        ConversationList.this, address)).replace(';', ',');
-                menu.setHeaderTitle(from);
-
-                AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
-                if (info.position > 0) {
-                    menu.add(0, MENU_VIEW, 0, R.string.menu_view);
-                    menu.add(0, MENU_DELETE, 0, R.string.menu_delete);
-                }
-            }
-        }
-    };
-
-    @Override
-    public boolean onContextItemSelected(MenuItem item) {
-        long threadId = mCursor.getLong(ConversationListAdapter.COLUMN_ID);
-        switch (item.getItemId()) {
-            case MENU_DELETE: {
-                DeleteThreadListener l = new DeleteThreadListener(threadId);
-                confirmDeleteDialog(l, false);
-                break;
-            }
-            case MENU_VIEW: {
-                String address = null;
-                if (mListAdapter.isSimpleMode()) {
-                    address = MessageUtils.getRecipientsByIds(
-                                this,
-                                mCursor.getString(ConversationListAdapter.COLUMN_RECIPIENTS_IDS));
-                } else {
-                    String msgType = mCursor.getString(ConversationListAdapter.COLUMN_MESSAGE_TYPE);
-                    if (msgType.equals("sms")) {
-                        address = mCursor.getString(ConversationListAdapter.COLUMN_SMS_ADDRESS);
-                    } else {
-                        address = MessageUtils.getAddressByThreadId(this, threadId);
-                   }
-                }
-                openThread(threadId, address);
-                break;
-            }
-            default:
-                break;
-        }
-
-        return super.onContextItemSelected(item);
-    }
-
-    public void onConfigurationChanged(Configuration newConfig) {
-        // We override this method to avoid restarting the entire
-        // activity when the keyboard is opened (declared in
-        // AndroidManifest.xml).  Because the only translatable text
-        // in this activity is "New Message", which has the full width
-        // of phone to work with, localization shouldn't be a problem:
-        // no abbreviated alternate words should be needed even in
-        // 'wide' languages like German or Russian.
-
-        super.onConfigurationChanged(newConfig);
-        if (DEBUG) Log.v(TAG, "onConfigurationChanged: " + newConfig);
-    }
-
-    private void confirmDeleteDialog(OnClickListener listener, boolean deleteAll) {
-        AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        builder.setTitle(R.string.confirm_dialog_title);
-        builder.setIcon(android.R.drawable.ic_dialog_alert);
-        builder.setCancelable(true);
-        builder.setPositiveButton(R.string.yes, listener);
-        builder.setNegativeButton(R.string.no, null);
-        builder.setMessage(deleteAll
-                ? R.string.confirm_delete_all_conversations
-                : R.string.confirm_delete_conversation);
-
-        builder.show();
-    }
-
-    private final OnKeyListener mThreadListKeyListener = new OnKeyListener() {
-        public boolean onKey(View v, int keyCode, KeyEvent event) {
-            if (event.getAction() == KeyEvent.ACTION_DOWN) {
-                switch (keyCode) {
-                    case KeyEvent.KEYCODE_DEL: {
-                        long id = getListView().getSelectedItemId();
-                        if (id > 0) {
-                            DeleteThreadListener l = new DeleteThreadListener(
-                                    id);
-                            confirmDeleteDialog(l, false);
-                        }
-                        return true;
-                    }
-                    case KeyEvent.KEYCODE_BACK: {
-                        if (mSearchFlag) {
-                            mSearchFlag = false;
-                            initNormalQueryArgs();
-                            startAsyncQuery();
-
-                            return true;
-                        }
-                        break;
-                    }
-                }
-            }
-            return false;
-        }
-    };
-
-    private class DeleteThreadListener implements OnClickListener {
-        private final Uri mDeleteUri;
-        private final long mThreadId;
-
-        public DeleteThreadListener(long threadId) {
-            mThreadId = threadId;
-
-            if (threadId != -1) {
-                mDeleteUri = ContentUris.withAppendedId(
-                        Threads.CONTENT_URI, threadId);
-            } else {
-                mDeleteUri = Threads.CONTENT_URI;
-            }
-        }
-
-        public void onClick(DialogInterface dialog, int whichButton) {
-            MessageUtils.handleReadReport(ConversationList.this, mThreadId,
-                    PduHeaders.READ_STATUS__DELETED_WITHOUT_BEING_READ, new Runnable() {
-                public void run() {
-                    mQueryHandler.startDelete(DELETE_CONVERSATION_TOKEN,
-                            null, mDeleteUri, null, null);
-                }
-            });
-        }
-    }
-
-    private final class ThreadListQueryHandler extends AsyncQueryHandler {
-        public ThreadListQueryHandler(ContentResolver contentResolver) {
-            super(contentResolver);
-        }
-
-        @Override
-        protected void onQueryComplete(int token, Object cookie, Cursor cursor) {
-            if (mCursor != null) {
-                mCursor.close();
-            }
-
-            if (cursor != null) {
-                mCursor = cursor;
-                switch ((Integer) cookie) {
-                    case THREAD_LIST_QUERY_TOKEN:
-                        mListAdapter = new ConversationListAdapter(
-                                ConversationList.this,
-                                cursor,
-                                true,  // simple (non-search)
-                                mListAdapter,
-                                mCachingNameStore);
-                        break;
-                    case SEARCH_TOKEN:
-                        mListAdapter = new ConversationListAdapter(
-                                ConversationList.this,
-                                cursor,
-                                false,  // non-simple (search)
-                                mListAdapter,
-                                mCachingNameStore);
-                        break;
-                    default:
-                        Log.e(TAG, "Bad query token: " + token);
-                        break;
-                }
-
-                ConversationList.this.setListAdapter(mListAdapter);
-            } else {
-                Log.e(TAG, "Cannot init the cursor for the thread list.");
-                finish();
-            }
-
-            setTitle(mTitle);
-            setProgressBarIndeterminateVisibility(false);
-        }
-
-        @Override
-        protected void onDeleteComplete(int token, Object cookie, int result) {
-            switch (token) {
-            case DELETE_CONVERSATION_TOKEN:
-                // Update the notification for new messages since they
-                // may be deleted.
-                MessagingNotification.updateNewMessageIndicator(ConversationList.this);
-                // Update the notification for failed messages since they
-                // may be deleted.
-                MessagingNotification.updateSendFailedNotification(ConversationList.this);
-                
-                // Make sure the list reflects the delete
-                startAsyncQuery();
-
-                onContentChanged();
-                break;
-            }
-        }
-    }
-
-    /**
-     * This implements the CachingNameStore interface defined above
-     * which we pass down to each newly-created ListAdapater, so they
-     * share a common, reused cached between activity resumes, not
-     * having to hit the Contacts providers all the time.
-     */
-    private static final class CachingNameStoreImpl implements CachingNameStore {
-        private static final String TAG = "ConversationList/CachingNameStoreImpl";
-        private final ConcurrentHashMap<String, String> mCachedNames =
-                new ConcurrentHashMap<String, String>();
-        private final ContentObserver mPhonesObserver;
-        private final Context mContext;
-
-        public CachingNameStoreImpl(Context ctxt) {
-            mContext = ctxt;
-            mPhonesObserver = new ContentObserver(new Handler()) {
-                    @Override
-                    public void onChange(boolean selfUpdate) {
-                        mCachedNames.clear();
-                    }
-                };
-            ctxt.getContentResolver().registerContentObserver(
-                    Contacts.Phones.CONTENT_URI,
-                    true, mPhonesObserver);
-        }
-
-        // Returns comma-separated list of contact's display names
-        // given a semicolon-delimited string of canonical phone
-        // numbers, getting data either from cache or via a blocking
-        // call to a provider.
-        public String getContactNames(String addresses) {
-            String value = mCachedNames.get(addresses);
-            if (value != null) {
-                return value;
-            }
-            String[] values = addresses.split(";");
-            if (values.length < 2) {
-                if (DEBUG) Log.v(TAG, "Looking up name: " + addresses);
-                ContactInfoCache cache = ContactInfoCache.getInstance();
-                value = (cache.getContactName(mContext, addresses)).replace(';', ',');
-            } else {
-                int length = 0;
-                for (int i = 0; i < values.length; ++i) {
-                    values[i] = getContactNames(values[i]);
-                    length += values[i].length() + 2;  // 2 for ", "
-                }
-                StringBuilder sb = new StringBuilder(length);
-                sb.append(values[0]);
-                for (int i = 1; i < values.length; ++i) {
-                    sb.append(", ");
-                    sb.append(values[i]);
-                }
-                value = sb.toString();
-            }
-            mCachedNames.put(addresses, value);
-            return value;
-        }
-
-    }
-}
diff --git a/src/com/android/mms/ui/ConversationListAdapter.java b/src/com/android/mms/ui/ConversationListAdapter.java
deleted file mode 100644
index 57a72c8..0000000
--- a/src/com/android/mms/ui/ConversationListAdapter.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.Context;
-import android.database.Cursor;
-import android.provider.BaseColumns;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.MmsSms;
-import android.provider.Telephony.Sms;
-import android.provider.Telephony.Threads;
-import android.provider.Telephony.Mms.Part;
-import android.provider.Telephony.Sms.Conversations;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.CursorAdapter;
-
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Stack;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-
-/**
- * The back-end data adapter for ConversationList.
- */
-//TODO: This should be public class ConversationListAdapter extends ArrayAdapter<Conversation>
-public class ConversationListAdapter extends CursorAdapter {
-    private static final String TAG = "ConversationListAdapter";
-    private static final boolean LOCAL_LOGV = false;
-
-    static final String[] PROJECTION = new String[] {
-        Threads._ID,                      // 0
-        Threads.MESSAGE_COUNT,            // 1
-        Threads.RECIPIENT_IDS,            // 2
-        Threads.DATE,                     // 3
-        Threads.READ,                     // 4
-        Threads.SNIPPET,                  // 5
-        Threads.SNIPPET_CHARSET,          // 6
-        Threads.ERROR                     // 7
-    };
-
-    static final int COLUMN_ID             = 0;
-    static final int COLUMN_MESSAGE_COUNT  = 1;
-    static final int COLUMN_RECIPIENTS_IDS = 2;
-    static final int COLUMN_DATE           = 3;
-    static final int COLUMN_READ           = 4;
-    static final int COLUMN_SNIPPET        = 5;
-    static final int COLUMN_SNIPPET_CHARSET = 6;
-    static final int COLUMN_ERROR          = 7;
-
-    static final String[] DRAFT_PROJECTION = new String[] {
-        Threads._ID,                      // 0
-        Conversations.THREAD_ID           // 1
-    };
-
-    static final int COLUMN_DRAFT_THREAD_ID = 1;
-
-    static final String[] SEARCH_PROJECTION = new String[] {
-        MmsSms.TYPE_DISCRIMINATOR_COLUMN, // 0
-        BaseColumns._ID,                  // 1
-        Conversations.THREAD_ID,          // 2
-        // For SMS
-        Sms.ADDRESS,                      // 3
-        Sms.BODY,                         // 4
-        Sms.DATE,                         // 5
-        Sms.READ,                         // 6
-        Sms.TYPE,                         // 7
-        // For MMS
-        Mms.SUBJECT,                      // 8
-        Mms.SUBJECT_CHARSET,              // 9
-        Mms.DATE,                         // 10
-        Mms.READ,                         // 11
-        //Additional columns for searching
-        Part.FILENAME,                    // 12
-        Part.NAME,                        // 13
-    };
-
-    static final int COLUMN_MESSAGE_TYPE   = 0;
-    static final int COLUMN_MESSAGE_ID     = 1;
-    static final int COLUMN_THREAD_ID      = 2;
-    static final int COLUMN_SMS_ADDRESS    = 3;
-    static final int COLUMN_SMS_BODY       = 4;
-    static final int COLUMN_SMS_DATE       = 5;
-    static final int COLUMN_SMS_READ       = 6;
-    static final int COLUMN_SMS_TYPE       = 7;
-    static final int COLUMN_MMS_SUBJECT    = 8;
-    static final int COLUMN_MMS_SUBJECT_CHARSET = 9;
-    static final int COLUMN_MMS_DATE       = 10;
-    static final int COLUMN_MMS_READ       = 11;
-
-    private final LayoutInflater mFactory;
-    private final boolean mSimpleMode;
-
-    // Null if there's no drafts
-    private HashSet<Long> mDraftSet = null;
-
-    // Cache of space-separated recipient ids of a thread to the final
-    // display version.
-
-    // TODO: if you rename a contact or something, it'll cache the old
-    // name (or raw number) forever in here, never listening to
-    // changes from the contacts provider.  We should instead move away
-    // towards using only the CachingNameStore, which does respect
-    // contacts provider updates.
-    private final Map<String, String> mThreadDisplayFrom;
-
-    // For async loading of display names.
-    private final ScheduledThreadPoolExecutor mAsyncLoader;
-    private final Stack<Runnable> mThingsToLoad = new Stack<Runnable>();
-    // We execute things in LIFO order, so as users scroll around during loading,
-    // they get the most recently-requested item.
-    private final Runnable mPopStackRunnable = new Runnable() {
-            public void run() {
-                Runnable r = null;
-                synchronized (mThingsToLoad) {
-                    if (!mThingsToLoad.empty()) {
-                        r = mThingsToLoad.pop();
-                    }
-                }
-                if (r != null) {
-                    r.run();
-                }
-            }
-        };
-
-    private final ConversationList.CachingNameStore mCachingNameStore;
-
-    public ConversationListAdapter(Context context, Cursor cursor, boolean simple,
-                                   ConversationListAdapter oldListAdapter,
-                                   ConversationList.CachingNameStore nameStore) {
-        super(context, cursor, true /* auto-requery */);
-        mSimpleMode = simple;
-        mFactory = LayoutInflater.from(context);
-        mCachingNameStore = nameStore;
-
-        // Inherit the old one's cache.
-        if (oldListAdapter != null) {
-            mThreadDisplayFrom = oldListAdapter.mThreadDisplayFrom;
-            // On a new query from the ConversationListActivity, as an
-            // optimization we try to re-use the previous
-            // ListAdapter's threadpool executor, if it's not too
-            // back-logged in work.  (somewhat arbitrarily four
-            // outstanding requests) It could be backlogged if the
-            // user had a ton of conversation thread IDs and was
-            // scrolling up & down the list faster than the provider
-            // could keep up.  In that case, we opt not to re-use this
-            // thread and executor and instead create a new one.
-            if (oldListAdapter.mAsyncLoader.getQueue().size() < 4) {
-                mAsyncLoader = oldListAdapter.mAsyncLoader;
-            } else {
-                // It was too back-logged.  Ditch that threadpool and create
-                // a new one.
-                oldListAdapter.mAsyncLoader.shutdownNow();
-                mAsyncLoader = new ScheduledThreadPoolExecutor(1);
-            }
-        } else {
-            mThreadDisplayFrom = new ConcurrentHashMap<String, String>();
-            // 1 thread.  SQLite can't do better anyway.
-            mAsyncLoader = new ScheduledThreadPoolExecutor(1);
-        }
-
-        // Learn all the drafts up-front.  There shouldn't be many.
-        initDraftCache();
-    }
-
-    // To be called whenever the drafts might've changed.
-    public void initDraftCache() {
-        Cursor cursor = SqliteWrapper.query(
-                mContext,
-                mContext.getContentResolver(),
-                MmsSms.CONTENT_DRAFT_URI,
-                DRAFT_PROJECTION, null, null, null);
-        if (LOCAL_LOGV) Log.v(TAG, "initDraftCache.");
-        mDraftSet = null;  // null until we have our first draft
-        if (cursor == null) {
-            Log.v(TAG, "initDraftCache -- cursor was null.");
-        }
-        try {
-            if (cursor.moveToFirst()) {
-                if (mDraftSet == null) {
-                    // low initial capacity (unlikely to be many drafts)
-                    mDraftSet = new HashSet<Long>(4);
-                }
-                for (; !cursor.isAfterLast(); cursor.moveToNext()) {
-                    long threadId = cursor.getLong(COLUMN_DRAFT_THREAD_ID);
-                    mDraftSet.add(new Long(threadId));
-                    if (LOCAL_LOGV) Log.v(TAG, "  .. threadid with a draft: " + threadId);
-                }
-            }
-        } finally {
-            cursor.close();
-        }
-    }
-
-    /**
-     * Returns cached name of thread (display form of list of
-     * recipients) or returns null if the nullIfNotCached and there's
-     * nothing in the cache.  The UI thread calls this in "immediate
-     * mode" with nullIfNotCached set true, but the background loader
-     * thread calls it with nullIfNotCached set false.
-     */
-    private String getFromText(Context context, String spaceSeparatedRcptIds,
-                               boolean nullIfNotCached) {
-        // Thread IDs could in-theory be reassigned to different
-        // recipients (if latest threadid was deleted and new
-        // auto-increment was assigned), so our cache key is the
-        // space-separated list of recipients IDs instead:
-        String value = mThreadDisplayFrom.get(spaceSeparatedRcptIds);
-        if (value != null) {
-            return value;
-        }
-
-        if (nullIfNotCached) {
-            // We're in the UI thread and don't want to block.
-            return null;
-        }
-
-        // Potentially blocking call to MmsSms provider, looking up
-        // canonical addresses:
-        String address = MessageUtils.getRecipientsByIds(
-                context, spaceSeparatedRcptIds);
-
-        // Potentially blocking call to Contacts provider, lookup up
-        // names:  (should usually be cached, though)
-        value = mCachingNameStore.getContactNames(address);
-
-        if (TextUtils.isEmpty(value)) {
-            value = mContext.getString(R.string.anonymous_recipient);
-        }
-
-        mThreadDisplayFrom.put(spaceSeparatedRcptIds, value);
-        return value;
-    }
-
-    @Override
-    public void bindView(View view, Context context, Cursor cursor) {
-        if (view instanceof ConversationHeaderView) {
-            ConversationHeaderView headerView = (ConversationHeaderView) view;
-            String from, subject;
-            long threadId, date;
-            boolean read, error;
-            int messageCount = 0;
-            String spaceSeparatedRcptIds = null;
-
-            if (mSimpleMode) {
-                threadId = cursor.getLong(COLUMN_ID);
-                spaceSeparatedRcptIds = cursor.getString(COLUMN_RECIPIENTS_IDS);
-                from = getFromText(context, spaceSeparatedRcptIds, true);
-                subject = MessageUtils.extractEncStrFromCursor(
-                        cursor, COLUMN_SNIPPET, COLUMN_SNIPPET_CHARSET);
-                date = cursor.getLong(COLUMN_DATE);
-                read = cursor.getInt(COLUMN_READ) != 0;
-                error = cursor.getInt(COLUMN_ERROR) != 0;
-                messageCount = cursor.getInt(COLUMN_MESSAGE_COUNT);
-            } else {
-                threadId = cursor.getLong(COLUMN_THREAD_ID);
-                String msgType = cursor.getString(COLUMN_MESSAGE_TYPE);
-                if (msgType.equals("sms")) {
-                    from = cursor.getString(COLUMN_SMS_ADDRESS);
-                    subject = cursor.getString(COLUMN_SMS_BODY);
-                    date = cursor.getLong(COLUMN_SMS_DATE);
-                    // FIXME: This is wrong! We cannot determine whether a
-                    // thread is read or not by the read flag of the latest
-                    // message in the thread.
-                    read = cursor.getInt(COLUMN_SMS_READ) != 0;
-                } else {
-                    from = MessageUtils.getAddressByThreadId(
-                            context, threadId);
-                    subject = MessageUtils.extractEncStrFromCursor(
-                            cursor, COLUMN_MMS_SUBJECT, COLUMN_MMS_SUBJECT_CHARSET);
-                    date = cursor.getLong(COLUMN_MMS_DATE) * 1000;
-                    read = cursor.getInt(COLUMN_MMS_READ) != 0;
-                }
-                error = false;
-                if (TextUtils.isEmpty(from)) {
-                    from = mContext.getString(R.string.anonymous_recipient);
-                }
-            }
-
-            String timestamp = MessageUtils.formatTimeStampString(
-                    context, date);
-
-            if (TextUtils.isEmpty(subject)) {
-                subject = mContext.getString(R.string.no_subject_view);
-            }
-
-            if (LOCAL_LOGV) Log.v(TAG, "pre-create ConversationHeader");
-            boolean hasDraft = mDraftSet != null &&
-                    mDraftSet.contains(new Long(threadId));
-
-            ConversationHeader ch = new ConversationHeader(
-                    threadId, from, subject, timestamp,
-                    read, error, hasDraft, messageCount);
-
-            headerView.bind(context, ch);
-
-            if (from == null && spaceSeparatedRcptIds != null) {
-                startAsyncDisplayFromLoad(context, ch, headerView, spaceSeparatedRcptIds);
-            }
-            if (LOCAL_LOGV) Log.v(TAG, "post-bind ConversationHeader");
-        } else {
-            Log.e(TAG, "Unexpected bound view: " + view);
-        }
-    }
-
-    private void startAsyncDisplayFromLoad(final Context context,
-                                           final ConversationHeader ch,
-                                           final ConversationHeaderView headerView,
-                                           final String spaceSeparatedRcptIds) {
-        synchronized (mThingsToLoad) {
-            mThingsToLoad.push(new Runnable() {
-                    public void run() {
-                        String fromText = getFromText(context, spaceSeparatedRcptIds, false);
-                        ch.setFrom(fromText);
-                    }
-                });
-        }
-        mAsyncLoader.execute(mPopStackRunnable);
-    }
-
-    @Override
-    public View newView(Context context, Cursor cursor, ViewGroup parent) {
-        if (LOCAL_LOGV) Log.v(TAG, "inflating new view");
-        return mFactory.inflate(R.layout.conversation_header, parent, false);
-    }
-
-    public boolean isSimpleMode() {
-        return mSimpleMode;
-    }
-
-    public void registerObservers() {
-        if (LOCAL_LOGV) Log.v(TAG, "registerObservers()");
-        if (mCursor != null) {
-            try {
-                mCursor.registerContentObserver(mChangeObserver);
-            } catch (IllegalStateException e) {
-                // FIXME: should use more graceful method to check whether the
-                // mChangeObserver have been registered before register it.
-                // Ignore IllegalStateException.
-            }
-            try {
-                mCursor.registerDataSetObserver(mDataSetObserver);
-            } catch (IllegalStateException e) {
-                // FIXME: should use more graceful method to check whether the
-                // mDataSetObserver have been registered before register it.
-                // Ignore IllegalStateException.
-            }
-        }
-    }
-
-    public void unregisterObservers() {
-        if (LOCAL_LOGV) Log.v(TAG, "unregisterObservers()");
-        if (mCursor != null) {
-            try {
-                mCursor.unregisterContentObserver(mChangeObserver);
-            } catch (IllegalStateException e) {
-                // FIXME: should use more graceful method to check whether the
-                // mChangeObserver have been unregistered before unregister it.
-                // Ignore IllegalStateException.
-            }
-            try {
-                mCursor.unregisterDataSetObserver(mDataSetObserver);
-            } catch (IllegalStateException e) {
-                // FIXME: should use more graceful method to check whether the
-                // mDataSetObserver have been unregistered before unregister it.
-                // Ignore IllegalStateException.
-            }
-        }
-    }
-
-    private boolean hasDraft(long threadId) {
-        String selection = Conversations.THREAD_ID + "=" + threadId;
-        Cursor cursor = SqliteWrapper.query(mContext,
-                            mContext.getContentResolver(), MmsSms.CONTENT_DRAFT_URI,
-                            DRAFT_PROJECTION, selection, null, null);
-        boolean result = (null != cursor) && cursor.moveToFirst();
-        cursor.close();
-        return result;
-    }
-
-    @Override
-    public void changeCursor(Cursor cursor) {
-        if (mCursor != null) {
-            mCursor.close();
-            mCursor = null;
-        }
-
-        super.changeCursor(cursor);
-    }
-}
diff --git a/src/com/android/mms/ui/DeliveryReportActivity.java b/src/com/android/mms/ui/DeliveryReportActivity.java
deleted file mode 100644
index 986c627..0000000
--- a/src/com/android/mms/ui/DeliveryReportActivity.java
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.android.mms.ui.RecipientList.Recipient;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.app.ListActivity;
-import android.content.Intent;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.Bundle;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.Sms;
-import android.telephony.PhoneNumberUtils;
-import android.text.TextUtils;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.Window;
-import android.widget.ListView;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * This is the UI for displaying a delivery report:
- *
- * This activity can handle the following parameters from the intent
- * by which it is launched:
- *
- * thread_id long The id of the conversation from which to get the recipients
- *      for the report.
- * message_id long The id of the message about which a report should be displayed.
- * message_type String The type of message (Sms or Mms).  This is used in
- *      conjunction with the message id to retrive the particular message that
- *      the report will be about.
- */
-public class DeliveryReportActivity extends ListActivity {
-    private static final String LOG_TAG = "DeliveryReportActivity";
-
-    static final String[] MMS_REPORT_REQUEST_PROJECTION = new String[] {
-        Mms.Addr.ADDRESS,       //0
-        Mms.DELIVERY_REPORT,    //1
-        Mms.READ_REPORT         //2
-    };
-
-    static final String[] MMS_REPORT_STATUS_PROJECTION = new String[] {
-        Mms.Addr.ADDRESS,       //0
-        "delivery_status",      //1
-        "read_status"           //2
-    };
-
-    static final String[] SMS_REPORT_STATUS_PROJECTION = new String[] {
-        Sms.ADDRESS,            //0
-        Sms.STATUS              //1
-    };
-
-    // These indices must sync up with the projections above.
-    static final int COLUMN_RECIPIENT           = 0;
-    static final int COLUMN_DELIVERY_REPORT     = 1;
-    static final int COLUMN_READ_REPORT         = 2;
-    static final int COLUMN_DELIVERY_STATUS     = 1;
-    static final int COLUMN_READ_STATUS         = 2;
-
-    private long mMessageId;
-    private String mMessageType;
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
-        setContentView(R.layout.delivery_report_activity);
-
-        Intent intent = getIntent();
-        mMessageId = getMessageId(icicle, intent);
-        mMessageType = getMessageType(icicle, intent);
-
-        initListView();
-        initListAdapter();
-    }
-
-    private void initListView() {
-        // Add the header for the list view.
-        LayoutInflater inflater = getLayoutInflater();
-        View header = inflater.inflate(R.layout.delivery_report_header, null);
-        getListView().addHeaderView(header, null, true);
-    }
-
-    private void initListAdapter() {
-        List<DeliveryReportItem> items = getReportItems();
-        if (items == null) {
-            items = new ArrayList<DeliveryReportItem>(1);
-            items.add(new DeliveryReportItem("", getString(R.string.status_none)));
-            Log.w(LOG_TAG, "cursor == null");
-        }
-        setListAdapter(new DeliveryReportAdapter(this, items));
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        refreshDeliveryReport();
-    }
-
-    private void refreshDeliveryReport() {
-        ListView list = getListView();
-        list.invalidateViews();
-        list.requestFocus();
-    }
-
-    private long getMessageId(Bundle icicle, Intent intent) {
-        long msgId = 0L;
-
-        if (icicle != null) {
-            msgId = icicle.getLong("message_id");
-        }
-
-        if (msgId == 0L) {
-            msgId = intent.getLongExtra("message_id", 0L);
-        }
-
-        return msgId;
-    }
-
-    private String getMessageType(Bundle icicle, Intent intent) {
-        String msgType = null;
-
-        if (icicle != null) {
-            msgType = icicle.getString("message_type");
-        }
-
-        if (msgType == null) {
-            msgType = intent.getStringExtra("message_type");
-        }
-
-        return msgType;
-    }
-
-    private List<DeliveryReportItem> getReportItems() {
-        if (mMessageType.equals("sms")) {
-            return getSmsReportItems();
-        } else {
-            return getMmsReportItems();
-        }
-    }
-
-    private List<DeliveryReportItem> getSmsReportItems() {
-        String selection = "_id = " + mMessageId;
-        Cursor c = SqliteWrapper.query(this, getContentResolver(), Sms.CONTENT_URI,
-                              SMS_REPORT_STATUS_PROJECTION, selection, null, null);
-        if (c == null) {
-            return null;
-        }
-
-        try {
-            if (c.getCount() <= 0) {
-                return null;
-            }
-
-            List<DeliveryReportItem> items = new ArrayList<DeliveryReportItem>();
-            while (c.moveToNext()) {
-                items.add(new DeliveryReportItem(
-                                getString(R.string.recipient_label) + c.getString(COLUMN_RECIPIENT),
-                                getString(R.string.status_label) + 
-                                    getSmsStatusText(c.getInt(COLUMN_DELIVERY_STATUS))));
-            }
-            return items;
-        } finally {
-            c.close();
-        }
-    }
-
-    private String getMmsReportStatusText(
-            MmsReportRequest request,
-            Map<String, MmsReportStatus> reportStatus) {
-        if (reportStatus == null) {
-            // haven't received any reports.
-            return getString(R.string.status_pending);
-        }
-
-        String recipient = request.getRecipient();
-        recipient = (Mms.isEmailAddress(recipient))?
-                Mms.extractAddrSpec(recipient): Recipient.filterPhoneNumber(recipient);
-        MmsReportStatus status = queryStatusByRecipient(reportStatus, recipient);
-        if (status == null) {
-            // haven't received any reports.
-            return getString(R.string.status_pending);
-        }
-
-        if (request.isReadReportRequested()) {
-            if (status.readStatus != 0) {
-                switch (status.readStatus) {
-                    case PduHeaders.READ_STATUS_READ:
-                        return getString(R.string.status_read);
-                    case PduHeaders.READ_STATUS__DELETED_WITHOUT_BEING_READ:
-                        return getString(R.string.status_unread);
-                }
-            }
-        }
-
-        switch (status.deliveryStatus) {
-            case 0: // No delivery report received so far.
-                return getString(R.string.status_pending);
-            case PduHeaders.STATUS_FORWARDED:
-            case PduHeaders.STATUS_RETRIEVED:
-                return getString(R.string.status_received);
-            case PduHeaders.STATUS_REJECTED:
-                return getString(R.string.status_rejected);
-            default:
-                return getString(R.string.status_failed);
-        }
-    }
-
-    private static MmsReportStatus queryStatusByRecipient(
-            Map<String, MmsReportStatus> status, String recipient) {
-        Set<String> recipientSet = status.keySet();
-        Iterator<String> iterator = recipientSet.iterator();
-        while (iterator.hasNext()) {
-            String r = iterator.next();
-            if (Mms.isEmailAddress(recipient)) {
-                if (TextUtils.equals(r, recipient)) {
-                    return status.get(r);
-                }
-            }
-            else if (PhoneNumberUtils.compare(r, recipient)) {
-                return status.get(r);
-            }
-        }
-        return null;
-    }
-
-    private List<DeliveryReportItem> getMmsReportItems() {
-        List<MmsReportRequest> reportReqs = getMmsReportRequests();
-        if (null == reportReqs) {
-            return null;
-        }
-
-        if (reportReqs.size() == 0) {
-            return null;
-        }
-
-        Map<String, MmsReportStatus> reportStatus = getMmsReportStatus();
-        List<DeliveryReportItem> items = new ArrayList<DeliveryReportItem>();
-        for (MmsReportRequest reportReq : reportReqs) {
-            String statusText = getString(R.string.status_label) + 
-                getMmsReportStatusText(reportReq, reportStatus);
-            items.add(new DeliveryReportItem(getString(R.string.recipient_label) + 
-                    reportReq.getRecipient(), statusText));
-        }
-        return items;
-    }
-
-    private Map<String, MmsReportStatus> getMmsReportStatus() {
-        Uri uri = Uri.withAppendedPath(Mms.REPORT_STATUS_URI,
-                                       String.valueOf(mMessageId));
-        Cursor c = SqliteWrapper.query(this, getContentResolver(), uri,
-                       MMS_REPORT_STATUS_PROJECTION, null, null, null);
-
-        if (c == null) {
-            return null;
-        }
-
-        try {
-            Map<String, MmsReportStatus> statusMap =
-                    new HashMap<String, MmsReportStatus>();
-
-            while (c.moveToNext()) {
-                String recipient = c.getString(COLUMN_RECIPIENT);
-                recipient = (Mms.isEmailAddress(recipient))?
-                                        Mms.extractAddrSpec(recipient):
-                                        Recipient.filterPhoneNumber(recipient);
-                MmsReportStatus status = new MmsReportStatus(
-                                        c.getInt(COLUMN_DELIVERY_STATUS),
-                                        c.getInt(COLUMN_READ_STATUS));
-                statusMap.put(recipient, status);
-            }
-            return statusMap;
-        } finally {
-            c.close();
-        }
-    }
-
-    private List<MmsReportRequest> getMmsReportRequests() {
-        Uri uri = Uri.withAppendedPath(Mms.REPORT_REQUEST_URI,
-                                       String.valueOf(mMessageId));
-        Cursor c = SqliteWrapper.query(this, getContentResolver(), uri,
-                      MMS_REPORT_REQUEST_PROJECTION, null, null, null);
-
-        if (c == null) {
-            return null;
-        }
-
-        try {
-            if (c.getCount() <= 0) {
-                return null;
-            }
-
-            List<MmsReportRequest> reqList = new ArrayList<MmsReportRequest>();
-            while (c.moveToNext()) {
-                reqList.add(new MmsReportRequest(
-                                c.getString(COLUMN_RECIPIENT),
-                                c.getInt(COLUMN_DELIVERY_REPORT),
-                                c.getInt(COLUMN_READ_REPORT)));
-            }
-            return reqList;
-        } finally {
-            c.close();
-        }
-    }
-
-    private String getSmsStatusText(int status) {
-        if (status == Sms.STATUS_NONE) {
-            // No delivery report requested
-            return getString(R.string.status_none);
-        } else if (status >= Sms.STATUS_FAILED) {
-            // Failure
-            return getString(R.string.status_failed);
-        } else if (status >= Sms.STATUS_PENDING) {
-            // Pending
-            return getString(R.string.status_pending);
-        } else {
-            // Success
-            return getString(R.string.status_received);
-        }
-    }
-
-    private static final class MmsReportStatus {
-        final int deliveryStatus;
-        final int readStatus;
-
-        public MmsReportStatus(int drStatus, int rrStatus) {
-            deliveryStatus = drStatus;
-            readStatus = rrStatus;
-        }
-    }
-
-    private static final class MmsReportRequest {
-        private final String mRecipient;
-        private final boolean mIsDeliveryReportRequsted;
-        private final boolean mIsReadReportRequested;
-
-        public MmsReportRequest(String recipient, int drValue, int rrValue) {
-            mRecipient = recipient;
-            mIsDeliveryReportRequsted = drValue == PduHeaders.VALUE_YES;
-            mIsReadReportRequested = rrValue == PduHeaders.VALUE_YES;
-        }
-
-        public String getRecipient() {
-            return mRecipient;
-        }
-
-        public boolean isDeliveryReportRequested() {
-            return mIsDeliveryReportRequsted;
-        }
-
-        public boolean isReadReportRequested() {
-            return mIsReadReportRequested;
-        }
-    }
-}
diff --git a/src/com/android/mms/ui/DeliveryReportAdapter.java b/src/com/android/mms/ui/DeliveryReportAdapter.java
deleted file mode 100644
index 45b307d..0000000
--- a/src/com/android/mms/ui/DeliveryReportAdapter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-package com.android.mms.ui;
-
-import com.android.mms.R;
-
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-
-import java.util.List;
-
-/**
- * The back-end data adapter for DeliveryReportActivity.
- */
-public class DeliveryReportAdapter extends ArrayAdapter<DeliveryReportItem> {
-    static final String LOG_TAG = "DeliveryReportAdapter";
-
-    public DeliveryReportAdapter(Context context, List<DeliveryReportItem> items) {
-        super(context, R.layout.delivery_report_list_item, R.id.recipient, items);
-    }
-
-    @Override
-    public View getView(int position, View view, ViewGroup viewGroup) {
-        DeliveryReportListItem listItem;
-        DeliveryReportItem item = this.getItem(position);
-
-        if (view == null) {
-            LayoutInflater factory = LayoutInflater.from(getContext());
-            listItem = (DeliveryReportListItem) factory.inflate(
-                    R.layout.delivery_report_list_item, viewGroup, false);
-        } else {
-            if (view instanceof DeliveryReportListItem) {
-                listItem = (DeliveryReportListItem) view;
-            } else {
-                return view;
-            }
-        }
-
-        listItem.bind(item.recipient, item.status);
-
-        return listItem;
-    }
-}
diff --git a/src/com/android/mms/ui/DeliveryReportItem.java b/src/com/android/mms/ui/DeliveryReportItem.java
deleted file mode 100644
index c7f397d..0000000
--- a/src/com/android/mms/ui/DeliveryReportItem.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-/**
- * This object holds information used by the DeliveryReportAdapter to create 
- * DeliveryReportListItems.
- */
-public class DeliveryReportItem {
-    String recipient;
-    String status;
-    
-    public DeliveryReportItem(String recipient, String status) {
-        this.recipient = recipient;
-        this.status = status;
-    }
-}
diff --git a/src/com/android/mms/ui/DeliveryReportListItem.java b/src/com/android/mms/ui/DeliveryReportListItem.java
deleted file mode 100644
index 29239d7..0000000
--- a/src/com/android/mms/ui/DeliveryReportListItem.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.android.mms.util.ContactInfoCache;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-/**
- * This class displays the status for a single recipient of a message.  It is used in
- * the ListView of DeliveryReportActivity.
- */
-public class DeliveryReportListItem extends LinearLayout {
-    private TextView mRecipientView;
-    private TextView mStatusView;
-    private ImageView mIconView;
-
-    DeliveryReportListItem(Context context) {
-        super(context);
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-
-        mRecipientView = (TextView) findViewById(R.id.recipient);
-        mStatusView = (TextView) findViewById(R.id.status);
-        mIconView = (ImageView) findViewById(R.id.icon);
-    }
-
-    public DeliveryReportListItem(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    public final void bind(String recipient, String status) {
-        ContactInfoCache cache = ContactInfoCache.getInstance();
-        Context context = getContext();
-        // Recipient
-        mRecipientView.setText(cache.getContactName(context, recipient));
-
-        // Status text
-        mStatusView.setText(cache.getContactName(context, status));
-
-        // Status icon
-        String receivedStr = context.getString(R.string.status_received);
-        String failedStr = context.getString(R.string.status_failed);
-        String pendingStr = context.getString(R.string.status_pending);
-        String rejectStr = context.getString(R.string.status_rejected);
-
-        if (status.compareTo(receivedStr) == 0) {
-            mIconView.setImageResource(R.drawable.ic_sms_mms_delivered);
-        } else if (status.compareTo(failedStr) == 0) {
-            mIconView.setImageResource(R.drawable.ic_sms_mms_not_delivered);
-        } else if (status.compareTo(pendingStr) == 0) {
-            mIconView.setImageResource(R.drawable.ic_sms_mms_pending);
-        } else if (status.compareTo(rejectStr) == 0) {
-            // FIXME: need replace ic_sms_mms_not_delivered by a rejected icon.
-            mIconView.setImageResource(R.drawable.ic_sms_mms_not_delivered);
-        } else {
-            // No status report or unknown
-        }
-    }
-}
diff --git a/src/com/android/mms/ui/EditSlideDurationActivity.java b/src/com/android/mms/ui/EditSlideDurationActivity.java
deleted file mode 100644
index 558ea3b..0000000
--- a/src/com/android/mms/ui/EditSlideDurationActivity.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Bundle;
-import android.text.InputFilter;
-import android.text.method.NumberKeyListener;
-import android.util.Config;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.Window;
-import android.view.View.OnClickListener;
-import android.view.View.OnKeyListener;
-import android.view.inputmethod.EditorInfo;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.TextView;
-
-import com.android.mms.R;
-
-/**
- * This activity provides the function to edit the duration of given slide.
- */
-public class EditSlideDurationActivity  extends Activity {
-    public static final String SLIDE_INDEX = "slide_index";
-    public static final String SLIDE_TOTAL = "slide_total";
-    public static final String SLIDE_DUR   = "dur";
-
-    private TextView mLabel;
-    private Button mDone;
-    private EditText mDur;
-
-    private int mCurSlide;
-    private int mTotal;
-
-    private Bundle mState;
-    //  State.
-    private final static String STATE = "state";
-    private final static String TAG = "EditSlideDurationActivity";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
-        setContentView(R.layout.edit_slide_duration);
-
-        int dur;
-        if (icicle == null) {
-            // Get extra from intent.
-            Intent intent = getIntent();
-            mCurSlide = intent.getIntExtra(SLIDE_INDEX, 1);
-            mTotal = intent.getIntExtra(SLIDE_TOTAL, 1);
-            dur = intent.getIntExtra(SLIDE_DUR, 8);
-        } else {
-            mState = icicle.getBundle(STATE);
-
-            mCurSlide = mState.getInt(SLIDE_INDEX, 1);
-            mTotal = mState.getInt(SLIDE_TOTAL, 1);
-            dur = mState.getInt(SLIDE_DUR, 8);
-        }
-
-        // Label.
-        mLabel = (TextView) findViewById(R.id.label);
-        mLabel.setText(getString(R.string.duration_selector_title) + " " + (mCurSlide + 1) + "/" + mTotal);
-
-        // Input text field.
-        mDur = (EditText) findViewById(R.id.text);
-        mDur.setText(String.valueOf(dur));
-        mDur.setOnKeyListener(mOnKeyListener);
-
-        // Done button.
-        mDone = (Button) findViewById(R.id.done);
-        mDone.setOnClickListener(mOnDoneClickListener);
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see android.app.Activity#onSaveInstanceState(android.os.Bundle)
-     */
-    @Override
-    protected void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-
-        mState = new Bundle();
-        mState.putInt(SLIDE_INDEX, mCurSlide);
-        mState.putInt(SLIDE_TOTAL, mTotal);
-        mState.putInt(SLIDE_DUR, Integer.parseInt(mDur.getText().toString()));
-
-        outState.putBundle(STATE, mState);
-    }
-
-    private final OnKeyListener mOnKeyListener = new OnKeyListener() {
-        public boolean onKey(View v, int keyCode, KeyEvent event) {
-            if (event.getAction() != KeyEvent.ACTION_DOWN) {
-                return false;
-            }
-
-            switch (keyCode) {
-                case KeyEvent.KEYCODE_DPAD_CENTER:
-                    // Edit complete.
-                    editDone();
-                    break;
-            }
-            return false;
-        }
-    };
-
-    private final OnClickListener mOnDoneClickListener = new OnClickListener() {
-        public void onClick(View v) {
-            // Edit complete.
-            editDone();
-        }
-    };
-
-    protected void editDone() {
-        // Set result to parent, and close window.
-        // Check the duration.
-        String dur = mDur.getText().toString();
-        try {
-            Integer.valueOf(dur);
-        } catch (NumberFormatException e) {
-            notifyUser("Invalid duration! Please input again.");
-            mDur.requestFocus();
-            mDur.selectAll();
-            return;
-        }
-
-        // Set result.
-        setResult(RESULT_OK, new Intent(mDur.getText().toString()));
-        finish();
-    }
-
-    private void notifyUser(String message) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "notifyUser: message=" + message);
-        }
-    }
-}
diff --git a/src/com/android/mms/ui/EditSlideTextActivity.java b/src/com/android/mms/ui/EditSlideTextActivity.java
deleted file mode 100644
index 0b384df..0000000
--- a/src/com/android/mms/ui/EditSlideTextActivity.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.os.Bundle;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.Window;
-import android.view.View.OnClickListener;
-import android.view.View.OnKeyListener;
-import android.widget.Button;
-import android.widget.EditText;
-import android.widget.TextView;
-
-import com.android.mms.R;
-
-/**
- * This activity provides the function to edit the text content of given slide.
- */
-public class EditSlideTextActivity extends Activity {
-    public static final String SLIDE_INDEX = "slide_index";
-    public static final String SLIDE_TOTAL = "slide_total";
-    public static final String TEXT_CONTENT = "text";
-
-    private TextView mLabel;
-    private Button mDone;
-    private EditText mText;
-
-    private int mCurSlide;
-    private int mTotal;
-
-    private Bundle mState;
-    //  State.
-    private final static String STATE = "state";
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
-        setContentView(R.layout.edit_slide_text);
-
-        String text;
-        if (icicle == null) {
-            // Get extra from intent.
-            Intent intent = getIntent();
-            mCurSlide = intent.getIntExtra(SLIDE_INDEX, 1);
-            mTotal = intent.getIntExtra(SLIDE_TOTAL, 1);
-            text = intent.getStringExtra(TEXT_CONTENT);
-        } else {
-            mState = icicle.getBundle(STATE);
-
-            mCurSlide = mState.getInt(SLIDE_INDEX, 1);
-            mTotal = mState.getInt(SLIDE_TOTAL, 1);
-            text = mState.getString(TEXT_CONTENT);
-        }
-
-        // Label.
-        mLabel = (TextView) findViewById(R.id.label);
-        mLabel.setText("Edit text for slide " + (mCurSlide + 1) + "/" + mTotal);
-
-        // Input text field.
-        mText = (EditText) findViewById(R.id.text);
-        mText.setText(text);
-        mText.setOnKeyListener(mOnKeyListener);
-
-        // Done button.
-        mDone = (Button) findViewById(R.id.done);
-        mDone.setOnClickListener(mOnDoneClickListener);
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see android.app.Activity#onSaveInstanceState(android.os.Bundle)
-     */
-    @Override
-    protected void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-
-        mState = new Bundle();
-        mState.putInt(SLIDE_INDEX, mCurSlide);
-        mState.putInt(SLIDE_TOTAL, mTotal);
-        mState.putString(TEXT_CONTENT, mText.getText().toString());
-
-        outState.putBundle(STATE, mState);
-    }
-
-    private final OnKeyListener mOnKeyListener = new OnKeyListener() {
-        public boolean onKey(View v, int keyCode, KeyEvent event) {
-            if (event.getKeyCode() != KeyEvent.ACTION_DOWN) {
-                return false;
-            }
-
-            switch (keyCode) {
-                case KeyEvent.KEYCODE_DPAD_CENTER:
-                    // Edit complete.
-                    editDone();
-                    break;
-            }
-            return false;
-        }
-    };
-
-    private final OnClickListener mOnDoneClickListener = new OnClickListener() {
-        public void onClick(View v) {
-            // Edit complete.
-            editDone();
-        }
-    };
-
-    protected void editDone() {
-        // Set result to parent, and close window.
-        setResult(RESULT_OK, new Intent(mText.getText().toString()));
-        finish();
-    }
-}
diff --git a/src/com/android/mms/ui/IconListAdapter.java b/src/com/android/mms/ui/IconListAdapter.java
deleted file mode 100644
index f99b956..0000000
--- a/src/com/android/mms/ui/IconListAdapter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import java.util.List;
-
-import com.android.mms.R;
-
-/**
- * An adapter to store icons.
- */
-public class IconListAdapter extends ArrayAdapter<IconListAdapter.IconListItem> {
-    protected LayoutInflater mInflater;
-    private static final int mResource = R.layout.icon_list_item;
-
-    public IconListAdapter(Context context,
-            List<IconListItem> items) {
-        super(context, mResource, items);
-        mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-    }
-
-    @Override
-    public View getView(int position, View convertView, ViewGroup parent) {
-        TextView text;
-        ImageView image;
-
-        View view;
-        if (convertView == null) {
-            view = mInflater.inflate(mResource, parent, false);
-        } else {
-            view = convertView;
-        }
-
-        // Set text field
-        text = (TextView) view.findViewById(R.id.text1);
-        text.setText(getItem(position).getTitle());
-
-        // Set resource icon
-        image = (ImageView) view.findViewById(R.id.icon);
-        image.setImageResource(getItem(position).getResource());
-
-        return view;
-    }
-
-    public static class IconListItem {
-        private final String mTitle;
-        private final int mResource;
-
-        public IconListItem(String title, int resource) {
-            mResource = resource;
-            mTitle = title;
-        }
-
-        public String getTitle() {
-            return mTitle;
-        }
-
-        public int getResource() {
-            return mResource;
-        }
-    }
-}
diff --git a/src/com/android/mms/ui/ImageAttachmentView.java b/src/com/android/mms/ui/ImageAttachmentView.java
deleted file mode 100644
index 2c93bd7..0000000
--- a/src/com/android/mms/ui/ImageAttachmentView.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.net.Uri;
-import android.util.AttributeSet;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-
-import java.util.Map;
-
-/**
- * This class provides an embedded editor/viewer of picture attachment.
- */
-public class ImageAttachmentView extends LinearLayout implements SlideViewInterface {
-    private ImageView mImageView;
-
-    public ImageAttachmentView(Context context) {
-        super(context);
-    }
-
-    public ImageAttachmentView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        mImageView = (ImageView) findViewById(R.id.image_content);
-    }
-
-    public void startAudio() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void startVideo() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setAudio(Uri audio, String name, Map<String, ?> extras) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setImage(String name, Bitmap bitmap) {
-        mImageView.setImageBitmap(bitmap);
-    }
-
-    public void setImageRegionFit(String fit) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setImageVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setText(String name, String text) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setTextVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setVideo(String name, Uri video) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void setVideoVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void stopAudio() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void stopVideo() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void reset() {
-        mImageView.setImageDrawable(null);
-    }
-
-    public void setVisibility(boolean visible) {
-        setVisibility(visible ? View.VISIBLE : View.GONE);
-    }
-
-    public void pauseAudio() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void pauseVideo() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekAudio(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekVideo(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-}
diff --git a/src/com/android/mms/ui/LayoutSelectorAdapter.java b/src/com/android/mms/ui/LayoutSelectorAdapter.java
deleted file mode 100644
index 2d8878c..0000000
--- a/src/com/android/mms/ui/LayoutSelectorAdapter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import android.content.Context;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.android.mms.R;
-
-/**
- * An adapter to store icons and strings for layout selector list.
- */
-public class LayoutSelectorAdapter extends IconListAdapter {
-    public LayoutSelectorAdapter(Context context) {
-        super(context, getData(context));
-    }
-
-    protected static List<IconListItem> getData(Context context) {
-        List<IconListItem> data = new ArrayList<IconListItem>(2);
-         addItem(data, context.getString(R.string.select_top_text),
-                R.drawable.ic_mms_text_top);
-         addItem(data, context.getString(R.string.select_bottom_text),
-                R.drawable.ic_mms_text_bottom);
-
-        return data;
-    }
-
-    protected static void addItem(List<IconListItem> data, String title, int resource) {
-        IconListItem temp = new IconListItem(title, resource);
-        data.add(temp);
-    }
-}
diff --git a/src/com/android/mms/ui/ManageSimMessages.java b/src/com/android/mms/ui/ManageSimMessages.java
deleted file mode 100644
index 7d27eb8..0000000
--- a/src/com/android/mms/ui/ManageSimMessages.java
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.google.android.mms.util.SqliteWrapper;
-import com.android.mms.transaction.MessagingNotification;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.NotificationManager;
-import android.content.AsyncQueryHandler;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.DialogInterface.OnClickListener;
-import android.database.ContentObserver;
-import android.database.Cursor;
-import android.database.sqlite.SQLiteException;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Handler;
-import android.provider.Telephony.Sms;
-import android.provider.Telephony.Threads;
-import android.telephony.gsm.SmsManager;
-import android.util.Log;
-import android.view.ContextMenu;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.Window;
-import android.widget.AdapterView;
-import android.widget.ListView;
-import android.widget.TextView;
-
-/**
- * Displays a list of the SMS messages stored on the SIM.
- */
-public class ManageSimMessages extends Activity
-        implements View.OnCreateContextMenuListener {
-    private static final Uri SIM_URI = Uri.parse("content://sms/sim");
-    private static final String TAG = "ManageSimMessages";
-    private static final int MENU_COPY_TO_PHONE_MEMORY = 0;
-    private static final int MENU_DELETE_FROM_SIM = 1;
-    private static final int MENU_VIEW = 2;
-    private static final int OPTION_MENU_DELETE_ALL = 0;
-
-    private static final int SHOW_LIST = 0;
-    private static final int SHOW_EMPTY = 1;
-    private static final int SHOW_BUSY = 2;
-    private int mState;
-
-
-    private ContentResolver mContentResolver;
-    private Cursor mCursor = null;
-    private ListView mSimList;
-    private TextView mMessage;
-    private MessageListAdapter mListAdapter = null;
-    private AsyncQueryHandler mQueryHandler = null;
-
-    public static final int SIM_FULL_NOTIFICATION_ID = 234;
-
-    private final ContentObserver simChangeObserver =
-            new ContentObserver(new Handler()) {
-        @Override
-        public void onChange(boolean selfUpdate) {
-            refreshMessageList();
-        }
-    };
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
-
-        mContentResolver = getContentResolver();
-        mQueryHandler = new QueryHandler(mContentResolver, this);
-        setContentView(R.layout.sim_list);
-        mSimList = (ListView) findViewById(R.id.messages);
-        mMessage = (TextView) findViewById(R.id.empty_message);
-
-        init();
-    }
-
-    @Override
-    protected void onNewIntent(Intent intent) {
-        setIntent(intent);
-
-        init();
-    }
-
-    private void init() {
-        MessagingNotification.cancelNotification(getApplicationContext(),
-                SIM_FULL_NOTIFICATION_ID);
-
-        updateState(SHOW_BUSY);
-        startQuery();
-    }
-
-    private class QueryHandler extends AsyncQueryHandler {
-        private final ManageSimMessages mParent;
-
-        public QueryHandler(
-                ContentResolver contentResolver, ManageSimMessages parent) {
-            super(contentResolver);
-            mParent = parent;
-        }
-
-        @Override
-        protected void onQueryComplete(
-                int token, Object cookie, Cursor cursor) {
-            mCursor = cursor;
-            if (mCursor != null) {
-                if (!mCursor.moveToFirst()) {
-                    // Let user know the SIM is empty
-                    updateState(SHOW_EMPTY);
-                } else if (mListAdapter == null) {
-                    mListAdapter = new MessageListAdapter(
-                            mParent, mCursor, mSimList, false,
-                            Threads.COMMON_THREAD);
-                    mSimList.setAdapter(mListAdapter);
-                    mSimList.setOnCreateContextMenuListener(mParent);
-                    updateState(SHOW_LIST);
-                } else {
-                    mListAdapter.changeCursor(mCursor);
-                    updateState(SHOW_LIST);
-                }
-                startManagingCursor(mCursor);
-                registerSimChangeObserver();
-            }
-        }
-    }
-
-    private void startQuery() {
-        try {
-            mQueryHandler.startQuery(0, null, SIM_URI, null, null, null, null);
-        } catch (SQLiteException e) {
-            SqliteWrapper.checkSQLiteException(this, e);
-        }
-    }
-
-    private void refreshMessageList() {
-        updateState(SHOW_BUSY);
-        if (mCursor != null) {
-            stopManagingCursor(mCursor);
-            mCursor.close();
-        }
-        startQuery();
-    }
-
-    @Override
-    public void onCreateContextMenu(
-            ContextMenu menu, View v,
-            ContextMenu.ContextMenuInfo menuInfo) {
-        menu.add(0, MENU_COPY_TO_PHONE_MEMORY, 0,
-                 R.string.sim_copy_to_phone_memory);
-        menu.add(0, MENU_DELETE_FROM_SIM, 0, R.string.sim_delete);
-
-        // TODO: Enable this once viewMessage is written.
-        // menu.add(0, MENU_VIEW, 0, R.string.sim_view);
-    }
-
-    @Override
-    public boolean onContextItemSelected(MenuItem item) {
-        AdapterView.AdapterContextMenuInfo info;
-        try {
-             info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();
-        } catch (ClassCastException exception) {
-            Log.e(TAG, "Bad menuInfo.", exception);
-            return false;
-        }
-
-        Cursor cursor = (Cursor) mListAdapter.getItem(info.position);
-
-        switch (item.getItemId()) {
-            case MENU_COPY_TO_PHONE_MEMORY:
-                copyToPhoneMemory(cursor);
-                return true;
-            case MENU_DELETE_FROM_SIM:
-                updateState(SHOW_BUSY);
-                deleteFromSim(cursor);
-                return true;
-            case MENU_VIEW:
-                viewMessage(cursor);
-                return true;
-        }
-        return super.onContextItemSelected(item);
-    }
-
-    @Override
-    public void onResume() {
-        super.onResume();
-        registerSimChangeObserver();
-    }
-
-    @Override
-    public void onPause() {
-        super.onPause();
-        mContentResolver.unregisterContentObserver(simChangeObserver);
-    }
-
-    private void registerSimChangeObserver() {
-        mContentResolver.registerContentObserver(
-                SIM_URI, true, simChangeObserver);
-    }
-
-    private void copyToPhoneMemory(Cursor cursor) {
-        String address = cursor.getString(
-                cursor.getColumnIndexOrThrow("address"));
-        String body = cursor.getString(cursor.getColumnIndexOrThrow("body"));
-        Long date = cursor.getLong(cursor.getColumnIndexOrThrow("date"));
-
-        try {
-            if (isIncomingMessage(cursor)) {
-                Sms.Inbox.addMessage(mContentResolver, address, body, null, date, true);
-            } else {
-                Sms.Sent.addMessage(mContentResolver, address, body, null, date);
-            }
-        } catch (SQLiteException e) {
-            SqliteWrapper.checkSQLiteException(this, e);
-        }
-    }
-
-    private boolean isIncomingMessage(Cursor cursor) {
-        int messageStatus = cursor.getInt(
-                cursor.getColumnIndexOrThrow("status"));
-
-        return (messageStatus == SmsManager.STATUS_ON_SIM_READ) ||
-               (messageStatus == SmsManager.STATUS_ON_SIM_UNREAD);
-    }
-
-    private void deleteFromSim(Cursor cursor) {
-        String messageIndexString =
-                cursor.getString(cursor.getColumnIndexOrThrow("index_on_sim"));
-        Uri simUri = SIM_URI.buildUpon().appendPath(messageIndexString).build();
-
-        SqliteWrapper.delete(this, mContentResolver, simUri, null, null);
-    }
-
-    private void deleteAllFromSim() {
-        Cursor cursor = (Cursor) mListAdapter.getCursor();
-
-        if (cursor != null) {
-            if (cursor.moveToFirst()) {
-                int count = cursor.getCount();
-
-                for (int i = 0; i < count; ++i) {
-                    deleteFromSim(cursor);
-                    cursor.moveToNext();
-                }
-            }
-        }
-    }
-
-    @Override
-    public boolean onPrepareOptionsMenu(Menu menu) {
-        menu.clear();
-
-        if ((null != mCursor) && (mCursor.getCount() > 0) && mState == SHOW_LIST) {
-            menu.add(0, OPTION_MENU_DELETE_ALL, 0, R.string.menu_delete_messages).setIcon(
-                    android.R.drawable.ic_menu_delete);
-        }
-
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case OPTION_MENU_DELETE_ALL:
-                confirmDeleteDialog(new OnClickListener() {
-                    public void onClick(DialogInterface dialog, int which) {
-                        updateState(SHOW_BUSY);
-                        deleteAllFromSim();
-                    }
-                });
-                break;
-        }
-
-        return true;
-    }
-
-    private void confirmDeleteDialog(OnClickListener listener) {
-        AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        builder.setTitle(R.string.confirm_dialog_title);
-        builder.setIcon(android.R.drawable.ic_dialog_alert);
-        builder.setCancelable(true);
-        builder.setPositiveButton(R.string.yes, listener);
-        builder.setNegativeButton(R.string.no, null);
-        builder.setMessage(R.string.confirm_delete_all_SIM_messages);
-
-        builder.show();
-    }
-
-    private void updateState(int state) {
-        if (mState == state) {
-            return;
-        }
-
-        mState = state;
-        switch (state) {
-            case SHOW_LIST:
-                mSimList.setVisibility(View.VISIBLE);
-                mMessage.setVisibility(View.GONE);
-                setTitle(getString(R.string.sim_manage_messages_title));
-                setProgressBarIndeterminateVisibility(false);
-                break;
-            case SHOW_EMPTY:
-                mSimList.setVisibility(View.GONE);
-                mMessage.setVisibility(View.VISIBLE);
-                setTitle(getString(R.string.sim_manage_messages_title));
-                setProgressBarIndeterminateVisibility(false);
-                break;
-            case SHOW_BUSY:
-                mSimList.setVisibility(View.GONE);
-                mMessage.setVisibility(View.GONE);
-                setTitle(getString(R.string.refreshing));
-                setProgressBarIndeterminateVisibility(true);
-                break;
-            default:
-                Log.e(TAG, "Invalid State");
-        }
-    }
-
-    private void viewMessage(Cursor cursor) {
-        // TODO: Add this.
-    }
-}
diff --git a/src/com/android/mms/ui/ManageSimPreference.java b/src/com/android/mms/ui/ManageSimPreference.java
deleted file mode 100644
index a808d85..0000000
--- a/src/com/android/mms/ui/ManageSimPreference.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import android.content.Context;
-import android.content.Intent;
-import android.preference.Preference;
-import android.util.AttributeSet;
-
-import java.util.Map;
-
-/**
- * The UI spec. calls for managing SMS messages on the SIM to be
- * access through the MMS preferences activity.  This class implements
- * that UI.
- */
-public class ManageSimPreference extends Preference {
-    private final Context mContext;
-
-    public ManageSimPreference(Context context, AttributeSet attributes) {
-        super(context, attributes);
-        mContext = context;
-    }
-
-    @Override
-    protected void onClick() {
-        mContext.startActivity(new Intent(mContext, ManageSimMessages.class));
-    }
-}
diff --git a/src/com/android/mms/ui/MessageItem.java b/src/com/android/mms/ui/MessageItem.java
deleted file mode 100644
index f55b3a8..0000000
--- a/src/com/android/mms/ui/MessageItem.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.android.mms.model.SlideModel;
-import com.android.mms.model.SlideshowModel;
-import com.android.mms.model.TextModel;
-import com.android.mms.ui.MessageListAdapter.ColumnsMap;
-import com.android.mms.util.ContactInfoCache;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.EncodedStringValue;
-import com.google.android.mms.pdu.MultimediaMessagePdu;
-import com.google.android.mms.pdu.NotificationInd;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.pdu.RetrieveConf;
-import com.google.android.mms.pdu.SendReq;
-
-import android.content.ContentUris;
-import android.content.Context;
-import android.database.Cursor;
-import android.net.Uri;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.Sms;
-import android.provider.Telephony.Threads;
-import android.text.TextUtils;
-import android.util.Log;
-
-/**
- * This object holds some brief information of a message.
- */
-public class MessageItem {
-    private static String TAG = "MessageItem";
-
-    final Context mContext;
-    final String mType;
-    final long mMsgId;
-    final int mBoxId;
-
-    boolean mDeliveryReport;
-    boolean mReadReport;
-
-    String mTimestamp;
-    String mAddress;
-    String mContact;
-    String mBody; // Body of SMS, first text of MMS.
-
-    // Fields for MMS only.
-    Uri mMessageUri;
-    int mMessageType;
-    int mAttachmentType;
-    String mSubject;
-    SlideshowModel mSlideshow;
-    int mMessageSize;
-    int mErrorType;
-    int mThreadType;
-
-    MessageItem(
-            Context context, String type, Cursor cursor,
-            ColumnsMap columnsMap, int threadType) throws MmsException {
-        mContext = context;
-        mThreadType = threadType;
-        mMsgId = cursor.getLong(columnsMap.mColumnMsgId);
-        
-        if ("sms".equals(type)) {
-            ContactInfoCache infoCache = ContactInfoCache.getInstance();
-            mReadReport = false; // No read reports in sms
-            mDeliveryReport = (cursor.getLong(columnsMap.mColumnSmsStatus)
-                    != Sms.STATUS_NONE);
-            mMessageUri = ContentUris.withAppendedId(Sms.CONTENT_URI, mMsgId);
-            // Set contact and message body
-            mBoxId = cursor.getInt(columnsMap.mColumnSmsType);
-            mAddress = cursor.getString(columnsMap.mColumnSmsAddress);
-            if (Sms.isOutgoingFolder(mBoxId)) {
-                String meString = context.getString(
-                        R.string.messagelist_sender_self);
-
-                if (mThreadType == Threads.COMMON_THREAD) {
-                    mContact = meString;
-                } else {
-                    mContact = String.format(
-                            context.getString(R.string.broadcast_from_to),
-                            meString,
-                            infoCache.getContactName(context, mAddress));
-                }
-            } else {
-                // For incoming messages, the ADDRESS field contains the sender.
-                mContact = infoCache.getContactName(context, mAddress);
-            }
-            mBody = cursor.getString(columnsMap.mColumnSmsBody);
-
-            // Set time stamp
-            long date = cursor.getLong(columnsMap.mColumnSmsDate);
-            mTimestamp = String.format(context.getString(R.string.sent_on),
-                    MessageUtils.formatTimeStampString(context, date));
-        } else if ("mms".equals(type)) {
-            mMessageUri = ContentUris.withAppendedId(Mms.CONTENT_URI, mMsgId);
-            mBoxId = cursor.getInt(columnsMap.mColumnMmsMessageBox);
-            mMessageType = cursor.getInt(columnsMap.mColumnMmsMessageType);
-            mErrorType = cursor.getInt(columnsMap.mColumnMmsErrorType);
-            String subject = cursor.getString(columnsMap.mColumnMmsSubject);
-            if (!TextUtils.isEmpty(subject)) {
-                EncodedStringValue v = new EncodedStringValue(
-                        cursor.getInt(columnsMap.mColumnMmsSubjectCharset),
-                        PduPersister.getBytes(subject));
-                mSubject = v.getString();
-            }
-
-            long timestamp = 0L;
-            PduPersister p = PduPersister.getPduPersister(mContext);
-            if (PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND == mMessageType) {
-                mDeliveryReport = false;
-                NotificationInd notifInd = (NotificationInd) p.load(mMessageUri);
-                interpretFrom(notifInd.getFrom());
-                // Borrow the mBody to hold the URL of the message.
-                mBody = new String(notifInd.getContentLocation());
-                mMessageSize = (int) notifInd.getMessageSize();
-                timestamp = notifInd.getExpiry() * 1000L;
-            } else {
-                MultimediaMessagePdu msg = (MultimediaMessagePdu) p.load(mMessageUri);
-                mSlideshow = SlideshowModel.createFromPduBody(context, msg.getBody());
-                mAttachmentType = MessageUtils.getAttachmentType(mSlideshow);
-
-                if (mMessageType == PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF) {
-                    RetrieveConf retrieveConf = (RetrieveConf) msg;
-                    interpretFrom(retrieveConf.getFrom());
-                    timestamp = retrieveConf.getDate() * 1000L;
-                } else {
-                    // Use constant string for outgoing messages
-                    mContact = mAddress = context.getString(
-                            R.string.messagelist_sender_self);
-                    timestamp = ((SendReq) msg).getDate() * 1000L;
-                }
-
-
-                String report = cursor.getString(columnsMap.mColumnMmsDeliveryReport);
-                if ((report == null) || !mAddress.equals(context.getString(
-                        R.string.messagelist_sender_self))) {
-                    Log.e(TAG, "Value for delivery report was null.");
-                    mDeliveryReport = false;
-                } else {
-                    int reportInt;
-                    try {
-                        reportInt = Integer.parseInt(report);
-                        mDeliveryReport =
-                            (reportInt == PduHeaders.VALUE_YES);
-                    } catch (NumberFormatException nfe) {
-                        Log.e(TAG, "Value for delivery report was invalid.");
-                        mDeliveryReport = false;
-                    }
-                }
-
-                report = cursor.getString(columnsMap.mColumnMmsReadReport);
-                if ((report == null) || !mAddress.equals(context.getString(
-                        R.string.messagelist_sender_self))) {
-                    Log.e(TAG, "Value for read report was null.");
-                    mReadReport = false;
-                } else {
-                    int reportInt;
-                    try {
-                        reportInt = Integer.parseInt(report);
-                        mReadReport = (reportInt == PduHeaders.VALUE_YES);
-                    } catch (NumberFormatException nfe) {
-                        Log.e(TAG, "Value for read report was invalid.");
-                        mReadReport = false;
-                    }
-                }
-
-                SlideModel slide = mSlideshow.get(0);
-                if ((slide != null) && slide.hasText()) {
-                    TextModel tm = slide.getText();
-                    if (tm.isDrmProtected()) {
-                        mBody = mContext.getString(R.string.drm_protected_text);
-                    } else {
-                        mBody = slide.getText().getText();
-                    }
-                }
-
-                mMessageSize = mSlideshow.getCurrentMessageSize();
-            }
-
-            mTimestamp = context.getString(getTimestampStrId(),
-                    MessageUtils.formatTimeStampString(context, timestamp));
-        } else {
-            throw new MmsException("Unknown type of the message: " + type);
-        }
-
-        mType = type;
-    }
-
-    private void interpretFrom(EncodedStringValue from) {
-        if (from != null) {
-            mAddress = from.getString();
-            mContact = ContactInfoCache.getInstance().getContactName(mContext, mAddress);
-        } else {
-            mContact = mAddress = mContext.getString(
-                    R.string.anonymous_recipient);
-        }
-    }
-
-    private int getTimestampStrId() {
-        if (PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND == mMessageType) {
-            return R.string.expire_on;
-        } else {
-            return R.string.sent_on;
-        }
-    }
-
-    public boolean isMms() {
-        return mType.equals("mms");
-    }
-
-    public boolean isSms() {
-        return mType.equals("sms");
-    }
-
-    public boolean isDownloaded() {
-        return (mMessageType != PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND);
-    }
-    
-    public boolean isOutgoingMessage() {
-        boolean isOutgoingMms = isMms() && (mBoxId == Mms.MESSAGE_BOX_OUTBOX);
-        boolean isOutgoingSms = isSms()
-                                    && ((mBoxId == Sms.MESSAGE_TYPE_FAILED)
-                                            || (mBoxId == Sms.MESSAGE_TYPE_OUTBOX)
-                                            || (mBoxId == Sms.MESSAGE_TYPE_QUEUED));
-        return isOutgoingMms || isOutgoingSms;
-    }
-}
diff --git a/src/com/android/mms/ui/MessageListAdapter.java b/src/com/android/mms/ui/MessageListAdapter.java
deleted file mode 100644
index 7518bda..0000000
--- a/src/com/android/mms/ui/MessageListAdapter.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.google.android.mms.MmsException;
-
-import android.content.Context;
-import android.database.Cursor;
-import android.os.Handler;
-import android.provider.BaseColumns;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.MmsSms;
-import android.provider.Telephony.Sms;
-import android.provider.Telephony.MmsSms.PendingMessages;
-import android.provider.Telephony.Sms.Conversations;
-import android.util.Config;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.CursorAdapter;
-import android.widget.ListView;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-/**
- * The back-end data adapter of a message list.
- */
-public class MessageListAdapter extends CursorAdapter {
-    private static final String TAG = "MessageListAdapter";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = Config.LOGV && DEBUG;
-
-    static final String[] PROJECTION = new String[] {
-        // TODO: should move this symbol into android.provider.Telephony.
-        MmsSms.TYPE_DISCRIMINATOR_COLUMN,
-        BaseColumns._ID,
-        Conversations.THREAD_ID,
-        // For SMS
-        Sms.ADDRESS,
-        Sms.BODY,
-        Sms.DATE,
-        Sms.READ,
-        Sms.TYPE,
-        Sms.STATUS,
-        // For MMS
-        Mms.SUBJECT,
-        Mms.SUBJECT_CHARSET,
-        Mms.DATE,
-        Mms.READ,
-        Mms.MESSAGE_TYPE,
-        Mms.MESSAGE_BOX,
-        Mms.DELIVERY_REPORT,
-        Mms.READ_REPORT,
-        PendingMessages.ERROR_TYPE
-    };
-
-    // The indexes of the default columns which must be consistent
-    // with above PROJECTION.
-    static final int COLUMN_MSG_TYPE            = 0;
-    static final int COLUMN_ID                  = 1;
-    static final int COLUMN_THREAD_ID           = 2;
-    static final int COLUMN_SMS_ADDRESS         = 3;
-    static final int COLUMN_SMS_BODY            = 4;
-    static final int COLUMN_SMS_DATE            = 5;
-    static final int COLUMN_SMS_READ            = 6;
-    static final int COLUMN_SMS_TYPE            = 7;
-    static final int COLUMN_SMS_STATUS          = 8;
-    static final int COLUMN_MMS_SUBJECT         = 9;
-    static final int COLUMN_MMS_SUBJECT_CHARSET = 10;
-    static final int COLUMN_MMS_DATE            = 11;
-    static final int COLUMN_MMS_READ            = 12;
-    static final int COLUMN_MMS_MESSAGE_TYPE    = 13;
-    static final int COLUMN_MMS_MESSAGE_BOX     = 14;
-    static final int COLUMN_MMS_DELIVERY_REPORT = 15;
-    static final int COLUMN_MMS_READ_REPORT     = 16;
-    static final int COLUMN_MMS_ERROR_TYPE      = 17;
-
-    private static final int CACHE_SIZE            = 50;
-    
-    protected LayoutInflater mInflater;
-    private final ListView mListView;
-    private final LinkedHashMap<Long, MessageItem> mMessageItemCache;
-    private final ColumnsMap mColumnsMap;
-    private OnDataSetChangedListener mOnDataSetChangedListener;
-    private final int mThreadType;
-    private Handler mMsgListItemHandler;
-
-    public MessageListAdapter(
-            Context context, Cursor c, ListView listView,
-            boolean useDefaultColumnsMap, int threadType) {
-        super(context, c);
-        mThreadType = threadType;
-        mInflater = (LayoutInflater) context.getSystemService(
-                Context.LAYOUT_INFLATER_SERVICE);
-        mListView = listView;
-        mMessageItemCache = new LinkedHashMap<Long, MessageItem>(
-                    10, 1.0f, true) {
-            @Override
-            protected boolean removeEldestEntry(Map.Entry eldest) {
-                return size() > CACHE_SIZE;
-            }
-        };
-
-        if (useDefaultColumnsMap) {
-            mColumnsMap = new ColumnsMap();
-        } else {
-            mColumnsMap = new ColumnsMap(c);
-        }
-    }
-
-    @Override
-    public void bindView(View view, Context context, Cursor cursor) {
-        if (view instanceof MessageListItem) {
-            String type = cursor.getString(mColumnsMap.mColumnMsgType);
-            long msgId = cursor.getLong(mColumnsMap.mColumnMsgId);
-            
-            MessageItem msgItem = getCachedMessageItem(type, msgId, cursor);
-            if (msgItem != null) {
-                ((MessageListItem) view).bind(msgItem);
-                ((MessageListItem) view).setMsgListItemHandler(mMsgListItemHandler);
-            }
-        }
-    }
-
-    public interface OnDataSetChangedListener {
-        void onDataSetChanged(MessageListAdapter adapter);
-    }
-
-    public void setOnDataSetChangedListener(OnDataSetChangedListener l) {
-        mOnDataSetChangedListener = l;
-    }
-
-    public void setMsgListItemHandler(Handler handler) {
-        mMsgListItemHandler = handler;
-    }
-
-    @Override
-    public void notifyDataSetChanged() {
-        super.notifyDataSetChanged();
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "MessageListAdapter.notifyDataSetChanged().");
-        }
-
-        mListView.setSelection(mListView.getCount());
-        mMessageItemCache.clear();
-
-        if (mOnDataSetChangedListener != null) {
-            mOnDataSetChangedListener.onDataSetChanged(this);
-        }
-    }
-
-    @Override
-    public View newView(Context context, Cursor cursor, ViewGroup parent) {
-        return mInflater.inflate(R.layout.message_list_item, parent, false);
-    }
-
-    public MessageItem getCachedMessageItem(String type, long msgId, Cursor c) {
-        MessageItem item = mMessageItemCache.get(getKey(type, msgId));
-        if (item == null) {
-            try {
-                item = new MessageItem(mContext, type, c, mColumnsMap, mThreadType);
-                mMessageItemCache.put(getKey(item.mType, item.mMsgId), item);
-            } catch (MmsException e) {
-                Log.e(TAG, e.getMessage());
-            }
-        }
-        return item;
-    }
-
-    private static long getKey(String type, long id) {
-        if (type.equals("mms")) {
-            return -id;
-        } else {
-            return id;
-        }
-    }
-
-    final class ColumnsMap {
-        int mColumnMsgType;
-        int mColumnMsgId;
-        int mColumnSmsAddress;
-        int mColumnSmsBody;
-        int mColumnSmsDate;
-        int mColumnSmsRead;
-        int mColumnSmsType;
-        int mColumnSmsStatus;
-        int mColumnMmsSubject;
-        int mColumnMmsSubjectCharset;
-        int mColumnMmsDate;
-        int mColumnMmsRead;
-        int mColumnMmsMessageType;
-        int mColumnMmsMessageBox;
-        int mColumnMmsDeliveryReport;
-        int mColumnMmsReadReport;
-        int mColumnMmsErrorType;
-
-        ColumnsMap() {
-            mColumnMsgType            = COLUMN_MSG_TYPE;
-            mColumnMsgId              = COLUMN_ID;
-            mColumnSmsAddress         = COLUMN_SMS_ADDRESS;
-            mColumnSmsBody            = COLUMN_SMS_BODY;
-            mColumnSmsDate            = COLUMN_SMS_DATE;
-            mColumnSmsRead            = COLUMN_SMS_READ;
-            mColumnSmsType            = COLUMN_SMS_TYPE;
-            mColumnSmsStatus          = COLUMN_SMS_STATUS;
-            mColumnMmsSubject         = COLUMN_MMS_SUBJECT;
-            mColumnMmsSubjectCharset  = COLUMN_MMS_SUBJECT_CHARSET;
-            mColumnMmsDate            = COLUMN_MMS_DATE;
-            mColumnMmsRead            = COLUMN_MMS_READ;
-            mColumnMmsMessageType     = COLUMN_MMS_MESSAGE_TYPE;
-            mColumnMmsMessageBox      = COLUMN_MMS_MESSAGE_BOX;
-            mColumnMmsDeliveryReport  = COLUMN_MMS_DELIVERY_REPORT;
-            mColumnMmsReadReport      = COLUMN_MMS_READ_REPORT;
-            mColumnMmsErrorType       = COLUMN_MMS_ERROR_TYPE;
-        }
-
-        ColumnsMap(Cursor cursor) {
-            // Ignore all 'not found' exceptions since the custom columns
-            // may be just a subset of the default columns.
-            try {
-                mColumnMsgType = cursor.getColumnIndexOrThrow(
-                        MmsSms.TYPE_DISCRIMINATOR_COLUMN);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnMsgId = cursor.getColumnIndexOrThrow(BaseColumns._ID);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnSmsAddress = cursor.getColumnIndexOrThrow(Sms.ADDRESS);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnSmsBody = cursor.getColumnIndexOrThrow(Sms.BODY);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnSmsDate = cursor.getColumnIndexOrThrow(Sms.DATE);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnSmsRead = cursor.getColumnIndexOrThrow(Sms.READ);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnSmsType = cursor.getColumnIndexOrThrow(Sms.TYPE);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnSmsStatus = cursor.getColumnIndexOrThrow(Sms.STATUS);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnMmsSubject = cursor.getColumnIndexOrThrow(Mms.SUBJECT);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnMmsSubjectCharset = cursor.getColumnIndexOrThrow(Mms.SUBJECT_CHARSET);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnMmsDate = cursor.getColumnIndexOrThrow(Mms.DATE);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnMmsRead = cursor.getColumnIndexOrThrow(Mms.READ);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnMmsMessageType = cursor.getColumnIndexOrThrow(Mms.MESSAGE_TYPE);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnMmsMessageBox = cursor.getColumnIndexOrThrow(Mms.MESSAGE_BOX);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnMmsDeliveryReport = cursor.getColumnIndexOrThrow(Mms.DELIVERY_REPORT);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnMmsReadReport = cursor.getColumnIndexOrThrow(Mms.READ_REPORT);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-
-            try {
-                mColumnMmsErrorType = cursor.getColumnIndexOrThrow(PendingMessages.ERROR_TYPE);
-            } catch (IllegalArgumentException e) {
-                Log.w("colsMap", e.getMessage());
-            }
-        }
-    }
-
-    public void registerObservers() {
-        if (mCursor != null) {
-            mCursor.registerContentObserver(mChangeObserver);
-            mCursor.registerDataSetObserver(mDataSetObserver);
-        }
-    }
-
-    public void unregisterObservers() {
-        if (mCursor != null) {
-            mCursor.unregisterContentObserver(mChangeObserver);
-            mCursor.unregisterDataSetObserver(mDataSetObserver);
-        }
-    }
-}
diff --git a/src/com/android/mms/ui/MessageListItem.java b/src/com/android/mms/ui/MessageListItem.java
deleted file mode 100644
index d9a154d..0000000
--- a/src/com/android/mms/ui/MessageListItem.java
+++ /dev/null
@@ -1,565 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.android.mms.transaction.Transaction;
-import com.android.mms.transaction.TransactionBundle;
-import com.android.mms.transaction.TransactionService;
-import com.android.mms.util.DownloadManager;
-import com.android.mms.util.SmileyParser;
-
-import com.google.android.mms.pdu.PduHeaders;
-
-import android.app.AlertDialog;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.graphics.Typeface;
-import android.graphics.drawable.Drawable;
-import android.media.MediaMetadataRetriever;
-import android.media.MediaPlayer;
-import android.net.Uri;
-import android.os.Handler;
-import android.os.Message;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.MmsSms;
-import android.provider.Telephony.Sms;
-import android.telephony.PhoneNumberUtils;
-import android.text.Spannable;
-import android.text.SpannableStringBuilder;
-import android.text.TextUtils;
-import android.text.method.HideReturnsTransformationMethod;
-import android.text.style.AbsoluteSizeSpan;
-import android.text.style.BackgroundColorSpan;
-import android.text.style.ForegroundColorSpan;
-import android.text.style.LineBackgroundSpan;
-import android.text.style.StyleSpan;
-import android.text.style.URLSpan;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.View;
-import android.view.ViewGroup;
-import android.view.View.OnClickListener;
-import android.widget.ArrayAdapter;
-import android.widget.Button;
-import android.widget.ImageButton;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * This class provides view of a message in the messages list.
- */
-public class MessageListItem extends LinearLayout implements
-        SlideViewInterface, OnClickListener {
-    public static final String EXTRA_URLS = "com.android.mms.ExtraUrls";
-
-    private static final String TAG = "MessageListItem";
-    private static final StyleSpan STYLE_BOLD = new StyleSpan(Typeface.BOLD);
-
-    static final int MSG_LIST_EDIT_MMS   = 1;
-    static final int MSG_LIST_EDIT_SMS   = 2;
-
-    private View mMsgListItem;
-    private View mMmsView;
-    private ImageView mImageView;
-    private ImageView mRightStatusIndicator;
-    private ImageButton mSlideShowButton;
-    private TextView mBodyTextView;
-    private Button mDownloadButton;
-    private TextView mDownloadingLabel;
-    private Handler mHandler;
-    private MessageItem mMessageItem;
-
-    public MessageListItem(Context context) {
-        super(context);
-    }
-
-    public MessageListItem(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        super.onFinishInflate();
-
-        mMsgListItem = findViewById(R.id.msg_list_item);
-        mBodyTextView = (TextView) findViewById(R.id.text_view);
-        mRightStatusIndicator = (ImageView) findViewById(R.id.right_status_indicator);
-    }
-
-    public void bind(MessageItem msgItem) {
-        mMessageItem = msgItem;
-
-        setLongClickable(false);
-
-        switch (msgItem.mMessageType) {
-            case PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND:
-                bindNotifInd(msgItem);
-                break;
-            default:
-                bindCommonMessage(msgItem);
-                break;
-        }
-    }
-
-    public MessageItem getMessageItem() {
-        return mMessageItem;
-    }
-    
-    public void setMsgListItemHandler(Handler handler) {
-        mHandler = handler;
-    }
-
-    private void bindNotifInd(final MessageItem msgItem) {
-        hideMmsViewIfNeeded();
-
-        String msgSizeText = mContext.getString(R.string.message_size_label)
-                                + String.valueOf((msgItem.mMessageSize + 1023) / 1024)
-                                + mContext.getString(R.string.kilobyte);
-        
-        boolean drawWithBackground = msgItem.mBoxId == Mms.MESSAGE_BOX_INBOX;
-
-        mBodyTextView.setText(formatMessage(msgItem.mContact, null, msgItem.mSubject,
-                                            msgSizeText + "\n" + msgItem.mTimestamp,
-                                            drawWithBackground));
-
-        int state = DownloadManager.getInstance().getState(msgItem.mMessageUri);
-        switch (state) {
-            case DownloadManager.STATE_DOWNLOADING:
-                inflateDownloadControls();
-                mDownloadingLabel.setVisibility(View.VISIBLE);
-                mDownloadButton.setVisibility(View.GONE);
-                break;
-            case DownloadManager.STATE_UNSTARTED:
-            case DownloadManager.STATE_TRANSIENT_FAILURE:
-            case DownloadManager.STATE_PERMANENT_FAILURE:
-            default:
-                setLongClickable(true);
-                inflateDownloadControls();
-                mDownloadingLabel.setVisibility(View.GONE);
-                mDownloadButton.setVisibility(View.VISIBLE);
-                mDownloadButton.setOnClickListener(new OnClickListener() {
-                    public void onClick(View v) {
-                        mDownloadingLabel.setVisibility(View.VISIBLE);
-                        mDownloadButton.setVisibility(View.GONE);
-                        Intent intent = new Intent(mContext, TransactionService.class);
-                        intent.putExtra(TransactionBundle.URI, msgItem.mMessageUri.toString());
-                        intent.putExtra(TransactionBundle.TRANSACTION_TYPE,
-                                Transaction.RETRIEVE_TRANSACTION);
-                        mContext.startService(intent);
-                    }
-                });
-                break;
-        }
-
-        // Hide the error indicator.
-        mRightStatusIndicator.setVisibility(View.GONE);
-
-        drawLeftStatusIndicator(msgItem.mBoxId);
-    }
-
-    private void bindCommonMessage(final MessageItem msgItem) {
-        if (mDownloadButton != null) {
-            mDownloadButton.setVisibility(View.GONE);
-            mDownloadingLabel.setVisibility(View.GONE);
-        }
-        // Since the message text should be concatenated with the sender's
-        // address(or name), I have to display it here instead of
-        // displaying it by the Presenter.
-        mBodyTextView.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
-
-        boolean drawWithBackground = msgItem.mBoxId == Mms.MESSAGE_BOX_INBOX;
-
-        mBodyTextView.setText(formatMessage(msgItem.mContact, msgItem.mBody,
-                                            msgItem.mSubject, msgItem.mTimestamp,
-                                            drawWithBackground));
-        // TODO part of changing contact names to links
-        //mBodyTextView.setText(formatMessage(msgItem.mAddress, msgItem.mBody));
-
-        if (msgItem.isSms()) {
-            hideMmsViewIfNeeded();
-        } else {
-            Presenter presenter = PresenterFactory.getPresenter(
-                    "MmsThumbnailPresenter", mContext,
-                    this, msgItem.mSlideshow);
-            presenter.present();
-
-            if (msgItem.mAttachmentType != AttachmentEditor.TEXT_ONLY) {
-                inflateMmsView();
-                mMmsView.setVisibility(View.VISIBLE);
-                setOnClickListener(msgItem);
-                drawPlaybackButton(msgItem);
-            } else {
-                hideMmsViewIfNeeded();
-            }
-        }
-
-        drawLeftStatusIndicator(msgItem.mBoxId);
-        drawRightStatusIndicator(msgItem);
-    }
-
-    private void hideMmsViewIfNeeded() {
-        if (mMmsView != null) {
-            mMmsView.setVisibility(View.GONE);
-        }
-    }
-
-    public void startAudio() {
-        // TODO Auto-generated method stub
-    }
-
-    public void startVideo() {
-        // TODO Auto-generated method stub
-    }
-
-    public void setAudio(Uri audio, String name, Map<String, ?> extras) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setImage(String name, Bitmap bitmap) {
-        inflateMmsView();
-
-        mImageView.setImageBitmap(bitmap);
-        mImageView.setVisibility(VISIBLE);
-    }
-
-    private void inflateMmsView() {
-        if (mMmsView == null) {
-            //inflate the surrounding view_stub
-            findViewById(R.id.mms_layout_view_stub).setVisibility(VISIBLE);
-
-            mMmsView = findViewById(R.id.mms_view);
-            mImageView = (ImageView) findViewById(R.id.image_view);
-            mSlideShowButton = (ImageButton) findViewById(R.id.play_slideshow_button);
-        }
-    }
-    
-    private void inflateDownloadControls() {
-        if (mDownloadButton == null) {
-            //inflate the download controls
-            findViewById(R.id.mms_downloading_view_stub).setVisibility(VISIBLE);
-            mDownloadButton = (Button) findViewById(R.id.btn_download_msg);
-            mDownloadingLabel = (TextView) findViewById(R.id.label_downloading);
-        }
-    }
-    
-    private CharSequence formatMessage(String contact, String body, String subject,
-                                       String timestamp, boolean drawBackground) {
-        SpannableStringBuilder buf = new SpannableStringBuilder(contact);
-        buf.append(": ");
-        buf.setSpan(STYLE_BOLD, 0, buf.length(),
-                Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
-
-        boolean hasSubject = !TextUtils.isEmpty(subject);
-        if (hasSubject) {
-            buf.append(mContext.getResources().getString(R.string.inline_subject, subject));
-        }
-
-        if (!TextUtils.isEmpty(body)) {
-            if (hasSubject) {
-                buf.append(" - ");
-            }
-            SmileyParser parser = SmileyParser.getInstance();
-            buf.append(parser.addSmileySpans(body));
-        }
-
-        buf.append("\n");
-        int startOffset = buf.length();
-        
-        // put a one pixel high spacer line between the message and the time stamp as requested
-        // by the spec.
-        buf.append("\n");
-        buf.setSpan(new AbsoluteSizeSpan(3), startOffset, buf.length(),
-                Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-        
-        startOffset = buf.length();
-        buf.append(timestamp);
-        buf.setSpan(new AbsoluteSizeSpan(12), startOffset, buf.length(),
-                Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-        // Make the timestamp text not as dark
-        int color = mContext.getResources().getColor(R.color.timestamp_color);
-        buf.setSpan(new ForegroundColorSpan(color), startOffset, buf.length(),
-                Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-        
-        return buf;
-    }
-
-    private void drawPlaybackButton(MessageItem msgItem) {
-        switch (msgItem.mAttachmentType) {
-            case AttachmentEditor.SLIDESHOW_ATTACHMENT:
-            case AttachmentEditor.AUDIO_ATTACHMENT:
-            case AttachmentEditor.VIDEO_ATTACHMENT:
-                // Show the 'Play' button and bind message info on it.
-                mSlideShowButton.setTag(msgItem);
-                // Set call-back for the 'Play' button.
-                mSlideShowButton.setOnClickListener(this);
-                mSlideShowButton.setVisibility(View.VISIBLE);
-                setLongClickable(true);
-                break;
-            default:
-                mSlideShowButton.setVisibility(View.GONE);
-                break;
-        }
-    }
-
-    // OnClick Listener for the playback button
-    public void onClick(View v) {
-        MessageItem mi = (MessageItem) v.getTag();
-        switch (mi.mAttachmentType) {
-            case AttachmentEditor.AUDIO_ATTACHMENT:
-            case AttachmentEditor.VIDEO_ATTACHMENT:
-            case AttachmentEditor.SLIDESHOW_ATTACHMENT:
-                Intent intent = new Intent(
-                        mContext, SlideshowActivity.class);
-                intent.setData(mi.mMessageUri);
-                mContext.startActivity(intent);
-                break;
-        }
-    }
-
-    public void onMessageListItemClick() {
-        URLSpan[] spans = mBodyTextView.getUrls();
-
-        if (spans.length == 0) {
-            // Do nothing.
-        } else if (spans.length == 1) {
-            Uri uri = Uri.parse(spans[0].getURL());
-            Intent intent = new Intent(Intent.ACTION_VIEW, uri);
-
-            mContext.startActivity(intent);
-        } else {
-            final java.util.ArrayList<String> urls = MessageUtils.extractUris(spans);
-
-            ArrayAdapter<String> adapter = 
-                new ArrayAdapter<String>(mContext, android.R.layout.select_dialog_item, urls) {
-                public View getView(int position, View convertView, ViewGroup parent) {
-                    View v = super.getView(position, convertView, parent);
-                    try {
-                        String url = getItem(position).toString();
-                        TextView tv = (TextView) v;
-                        Drawable d = mContext.getPackageManager().getActivityIcon(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
-                        if (d != null) {
-                            d.setBounds(0, 0, d.getIntrinsicHeight(), d.getIntrinsicHeight());
-                            tv.setCompoundDrawablePadding(10);
-                            tv.setCompoundDrawables(d, null, null, null);
-                        }
-                        final String telPrefix = "tel:";
-                        if (url.startsWith(telPrefix)) {
-                            url = PhoneNumberUtils.formatNumber(url.substring(telPrefix.length()));
-                        }
-                        tv.setText(url);
-                    } catch (android.content.pm.PackageManager.NameNotFoundException ex) {
-                        ;
-                    }
-                    return v;
-                }
-            };
-
-            AlertDialog.Builder b = new AlertDialog.Builder(mContext);
-
-            DialogInterface.OnClickListener click = new DialogInterface.OnClickListener() {
-                public final void onClick(DialogInterface dialog, int which) {
-                    if (which >= 0) {
-                        Uri uri = Uri.parse(urls.get(which));
-                        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
-                        intent.addCategory(Intent.CATEGORY_BROWSABLE);
-                        mContext.startActivity(intent);
-                    }
-                }
-            };
-                
-            b.setTitle(R.string.select_link_title);
-            b.setCancelable(true);
-            b.setAdapter(adapter, click);
-
-            b.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
-                public final void onClick(DialogInterface dialog, int which) {
-                    dialog.dismiss();
-                }
-            });
-
-            b.show();
-        }
-    }
-
-
-    private void setOnClickListener(final MessageItem msgItem) {
-        if (msgItem.mAttachmentType == AttachmentEditor.IMAGE_ATTACHMENT) {
-            mImageView.setOnClickListener(new OnClickListener() {
-                public void onClick(View v) {
-                    // FIXME: Use SlideshowActivity to view image for the time being.
-                    // As described in UI spec, pressing an inline attachment will
-                    // open up the full view of the attachment in its associated app
-                    // (here should the pictures app).
-                    // But the <ViewImage> would only show images in MediaStore.
-                    // Should we save a copy to MediaStore temporarily for displaying?
-                    Intent intent = new Intent(mContext, SlideshowActivity.class);
-                    intent.setData(msgItem.mMessageUri);
-                    mContext.startActivity(intent);
-                }
-            });
-            mImageView.setOnLongClickListener(new OnLongClickListener() {
-                public boolean onLongClick(View v) {
-                    return v.showContextMenu();
-                }
-            });
-        } else {
-            mImageView.setOnClickListener(null);
-        }
-    }
-
-    private void drawLeftStatusIndicator(int msgBoxId) {
-        switch (msgBoxId) {
-            case Mms.MESSAGE_BOX_INBOX:
-                mMsgListItem.setBackgroundResource(R.drawable.listitem_background_lightblue);
-                break;
-
-            case Mms.MESSAGE_BOX_DRAFTS:
-            case Sms.MESSAGE_TYPE_FAILED:
-            case Sms.MESSAGE_TYPE_QUEUED:
-            case Mms.MESSAGE_BOX_OUTBOX:
-                mMsgListItem.setBackgroundResource(R.drawable.listitem_background);
-                break;
-
-            default:
-                mMsgListItem.setBackgroundResource(R.drawable.listitem_background);
-                break;
-        }
-    }
-
-    public static boolean isFailedMessage(MessageItem msgItem) {
-        boolean isFailedMms = msgItem.isMms()
-                            && (msgItem.mErrorType >= MmsSms.ERR_TYPE_GENERIC_PERMANENT);
-        boolean isFailedSms = msgItem.isSms()
-                            && (msgItem.mBoxId == Sms.MESSAGE_TYPE_FAILED);
-        return isFailedMms || isFailedSms;
-    }
-
-    private void setErrorIndicatorClickListener(final MessageItem msgItem) {
-        String type = msgItem.mType;
-        final int what;
-        if (type.equals("sms")) {
-            what = MSG_LIST_EDIT_SMS;
-        } else {
-            what = MSG_LIST_EDIT_MMS;
-        }
-        mRightStatusIndicator.setOnClickListener(new OnClickListener() {
-            public void onClick(View v) {
-                if (null != mHandler) {
-                    Message msg = Message.obtain(mHandler, what);
-                    msg.obj = new Long(msgItem.mMsgId);
-                    msg.sendToTarget();
-                }
-            }
-        });
-    }
-
-    private void drawRightStatusIndicator(MessageItem msgItem) {
-        if (msgItem.isOutgoingMessage()) {
-            if (isFailedMessage(msgItem)) {
-                mRightStatusIndicator.setImageResource(R.drawable.ic_sms_mms_not_delivered);
-                setErrorIndicatorClickListener(msgItem);
-            } else {
-                mRightStatusIndicator.setImageResource(R.drawable.ic_email_pending);
-            }
-            mRightStatusIndicator.setVisibility(View.VISIBLE);
-        } else if (msgItem.mDeliveryReport || msgItem.mReadReport) {
-            mRightStatusIndicator.setImageResource(R.drawable.ic_mms_message_details);
-            mRightStatusIndicator.setVisibility(View.VISIBLE);
-        } else {
-            mRightStatusIndicator.setVisibility(View.GONE);
-        }
-    }
-
-    public void setImageRegionFit(String fit) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setImageVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setText(String name, String text) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setTextVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setVideo(String name, Uri video) {
-        inflateMmsView();
-        Bitmap bitmap = VideoAttachmentView.createVideoThumbnail(mContext, video);
-        if (null == bitmap) {
-            bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.mms_play_btn);
-        }
-        mImageView.setImageBitmap(bitmap);
-        mImageView.setVisibility(VISIBLE);
-    }
-
-    public void setVideoVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void stopAudio() {
-        // TODO Auto-generated method stub
-    }
-
-    public void stopVideo() {
-        // TODO Auto-generated method stub
-    }
-
-    public void reset() {
-        if (mImageView != null) {
-            mImageView.setVisibility(GONE);
-        }
-    }
-
-    public void setVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void pauseAudio() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void pauseVideo() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekAudio(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekVideo(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-}
diff --git a/src/com/android/mms/ui/MessageListView.java b/src/com/android/mms/ui/MessageListView.java
deleted file mode 100644
index 3552874..0000000
--- a/src/com/android/mms/ui/MessageListView.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import android.content.Context;
-import android.text.ClipboardManager;
-import android.util.AttributeSet;
-import android.view.KeyEvent;
-import android.widget.ListView;
-
-public final class MessageListView extends ListView {
-    public MessageListView(Context context) {
-        super(context);
-    }
-    
-    public MessageListView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-    
-    @Override
-    public boolean onKeyShortcut(int keyCode, KeyEvent event) {
-        switch (keyCode) {
-        case KeyEvent.KEYCODE_C:
-            MessageListItem view = (MessageListItem)getSelectedView();
-            if (view == null) {
-                break;
-            }
-            MessageItem item = view.getMessageItem();
-            if (item != null && item.isSms()) {
-                ClipboardManager clip =
-                    (ClipboardManager)getContext().getSystemService(Context.CLIPBOARD_SERVICE);
-                clip.setText(item.mBody);
-                return true;
-            }
-            break;
-        }
-
-        return super.onKeyShortcut(keyCode, event);
-    }
-    
-}
-
diff --git a/src/com/android/mms/ui/MessageUtils.java b/src/com/android/mms/ui/MessageUtils.java
deleted file mode 100644
index cb963c6..0000000
--- a/src/com/android/mms/ui/MessageUtils.java
+++ /dev/null
@@ -1,742 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.MmsConfig;
-import com.android.mms.R;
-import com.android.mms.model.SlideModel;
-import com.android.mms.model.SlideshowModel;
-import com.android.mms.model.CarrierContentRestriction;
-import com.android.mms.transaction.MessagingNotification;
-import com.android.mms.transaction.MmsMessageSender;
-import com.android.mms.util.AddressUtils;
-import com.google.android.mms.ContentType;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.CharacterSets;
-import com.google.android.mms.pdu.EncodedStringValue;
-import com.google.android.mms.pdu.MultimediaMessagePdu;
-import com.google.android.mms.pdu.NotificationInd;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduPart;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.pdu.RetrieveConf;
-import com.google.android.mms.pdu.SendReq;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.ProgressDialog;
-import android.content.ContentUris;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.DialogInterface.OnCancelListener;
-import android.content.DialogInterface.OnClickListener;
-import android.content.res.Resources;
-import android.database.Cursor;
-import android.graphics.Bitmap;
-import android.graphics.Bitmap.CompressFormat;
-import android.media.RingtoneManager;
-import android.net.Uri;
-import android.os.Handler;
-import android.provider.Settings;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.Sms;
-import android.provider.Telephony.Threads;
-import android.telephony.PhoneNumberUtils;
-import android.telephony.TelephonyManager;
-import android.text.TextUtils;
-import android.text.format.DateUtils;
-import android.text.format.Time;
-import android.text.style.URLSpan;
-import android.util.Log;
-
-import java.io.ByteArrayOutputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * An utility class for managing messages.
- */
-public class MessageUtils {
-    interface ResizeImageResultCallback {
-        void onResizeResult(PduPart part);
-    }
-
-    private static final String TAG = "MessageUtils";
-    private static String sLocalNumber;
-
-    // Cache of both groups of space-separated ids to their full
-    // comma-separated display names, as well as individual ids to
-    // display names.
-    // TODO: is it possible for canonical address ID keys to be
-    // re-used?  SQLite does reuse IDs on NULL id_ insert, but does
-    // anything ever delete from the mmssms.db canonical_addresses
-    // table?  Nothing that I could find.
-    private static final Map<String, String> sRecipientAddress =
-            new ConcurrentHashMap<String, String>(20 /* initial capacity */);
-
-    public static final int READ_THREAD   = 1;
-
-    private MessageUtils() {
-        // Forbidden being instantiated.
-    }
-
-    public static String getMessageDetails(Context context, Cursor cursor, int size) {
-        if (cursor == null) {
-            return null;
-        }
-
-        if ("mms".equals(cursor.getString(MessageListAdapter.COLUMN_MSG_TYPE))) {
-            int type = cursor.getInt(MessageListAdapter.COLUMN_MMS_MESSAGE_TYPE);
-            switch (type) {
-                case PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND:
-                    return getNotificationIndDetails(context, cursor);
-                case PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF:
-                case PduHeaders.MESSAGE_TYPE_SEND_REQ:
-                    return getMultimediaMessageDetails(context, cursor, size);
-                default:
-                    Log.w(TAG, "No details could be retrieved.");
-                    return "";
-            }
-        } else {
-            return getTextMessageDetails(context, cursor);
-        }
-    }
-
-    private static String getNotificationIndDetails(Context context, Cursor cursor) {
-        StringBuilder details = new StringBuilder();
-        Resources res = context.getResources();
-
-        long id = cursor.getLong(MessageListAdapter.COLUMN_ID);
-        Uri uri = ContentUris.withAppendedId(Mms.CONTENT_URI, id);
-        NotificationInd nInd;
-
-        try {
-            nInd = (NotificationInd) PduPersister.getPduPersister(
-                    context).load(uri);
-        } catch (MmsException e) {
-            Log.e(TAG, "Failed to load the message: " + uri, e);
-            return context.getResources().getString(R.string.cannot_get_details);
-        }
-
-        // Message Type: Mms Notification.
-        details.append(res.getString(R.string.message_type_label));
-        details.append(res.getString(R.string.multimedia_notification));
-
-        // From: ***
-        String from = extractEncStr(context, nInd.getFrom());
-        details.append('\n');
-        details.append(res.getString(R.string.from_label));
-        details.append(!TextUtils.isEmpty(from)? from:
-                                 res.getString(R.string.hidden_sender_address));
-
-        // Date: ***
-        details.append('\n');
-        details.append(res.getString(
-                                R.string.expire_on,
-                                MessageUtils.formatTimeStampString(
-                                        context, nInd.getExpiry() * 1000L, true)));
-
-        // Subject: ***
-        details.append('\n');
-        details.append(res.getString(R.string.subject_label));
-
-        EncodedStringValue subject = nInd.getSubject();
-        if (subject != null) {
-            details.append(subject.getString());
-        }
-
-        // Message class: Personal/Advertisement/Infomational/Auto
-        details.append('\n');
-        details.append(res.getString(R.string.message_class_label));
-        details.append(new String(nInd.getMessageClass()));
-
-        // Message size: *** KB
-        details.append('\n');
-        details.append(res.getString(R.string.message_size_label));
-        details.append(String.valueOf((nInd.getMessageSize() + 1023) / 1024));
-        details.append(context.getString(R.string.kilobyte));
-
-        return details.toString();
-    }
-
-    private static String getMultimediaMessageDetails(
-            Context context, Cursor cursor, int size) {
-        int type = cursor.getInt(MessageListAdapter.COLUMN_MMS_MESSAGE_TYPE);
-        if (type == PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND) {
-            return getNotificationIndDetails(context, cursor);
-        }
-
-        StringBuilder details = new StringBuilder();
-        Resources res = context.getResources();
-
-        long id = cursor.getLong(MessageListAdapter.COLUMN_ID);
-        Uri uri = ContentUris.withAppendedId(Mms.CONTENT_URI, id);
-        MultimediaMessagePdu msg;
-
-        try {
-            msg = (MultimediaMessagePdu) PduPersister.getPduPersister(
-                    context).load(uri);
-        } catch (MmsException e) {
-            Log.e(TAG, "Failed to load the message: " + uri, e);
-            return context.getResources().getString(R.string.cannot_get_details);
-        }
-
-        // Message Type: Text message.
-        details.append(res.getString(R.string.message_type_label));
-        details.append(res.getString(R.string.multimedia_message));
-
-        if (msg instanceof RetrieveConf) {
-            // From: ***
-            String from = extractEncStr(context, ((RetrieveConf) msg).getFrom());
-            details.append('\n');
-            details.append(res.getString(R.string.from_label));
-            details.append(!TextUtils.isEmpty(from)? from:
-                                  res.getString(R.string.hidden_sender_address));
-        }
-
-        // To: ***
-        details.append('\n');
-        details.append(res.getString(R.string.to_address_label));
-        EncodedStringValue[] to = msg.getTo();
-        if (to != null) {
-            details.append(EncodedStringValue.concat(to));
-        }
-        else {
-            Log.w(TAG, "recipient list is empty!");
-        }
-            
-
-        // Bcc: ***
-        if (msg instanceof SendReq) {
-            EncodedStringValue[] values = ((SendReq) msg).getBcc();
-            if ((values != null) && (values.length > 0)) {
-                details.append('\n');
-                details.append(res.getString(R.string.bcc_label));
-                details.append(EncodedStringValue.concat(values));
-            }
-        }
-
-        // Date: ***
-        details.append('\n');
-        int msgBox = cursor.getInt(MessageListAdapter.COLUMN_MMS_MESSAGE_BOX);
-        if (msgBox == Mms.MESSAGE_BOX_DRAFTS) {
-            details.append(res.getString(R.string.saved_label));
-        } else if (msgBox == Mms.MESSAGE_BOX_INBOX) {
-            details.append(res.getString(R.string.received_label));
-        } else {
-            details.append(res.getString(R.string.sent_label));
-        }
-
-        details.append(MessageUtils.formatTimeStampString(
-                context, msg.getDate() * 1000L, true));
-
-        // Subject: ***
-        details.append('\n');
-        details.append(res.getString(R.string.subject_label));
-
-        EncodedStringValue subject = msg.getSubject();
-        if (subject != null) {
-            String subStr = subject.getString();
-            // Message size should include size of subject.
-            size += subStr.length();
-            details.append(subStr);
-        }
-
-        // Priority: High/Normal/Low
-        details.append('\n');
-        details.append(res.getString(R.string.priority_label));
-        details.append(getPriorityDescription(context, msg.getPriority()));
-
-        // Message size: *** KB
-        details.append('\n');
-        details.append(res.getString(R.string.message_size_label));
-        details.append((size - 1)/1000 + 1);
-        details.append(" KB");
-
-        return details.toString();
-    }
-
-    private static String getTextMessageDetails(Context context, Cursor cursor) {
-        StringBuilder details = new StringBuilder();
-        Resources res = context.getResources();
-
-        // Message Type: Text message.
-        details.append(res.getString(R.string.message_type_label));
-        details.append(res.getString(R.string.text_message));
-
-        // Address: ***
-        details.append('\n');
-        int smsType = cursor.getInt(MessageListAdapter.COLUMN_SMS_TYPE);
-        if (Sms.isOutgoingFolder(smsType)) {
-            details.append(res.getString(R.string.to_address_label));
-        } else {
-            details.append(res.getString(R.string.from_label));
-        }
-        details.append(cursor.getString(MessageListAdapter.COLUMN_SMS_ADDRESS));
-
-        // Date: ***
-        details.append('\n');
-        if (smsType == Sms.MESSAGE_TYPE_DRAFT) {
-            details.append(res.getString(R.string.saved_label));
-        } else if (smsType == Sms.MESSAGE_TYPE_INBOX) {
-            details.append(res.getString(R.string.received_label));
-        } else {
-            details.append(res.getString(R.string.sent_label));
-        }
-
-        long date = cursor.getLong(MessageListAdapter.COLUMN_SMS_DATE);
-        details.append(MessageUtils.formatTimeStampString(context, date, true));
-
-        return details.toString();
-    }
-
-    static private String getPriorityDescription(Context context, int PriorityValue) {
-        Resources res = context.getResources();
-        switch(PriorityValue) {
-            case PduHeaders.PRIORITY_HIGH:
-                return res.getString(R.string.priority_high);
-            case PduHeaders.PRIORITY_LOW:
-                return res.getString(R.string.priority_low);
-            case PduHeaders.PRIORITY_NORMAL:
-            default:
-                return res.getString(R.string.priority_normal);
-        }
-    }
-
-    public static int getAttachmentType(SlideshowModel model) {
-        if (model == null) {
-            return AttachmentEditor.EMPTY;
-        }
-
-        int numberOfSlides = model.size();
-        if (numberOfSlides > 1) {
-            return AttachmentEditor.SLIDESHOW_ATTACHMENT;
-        } else if (numberOfSlides == 1) {
-            // Only one slide in the slide-show.
-            SlideModel slide = model.get(0);
-            if (slide.hasVideo()) {
-                return AttachmentEditor.VIDEO_ATTACHMENT;
-            }
-
-            if (slide.hasAudio() && slide.hasImage()) {
-                return AttachmentEditor.SLIDESHOW_ATTACHMENT;
-            }
-
-            if (slide.hasAudio()) {
-                return AttachmentEditor.AUDIO_ATTACHMENT;
-            }
-
-            if (slide.hasImage()) {
-                return AttachmentEditor.IMAGE_ATTACHMENT;
-            }
-
-            if (slide.hasText()) {
-                return AttachmentEditor.TEXT_ONLY;
-            }
-        }
-
-        return AttachmentEditor.EMPTY;
-    }
-    
-    public static String formatTimeStampString(Context context, long when) {
-        return formatTimeStampString(context, when, false);
-    }
-
-    public static String formatTimeStampString(Context context, long when, boolean fullFormat) {
-        Time then = new Time();
-        then.set(when);
-        Time now = new Time();
-        now.setToNow();
-
-        // Basic settings for formatDateTime() we want for all cases.
-        int format_flags = DateUtils.FORMAT_NO_NOON_MIDNIGHT |
-                           DateUtils.FORMAT_ABBREV_ALL |
-                           DateUtils.FORMAT_CAP_AMPM;
-        
-        // If the message is from a different year, show the date and year.
-        if (then.year != now.year) {
-            format_flags |= DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_SHOW_DATE;
-        } else if (then.yearDay != now.yearDay) {
-            // If it is from a different day than today, show only the date.
-            format_flags |= DateUtils.FORMAT_SHOW_DATE;
-        } else {
-            // Otherwise, if the message is from today, show the time.
-            format_flags |= DateUtils.FORMAT_SHOW_TIME;
-        }
-
-        return DateUtils.formatDateTime(context, when, format_flags);
-    }
-
-    /**
-     * @parameter recipientIds space-separated list of ids
-     */
-    public static String getRecipientsByIds(Context context, String recipientIds) {
-        String value = sRecipientAddress.get(recipientIds);
-        if (value != null) {
-            return value;
-        }
-        if (!TextUtils.isEmpty(recipientIds)) {
-            StringBuilder addressBuf = extractIdsToAddresses(context, recipientIds);
-            if (addressBuf == null) {
-                // temporary error?  Don't memoize.
-                return "";
-            }
-            value = addressBuf.toString();
-        } else {
-            value = "";
-        }
-        sRecipientAddress.put(recipientIds, value);
-        return value;
-    }
-
-    private static StringBuilder extractIdsToAddresses(Context context,
-            String recipients) {
-        StringBuilder addressBuf = new StringBuilder();
-        String[] recipientIds = recipients.split(" ");
-        boolean firstItem = true;
-        for (String recipientId : recipientIds) {
-            String value = sRecipientAddress.get(recipientId);
-            if (value == null) {
-                Uri uri = Uri.parse("content://mms-sms/canonical-address/" +
-                                    recipientId);
-                Cursor c = SqliteWrapper.query(context, context.getContentResolver(),
-                                               uri, null, null, null, null);
-                if (c != null) {
-                    try {
-                        if (c.moveToFirst()) {
-                            value = c.getString(0);
-                        }
-                    } finally {
-                        c.close();
-                    }
-                }
-            }
-            if (value == null) {
-                continue;
-            }
-            sRecipientAddress.put(recipientId, value);
-            if (firstItem) {
-                firstItem = false;
-            } else {
-                addressBuf.append(";");
-            }
-            addressBuf.append(value);
-        }
-
-        return (addressBuf.length() == 0) ? null : addressBuf;
-    }
-
-    public static String getAddressByThreadId(Context context, long threadId) {
-        String[] projection = new String[] { Threads.RECIPIENT_IDS };
-
-        Uri.Builder builder = Threads.CONTENT_URI.buildUpon();
-        builder.appendQueryParameter("simple", "true");
-        Cursor cursor = SqliteWrapper.query(context, context.getContentResolver(),
-                            builder.build(), projection,
-                            Threads._ID + "=" + threadId, null, null);
-
-        if (cursor != null) {
-            try {
-                if ((cursor.getCount() == 1) && cursor.moveToFirst()) {
-                    String address = getRecipientsByIds(context,
-                            cursor.getString(0));
-                    if (!TextUtils.isEmpty(address)) {
-                        return address;
-                    }
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-        return null;
-    }
-
-    public static void selectAudio(Context context, int requestCode) {
-        if (context instanceof Activity) {
-            Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
-            intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, false);
-            intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false);
-            intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, 
-                    context.getString(R.string.select_audio));
-            ((Activity) context).startActivityForResult(intent, requestCode);
-        }
-    }
-
-    public static void recordSound(Context context, int requestCode) {
-        if (context instanceof Activity) {
-            Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
-            intent.setType(ContentType.AUDIO_AMR);
-            intent.setClassName("com.android.soundrecorder",
-                    "com.android.soundrecorder.SoundRecorder");
-
-            ((Activity) context).startActivityForResult(intent, requestCode);
-        }
-    }
-
-    public static void selectVideo(Context context, int requestCode) {
-        selectMediaByType(context, requestCode, ContentType.VIDEO_UNSPECIFIED);
-    }
-
-    public static void selectImage(Context context, int requestCode) {
-        selectMediaByType(context, requestCode, ContentType.IMAGE_UNSPECIFIED);
-    }
-
-    private static void selectMediaByType(
-            Context context, int requestCode, String contentType) {
-         if (context instanceof Activity) {
-
-            Intent innerIntent = new Intent(Intent.ACTION_GET_CONTENT);
-
-            innerIntent.setType(contentType);
-
-            Intent wrapperIntent = Intent.createChooser(innerIntent, null);
-
-            ((Activity) context).startActivityForResult(wrapperIntent, requestCode);
-        }
-    }
-
-    public static void showErrorDialog(Context context,
-            String title, String message) {
-        AlertDialog.Builder builder = new AlertDialog.Builder(context);
-
-        builder.setIcon(R.drawable.ic_sms_mms_not_delivered);
-        builder.setTitle(title);
-        builder.setMessage(message);
-        builder.setPositiveButton(android.R.string.ok, null);
-        builder.show();
-    }
-
-    public static Uri saveBitmapAsPart(Context context, Uri messageUri, Bitmap bitmap)
-            throws MmsException {
-        ByteArrayOutputStream os = new ByteArrayOutputStream();
-        bitmap.compress(CompressFormat.JPEG,
-                MmsConfig.IMAGE_COMPRESSION_QUALITY, os);
-
-        PduPart part = new PduPart();
-
-        part.setContentType("image/jpeg".getBytes());
-        String contentId = "Image" + System.currentTimeMillis();
-        part.setContentLocation((contentId + ".jpg").getBytes());
-        part.setContentId(contentId.getBytes());
-        part.setData(os.toByteArray());
-
-        return PduPersister.getPduPersister(context).persistPart(part,
-                        ContentUris.parseId(messageUri));
-    }
-
-    public static void markAsRead(Context context, long threadId) {
-        ContentValues values = new ContentValues(1);
-        values.put("read", READ_THREAD);
-        SqliteWrapper.update(context, context.getContentResolver(),
-                ContentUris.withAppendedId(Threads.CONTENT_URI, threadId),
-                values, "read=0", null);
-        MessagingNotification.updateNewMessageIndicator(context, threadId);
-    }
-
-    public static void resizeImageAsync(final Context context,
-            final Uri imageUri, final Handler handler,
-            final ResizeImageResultCallback cb) {
-
-        // Show a progress dialog if the resize hasn't finished
-        // within one second.
-
-        // Make the progress dialog.
-        final ProgressDialog progressDialog = new ProgressDialog(context);
-        progressDialog.setTitle(context.getText(R.string.image_too_large));
-        progressDialog.setMessage(context.getText(R.string.compressing));
-        progressDialog.setIndeterminate(true);
-        progressDialog.setCancelable(false);
-        
-        // Stash the runnable for showing it away so we can cancel
-        // it later if the resize completes ahead of the deadline.
-        final Runnable showProgress = new Runnable() {
-            public void run() {
-                progressDialog.show();
-            }
-        };
-        // Schedule it for one second from now.
-        handler.postDelayed(showProgress, 1000);
-        
-        new Thread(new Runnable() {
-            public void run() {
-                final PduPart part;
-                try {
-                    UriImage image = new UriImage(context, imageUri);
-                    part = image.getResizedImageAsPart(
-                        CarrierContentRestriction.IMAGE_WIDTH_LIMIT,
-                        CarrierContentRestriction.IMAGE_HEIGHT_LIMIT);
-                } finally {
-                    // Cancel pending show of the progress dialog if necessary.
-                    handler.removeCallbacks(showProgress);
-                    // Dismiss the progress dialog if it's around.
-                    progressDialog.dismiss();
-                }
-
-                handler.post(new Runnable() {
-                    public void run() {
-                        cb.onResizeResult(part);
-                    }
-                });
-            }
-        }).start();
-    }
-
-    public static void showDiscardDraftConfirmDialog(Context context,
-            OnClickListener listener) {
-        new AlertDialog.Builder(context)
-                .setIcon(android.R.drawable.ic_dialog_alert)
-                .setTitle(R.string.discard_message)
-                .setMessage(R.string.discard_message_reason)
-                .setPositiveButton(R.string.yes, listener)
-                .setNegativeButton(R.string.no, null)
-                .show();
-    }
-
-    private static String getLocalNumber() {
-        if (null == sLocalNumber) {
-            sLocalNumber = TelephonyManager.getDefault().getLine1Number();
-        }
-        return sLocalNumber;
-    }
-
-    public static boolean isLocalNumber(String number) {
-        return PhoneNumberUtils.compare(number, getLocalNumber());
-    }
-
-    public static void handleReadReport(final Context context,
-            final long threadId,
-            final int status,
-            final Runnable callback) {
-        String selection = Mms.MESSAGE_TYPE + " = " + PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF
-            + " AND " + Mms.READ + " = 0"
-            + " AND " + Mms.READ_REPORT + " = " + PduHeaders.VALUE_YES;
-
-        if (threadId != -1) {
-            selection = selection + " AND " + Mms.THREAD_ID + " = " + threadId;
-        }
-
-        final Cursor c = SqliteWrapper.query(context, context.getContentResolver(),
-                        Mms.Inbox.CONTENT_URI, new String[] {Mms._ID, Mms.MESSAGE_ID},
-                        selection, null, null);
-
-        if (c == null) {
-            return;
-        }
-
-        final Map<String, String> map = new HashMap<String, String>();
-        try {
-            if (c.getCount() == 0) {
-                if (callback != null) {
-                    callback.run();
-                }
-                return;
-            }
-
-            while (c.moveToNext()) {
-                Uri uri = ContentUris.withAppendedId(Mms.CONTENT_URI, c.getLong(0));
-                map.put(c.getString(1), AddressUtils.getFrom(context, uri));
-            }
-        } finally {
-            c.close();
-        }
-
-        OnClickListener positiveListener = new OnClickListener() {
-            public void onClick(DialogInterface dialog, int which) {
-                for (final Map.Entry<String, String> entry : map.entrySet()) {
-                    MmsMessageSender.sendReadRec(context, entry.getValue(),
-                                                 entry.getKey(), status);
-                }
-
-                if (callback != null) {
-                    callback.run();
-                }
-            }
-        };
-
-        OnClickListener negativeListener = new OnClickListener() {
-            public void onClick(DialogInterface dialog, int which) {
-                if (callback != null) {
-                    callback.run();
-                }
-            }
-        };
-
-        OnCancelListener cancelListener = new OnCancelListener() {
-            public void onCancel(DialogInterface dialog) {
-                if (callback != null) {
-                    callback.run();
-                }
-            }
-        };
-
-        confirmReadReportDialog(context, positiveListener,
-                                         negativeListener,
-                                         cancelListener);
-    }
-
-    private static void confirmReadReportDialog(Context context,
-            OnClickListener positiveListener, OnClickListener negativeListener,
-            OnCancelListener cancelListener) {
-        AlertDialog.Builder builder = new AlertDialog.Builder(context);
-        builder.setCancelable(true);
-        builder.setTitle(R.string.confirm);
-        builder.setMessage(R.string.message_send_read_report);
-        builder.setPositiveButton(R.string.yes, positiveListener);
-        builder.setNegativeButton(R.string.no, negativeListener);
-        builder.setOnCancelListener(cancelListener);
-        builder.show();
-    }
-
-    public static String extractEncStrFromCursor(Cursor cursor,
-            int columnRawBytes, int columnCharset) {
-        String rawBytes = cursor.getString(columnRawBytes);
-        int charset = cursor.getInt(columnCharset);
-
-        if (TextUtils.isEmpty(rawBytes)) {
-            return "";
-        } else if (charset == CharacterSets.ANY_CHARSET) {
-            return rawBytes;
-        } else {
-            return new EncodedStringValue(charset, PduPersister.getBytes(rawBytes)).getString();
-        }
-    }
-
-    private static String extractEncStr(Context context, EncodedStringValue value) {
-        if (value != null) {
-            return value.getString();
-        } else {
-            return "";
-        }
-    }
-    
-    public static ArrayList<String> extractUris(URLSpan[] spans) {
-        int size = spans.length;
-        ArrayList<String> accumulator = new ArrayList<String>();
-
-        for (int i = 0; i < size; i++) {
-            accumulator.add(spans[i].getURL());
-        }
-        return accumulator;
-    }
-
-}
diff --git a/src/com/android/mms/ui/MessagingPreferenceActivity.java b/src/com/android/mms/ui/MessagingPreferenceActivity.java
deleted file mode 100644
index 9027e16..0000000
--- a/src/com/android/mms/ui/MessagingPreferenceActivity.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.google.android.mms.pdu.PduHeaders;
-
-import android.content.Context;
-import android.os.Bundle;
-import android.preference.PreferenceActivity;
-import android.preference.PreferenceManager;
-import android.view.Menu;
-import android.view.MenuItem;
-
-/**
- * With this activity, users can set preferences for MMS and SMS and
- * can access and manipulate SMS messages stored on the SIM.
- */
-public class MessagingPreferenceActivity extends PreferenceActivity {
-
-    // Creation modes
-    public static final int VALUE_CREATION_MODE_RESTRICTED = 0;
-    public static final int VALUE_CREATION_MODE_WARNING    = 1;
-    public static final int VALUE_CREATION_MODE_FREE       = 2;
-
-    // Re-submission modes
-    public static final int VALUE_RESUBMISSION_MODE_RESTRICTED = 0;
-    public static final int VALUE_RESUBMISSION_MODE_WARNING    = 1;
-    public static final int VALUE_RESUBMISSION_MODE_FREE       = 2;
-
-    // Symbolic names for the keys used for preference lookup
-    public static final String COMPRESS_IMAGE_MODE      = "pref_key_mms_compress_images";
-    public static final String CREATION_MODE            = "pref_key_mms_creation_mode";
-    public static final String MMS_DELIVERY_REPORT_MODE = "pref_key_mms_delivery_reports";
-    public static final String EXPIRY_TIME              = "pref_key_mms_expiry";
-    public static final String PRIORITY                 = "pref_key_mms_priority";
-    public static final String READ_REPORT_MODE         = "pref_key_mms_read_reports";
-    public static final String RESUBMISSION_MODE        = "pref_key_mms_resubmission_mode";
-    public static final String SMS_DELIVERY_REPORT_MODE = "pref_key_sms_delivery_reports";
-    public static final String NOTIFICATION_ENABLED     = "pref_key_enable_notifications";
-    public static final String NOTIFICATION_VIBRATE     = "pref_key_vibrate";
-    public static final String NOTIFICATION_SOUND       = "pref_key_sound";
-    public static final String NOTIFICATION_RINGTONE    = "pref_key_ringtone";
-    public static final String AUTO_RETRIEVAL           = "pref_key_mms_auto_retrieval";
-    public static final String RETRIEVAL_DURING_ROAMING = "pref_key_mms_retrieval_during_roaming";
-
-    // Menu entries
-    private static final int MENU_RESTORE_DEFAULTS    = 1;
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        addPreferencesFromResource(R.xml.preferences);
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        super.onCreateOptionsMenu(menu);
-        menu.clear();
-        menu.add(0, MENU_RESTORE_DEFAULTS, 0, R.string.restore_default);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case MENU_RESTORE_DEFAULTS:
-                restoreDefaultPreferences();
-                return true;
-        }
-        return false;
-    }
-    
-    private void restoreDefaultPreferences() {
-        PreferenceManager.getDefaultSharedPreferences(this)
-                .edit().clear().commit();
-        setPreferenceScreen(null);
-        addPreferencesFromResource(R.xml.preferences);
-    }
-
-    // TODO: Move this to a more appropriate class.
-    /**
-     * Given the name of a content class, which must be one of the
-     * "pref_entry_values_mms_content_class" values in
-     * "res/values/arrays.xml", return the corresponding ID.
-     */
-    public static int convertContentClass(String contentValue) {
-        return Integer.parseInt(contentValue);
-    }
-
-    // TODO: Move this to a more appropriate class.
-    /**
-     * Given the string value of an expiry time from
-     * Sharedpreferences, which must be one of the
-     * "pref_entry_values_mms_expiry" values in
-     * "res/values/arrays.xml", return the corresponding number of
-     * seconds.
-     */
-    public static int convertExpiryTime(String expiryTimeName) {
-        return Integer.parseInt(expiryTimeName);
-    }
-
-    // TODO: Move this to a more appropriate class.
-    /**
-     * Given the string value of a maximum size from
-     * Sharedpreferences, which must be one of the
-     * "pref_entry_values_mms_max_size" values in
-     * "res/values/arrays.xml", return the corresponding number of
-     * bytes.
-     */
-    public static long convertMaxMmsSize(String maxSize) {
-        return Long.parseLong(maxSize);
-    }
-
-    // TODO: Move this to a more appropriate class.
-    /**
-     * Given the name of a priority class, which must be one of the
-     * "pref_entry_values_mms_priority" values in
-     * "res/values/arrays.xml", return the corresponding ID.
-     */
-    public static int convertPriorityId(String priorityValue) {
-        if ("low".equals(priorityValue)) {
-            return PduHeaders.PRIORITY_LOW;
-        } else if ("medium".equals(priorityValue)) {
-            return PduHeaders.PRIORITY_NORMAL;
-        } else if ("high".equals(priorityValue)) {
-            return PduHeaders.PRIORITY_HIGH;
-        } else {
-            throw new IllegalArgumentException("Unknown MMS priority.");
-        }
-    }
-
-    // TODO: Move this to a more appropriate class.
-    /**
-     * Given the name of a creation mode, which must be one of the
-     * "pref_entry_values_mms_creation_mode" values in
-     * "res/values/arrays.xml", return the corresponding ID.
-     */
-    public static int convertCreationMode(String modeName) {
-        if ("creation".equals(modeName)) {
-            return MessagingPreferenceActivity.VALUE_CREATION_MODE_RESTRICTED;
-        } else if ("warning".equals(modeName)) {
-            return MessagingPreferenceActivity.VALUE_CREATION_MODE_WARNING;
-        } else if ("free".equals(modeName)) {
-            return MessagingPreferenceActivity.VALUE_CREATION_MODE_FREE;
-        } else {
-            throw new IllegalArgumentException("Unknown MMS creation mode.");
-        }
-    }
-
-    // TODO: Move this to a more appropriate class.
-    /**
-     * Given the name of a resubmission mode, which must be one of the
-     * "pref_entry_values_mms_resubmission_mode" values in
-     * "res/values/arrays.xml", return the corresponding ID.
-     */
-    public static int convertResubmissionMode(String modeName) {
-        if ("creation".equals(modeName)) {
-            return MessagingPreferenceActivity.VALUE_RESUBMISSION_MODE_RESTRICTED;
-        } else if ("warning".equals(modeName)) {
-            return MessagingPreferenceActivity.VALUE_RESUBMISSION_MODE_WARNING;
-        } else if ("free".equals(modeName)) {
-            return MessagingPreferenceActivity.VALUE_RESUBMISSION_MODE_FREE;
-        } else {
-            throw new IllegalArgumentException("Unknown MMS resubmission mode.");
-        }
-    }
-}
diff --git a/src/com/android/mms/ui/MmsThumbnailPresenter.java b/src/com/android/mms/ui/MmsThumbnailPresenter.java
deleted file mode 100644
index 2b62774..0000000
--- a/src/com/android/mms/ui/MmsThumbnailPresenter.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.android.mms.model.AudioModel;
-import com.android.mms.model.ImageModel;
-import com.android.mms.model.Model;
-import com.android.mms.model.SlideModel;
-import com.android.mms.model.SlideshowModel;
-import com.android.mms.model.VideoModel;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-
-public class MmsThumbnailPresenter extends Presenter {
-
-    public MmsThumbnailPresenter(Context context, ViewInterface view, Model model) {
-        super(context, view, model);
-    }
-
-    @Override
-    public void present() {
-        SlideModel slide = ((SlideshowModel) mModel).get(0);
-        if (slide != null) {
-            presentFirstSlide((SlideViewInterface) mView, slide);
-        }
-    }
-
-    private void presentFirstSlide(SlideViewInterface view, SlideModel slide) {
-        view.reset();
-
-        if (slide.hasImage()) {
-            presentImageThumbnail(view, slide.getImage());
-        } else if (slide.hasVideo()) {
-            presentVideoThumbnail(view, slide.getVideo());
-        } else if (slide.hasAudio()) {
-            presentAudioThumbnail(view, slide.getAudio());
-        }
-    }
-
-    private void presentVideoThumbnail(SlideViewInterface view, VideoModel video) {
-        if (video.isDrmProtected()) {
-            showDrmIcon(view, video.getSrc());
-        } else {
-            view.setVideo(video.getSrc(), video.getUri());
-        }
-    }
-
-    private void presentImageThumbnail(SlideViewInterface view, ImageModel image) {
-        if (image.isDrmProtected()) {
-            showDrmIcon(view, image.getSrc());
-        } else {
-            view.setImage(image.getSrc(), image.getBitmap());
-        }
-    }
-
-    protected void presentAudioThumbnail(SlideViewInterface view, AudioModel audio) {
-        if (audio.isDrmProtected()) {
-            showDrmIcon(view, audio.getSrc());
-        } else {
-            view.setAudio(audio.getUri(), audio.getSrc(), audio.getExtras());
-        }
-    }
-
-    // Show an icon instead of real content in the thumbnail.
-    private void showDrmIcon(SlideViewInterface view, String name) {
-        Bitmap bitmap = BitmapFactory.decodeResource(
-                mContext.getResources(), R.drawable.ic_mms_drm_protected);
-        view.setImage(name, bitmap);
-    }
-
-    public void onModelChanged(Model model, boolean dataChanged) {
-        // TODO Auto-generated method stub
-    }
-}
diff --git a/src/com/android/mms/ui/Presenter.java b/src/com/android/mms/ui/Presenter.java
deleted file mode 100644
index d15a33c..0000000
--- a/src/com/android/mms/ui/Presenter.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import android.content.Context;
-
-import com.android.mms.model.IModelChangedObserver;
-import com.android.mms.model.Model;
-
-/**
- * An abstract message presenter.
- */
-public abstract class Presenter implements IModelChangedObserver {
-    protected final Context mContext;
-    protected final int mViewWidth;
-    protected final int mViewHeight;
-    protected ViewInterface mView;
-    protected Model mModel;
-
-    public Presenter(Context context, ViewInterface view, Model model) {
-        mContext = context;
-        mView = view;
-        mViewWidth = view.getWidth();
-        mViewHeight = view.getHeight();
-
-        mModel = model;
-        mModel.registerModelChangedObserver(this);
-    }
-
-    public ViewInterface getView() {
-        return mView;
-    }
-
-    public void setView(ViewInterface view) {
-        mView = view;
-    }
-
-    public Model getModel() {
-        return mModel;
-    }
-
-    public abstract void present();
-}
diff --git a/src/com/android/mms/ui/PresenterFactory.java b/src/com/android/mms/ui/PresenterFactory.java
deleted file mode 100644
index dcd3c5c..0000000
--- a/src/com/android/mms/ui/PresenterFactory.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import android.content.Context;
-import android.util.Log;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-
-import com.android.mms.model.Model;
-
-/**
- * The factory of concrete presenters.
- */
-public class PresenterFactory {
-    private static final String TAG = "PresenterFactory";
-    private static final String PRESENTER_PACKAGE = "com.android.mms.ui.";
-
-    public static Presenter getPresenter(String className, Context context,
-            ViewInterface view, Model model) {
-        try {
-            if (className.indexOf(".") == -1) {
-                className = PRESENTER_PACKAGE + className;
-            }
-
-            Class c = Class.forName(className);
-            Constructor constructor = c.getConstructor(
-                    Context.class, ViewInterface.class, Model.class);
-            return (Presenter) constructor.newInstance(context, view, model);
-        } catch (ClassNotFoundException e) {
-            Log.e(TAG, "Type not found: " + className, e);
-        } catch (NoSuchMethodException e) {
-            // Impossible to reach here.
-            Log.e(TAG, "No such constructor.", e);
-        } catch (InvocationTargetException e) {
-            Log.e(TAG, "Unexpected InvocationTargetException", e);
-        } catch (IllegalAccessException e) {
-            Log.e(TAG, "Unexpected IllegalAccessException", e);
-        } catch (InstantiationException e) {
-            Log.e(TAG, "Unexpected InstantiationException", e);
-        }
-
-        return null;
-    }
-}
diff --git a/src/com/android/mms/ui/RecipientList.java b/src/com/android/mms/ui/RecipientList.java
deleted file mode 100644
index d0a77f6..0000000
--- a/src/com/android/mms/ui/RecipientList.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.internal.telephony.CallerInfo;
-import com.android.mms.transaction.MessageSender;
-import com.android.mms.util.ContactInfoCache;
-
-import android.content.Context;
-import android.provider.Telephony.Mms;
-import android.telephony.PhoneNumberUtils;
-import android.text.Annotation;
-import android.text.Spannable;
-import android.text.SpannableString;
-import android.text.TextUtils;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-public class RecipientList {
-    private final ArrayList<Recipient> mRecipients = new ArrayList<Recipient>();
-    private final ArrayList<Recipient> mInvalidRecipients = new ArrayList<Recipient>();
-
-    public RecipientList() {
-    }
-
-    public int size() { return mRecipients.size(); }
-
-    public int countInvalidRecipients() { return mInvalidRecipients.size(); }
-    
-    public void add(Recipient r) {
-        if ((null != r) && Recipient.isValid(r.number)) {
-            mRecipients.add(r.filter());
-        } else {
-            mInvalidRecipients.add(r);
-        }
-    }
-
-    public Iterator<Recipient> iterator() { return mRecipients.iterator(); }
-
-    public static class Recipient {
-        public long person_id = -1;
-        public String name;
-        public CharSequence label;
-        public String number;           // often filtered from 800-892-1212 to 8008921212
-        public String nameAndNumber;    // Fred Flintstone <670-782-1123>
-        public boolean bcc;
-
-        @Override
-        public String toString() {
-            return "{ name=" + name + " number= " + number +
-                    " nameAndNumber=" + nameAndNumber +
-                    " person_id=" + person_id + " label=" + label +
-                    " bcc=" + bcc + " }";
-        }
-
-        /*
-         * These are the characters that we permit in input but that we
-         * filter out.
-         */
-        private static final String PHONE_NUMBER_SEPARATORS = " ()-./";
-
-        public static boolean isValid(String recipient) {
-            return isPhoneNumber(recipient) || Mms.isEmailAddress(recipient);
-        }
-
-        public static boolean isPhoneNumber(String recipient) {
-            /*
-             * Don't use Regex.PHONE_PATTERN because that is intended to
-             * detect things that look like phone numbers in arbitrary text,
-             * not to validate whether a given string is usable as a phone
-             * number.
-             *
-             * Accept anything that contains nothing but digits and the
-             * characters in PHONE_NUMBER_SEPARATORS, plus an optional
-             * leading plus, as long as there is at least one digit.
-             * Reject any other characters.
-             */
-
-            int len = recipient.length();
-            int digits = 0;
-            
-            for (int i = 0; i < len; i++) {
-                char c = recipient.charAt(i);
-
-                if (Character.isDigit(c)) {
-                    digits++;
-                    continue;
-                }
-                if (PHONE_NUMBER_SEPARATORS.indexOf(c) >= 0) {
-                    continue;
-                }
-                if (c == '+' && i == 0) {
-                    continue;
-                }
-
-                return false;
-            }
-
-            if (digits == 0) {
-                return false;
-            } else {
-                return true;
-            }
-        }
-
-        public Recipient filter() {
-            Recipient result = new Recipient();
-
-            result.person_id = person_id;
-            result.name = name;
-            result.label = label;
-            result.number = Mms.isEmailAddress(number)
-                    ? number
-                    : filterPhoneNumber(number);
-            result.bcc = bcc;
-            result.nameAndNumber = nameAndNumber;
-            return result;
-        }
-
-        /**
-         * Returns a string with all phone number separator characters removed.
-         * @param phoneNumber A phone number to clean (e.g. "+1 (212) 479-7990")
-         * @return A string without the separators (e.g. "12124797990")
-         */
-        public static String filterPhoneNumber(String phoneNumber) {
-            if (phoneNumber == null) {
-                return null;
-            }
-
-            int length = phoneNumber.length();
-            StringBuilder builder = new StringBuilder(length);
-
-            for (int i = 0; i < length; i++) {
-                char character = phoneNumber.charAt(i);
-
-                if (PHONE_NUMBER_SEPARATORS.indexOf(character) == -1) {
-                    builder.append(character);
-                }
-            }
-            return builder.toString();
-        }
-
-        public CharSequence toToken() {
-            SpannableString s = new SpannableString(this.nameAndNumber);
-            int len = s.length();
-
-            if (len == 0) {
-                return s;
-            }
-
-            if (person_id != -1) {
-                s.setSpan(new Annotation("person_id",
-                                         String.valueOf(person_id)),
-                          0, len,
-                          Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-            }
-            if (name != null) {
-                s.setSpan(new Annotation("name", name), 0, len,
-                          Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-            }
-            if (label != null) {
-                s.setSpan(new Annotation("label", label.toString()), 0, len,
-                          Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-            }
-            if (number != null) {
-                s.setSpan(new Annotation("number", number), 0, len,
-                          Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-            }
-            s.setSpan(new Annotation("bcc", String.valueOf(bcc)), 0, len,
-                      Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-
-            return s;
-        }
-        
-        public static String buildNameAndNumber(String name, String number) {
-            // Format like this: Mike Cleron <(650) 555-1234>
-            //                   Erick Tseng <(650) 555-1212>
-            //                   Tutankhamun <tutank1341@gmail.com>
-            //                   (408) 555-1289
-            String formattedNumber = number;
-            if (!Mms.isEmailAddress(number)) {
-                formattedNumber = PhoneNumberUtils.formatNumber(number);
-            }
-            
-            if (!name.equals(number)) {
-                return name + " <" + formattedNumber + ">";
-            } else {
-                return formattedNumber;
-            }            
-        }
-    }
-
-    public static RecipientList from(String address, Context context) {
-        RecipientList list = new RecipientList();
-        ContactInfoCache cache = ContactInfoCache.getInstance();
-
-        if (!TextUtils.isEmpty(address)) {
-            String[] phoneNumbers = address.split(MessageSender.RECIPIENTS_SEPARATOR);
-            for (String number : phoneNumbers) {
-                Recipient recipient = new Recipient();
-                if (number.startsWith("%bcc%")) {
-                    recipient.bcc = true;
-                    number = number.substring(5);
-                }
-                
-                if (!Mms.isEmailAddress(number)) {
-                    /*
-                     * TODO: Consider getting the CallerInfo object asynchronously
-                     * to help with ui responsiveness, instead of running the query
-                     * directly from the UI thread
-                     */
-                    CallerInfo ci = cache.getCallerInfo(context, number);
-                    if (TextUtils.isEmpty(ci.name)) {
-                        recipient.person_id = -1;
-                        if (MessageUtils.isLocalNumber(ci.phoneNumber)) {
-                            recipient.name = "Me";
-                        } else {
-                            recipient.name = ci.phoneNumber;
-                        }
-                    } else {
-                        recipient.person_id = ci.person_id;
-                        recipient.name = ci.name;
-                    }
-                    recipient.label = ci.phoneLabel;
-                    recipient.number = (ci.phoneNumber == null) ? "" : ci.phoneNumber;
-                } else {
-                    recipient.number = number;
-                    recipient.name = cache.getDisplayName(context, number);
-                }
-                
-                recipient.nameAndNumber = Recipient.buildNameAndNumber(recipient.name,
-                        recipient.number);
-
-                list.add(recipient.filter());
-            }
-        }
-        return list;
-    }
-
-    public String[] getToNumbers() {
-        ArrayList<String> numbers = new ArrayList<String>();
-        int count = mRecipients.size();
-        for (int i = 0 ; i < count ; i++) {
-            Recipient recipient = mRecipients.get(i);
-            if (!recipient.bcc && !TextUtils.isEmpty(recipient.number)) {
-                numbers.add(recipient.number);
-            }
-        }
-        return numbers.toArray(new String[numbers.size()]);
-    }
-
-    public boolean containsBcc() {
-        int count = mRecipients.size();
-        for (int i = 0; i < count; i++) {
-            if (mRecipients.get(i).bcc) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public boolean containsEmail() {
-        int count = mRecipients.size();
-        for (int i = 0; i < count; i++) {
-            if (Mms.isEmailAddress(mRecipients.get(i).number)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public String[] getBccNumbers() {
-        ArrayList<String> numbers = new ArrayList<String>();
-        int count = mRecipients.size();
-        for (int i = 0 ; i < count ; i++) {
-            Recipient recipient = mRecipients.get(i);
-            if (recipient.bcc && !TextUtils.isEmpty(recipient.number)) {
-                numbers.add(recipient.number);
-            }
-        }
-        return numbers.toArray(new String[numbers.size()]);
-    }
-
-    public String[] getNumbers() {
-        int count = mRecipients.size();
-        ArrayList<String> numbers = new ArrayList<String>(count);
-        for (int i = 0 ; i < count ; i++) {
-            numbers.add((mRecipients.get(i)).number);
-        }
-        return numbers.toArray(new String[numbers.size()]);
-    }
-
-    public String serialize() {
-        StringBuilder sb = new StringBuilder();
-        int count = mRecipients.size();
-        for (int i = 0 ; i < count ; i++) {
-            if (i != 0) {
-                sb.append(MessageSender.RECIPIENTS_SEPARATOR);
-            }
-
-            Recipient recipient = mRecipients.get(i);
-            if (recipient.bcc) {
-                sb.append("%bcc%");
-            }
-            sb.append(recipient.number);
-        }
-        return sb.toString();
-    }
-
-    public boolean hasInvalidRecipient() {
-        return !mInvalidRecipients.isEmpty();
-    }
-
-    public boolean hasValidRecipient() {
-        return !mRecipients.isEmpty();
-    }
-
-    public String getInvalidRecipientString() {
-        StringBuilder sb = new StringBuilder();
-        int count = mInvalidRecipients.size();
-        for (int i = 0 ; i < count ; i++) {
-            if (i != 0) {
-                sb.append(",");
-            }
-
-            Recipient recipient = mInvalidRecipients.get(i);
-            if (recipient.bcc) {
-                sb.append("%bcc%");
-            }
-            sb.append(recipient.number);
-        }
-        return sb.toString();
-    }
-}
diff --git a/src/com/android/mms/ui/RecipientsAdapter.java b/src/com/android/mms/ui/RecipientsAdapter.java
deleted file mode 100644
index 8fbfab0..0000000
--- a/src/com/android/mms/ui/RecipientsAdapter.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.android.mms.ui.RecipientList.Recipient;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import com.android.internal.database.ArrayListCursor;
-import android.database.Cursor;
-import android.database.DatabaseUtils;
-import android.database.MergeCursor;
-import android.provider.Contacts;
-import android.provider.Contacts.ContactMethods;
-import android.provider.Contacts.Phones;
-import android.telephony.PhoneNumberUtils;
-import android.text.Annotation;
-import android.text.Spannable;
-import android.text.SpannableString;
-import android.text.TextUtils;
-import android.view.View;
-import android.widget.ResourceCursorAdapter;
-import android.widget.TextView;
-
-import java.util.ArrayList;
-
-/**
- * This adapter is used to filter contacts on both name and number.
- */
-public class RecipientsAdapter extends ResourceCursorAdapter {
-
-    public static final int PERSON_ID_INDEX = 1;
-    public static final int TYPE_INDEX      = 2;
-    public static final int NUMBER_INDEX    = 3;
-    public static final int LABEL_INDEX     = 4;
-    public static final int NAME_INDEX      = 5;
-
-    private static final String[] PROJECTION_PHONE = {
-        Contacts.Phones._ID,        // 0
-        Contacts.Phones.PERSON_ID,  // 1
-        Contacts.Phones.TYPE,       // 2
-        Contacts.Phones.NUMBER,     // 3
-        Contacts.Phones.LABEL,      // 4
-        Contacts.Phones.NAME,       // 5
-    };
-
-    private static final String SORT_ORDER = "name, type";
-
-    private final Context mContext;
-    private final ContentResolver mContentResolver;
-
-    public RecipientsAdapter(Context context) {
-        super(context, R.layout.recipient_filter_item, null);
-        mContext = context;
-        mContentResolver = context.getContentResolver();
-    }
-
-    @Override
-    public final CharSequence convertToString(Cursor cursor) {
-        String name = cursor.getString(RecipientsAdapter.NAME_INDEX);
-        int type = cursor.getInt(RecipientsAdapter.TYPE_INDEX);
-        String number = cursor.getString(RecipientsAdapter.NUMBER_INDEX).trim();
-
-        String label = cursor.getString(RecipientsAdapter.LABEL_INDEX);
-        CharSequence displayLabel = Phones.getDisplayLabel(mContext, type, label);
-
-        if (number.length() == 0) {
-            return number;
-        }
-
-        if (name == null) {
-            name = "";
-        }
-        
-        String nameAndNumber = Recipient.buildNameAndNumber(name, number);
-
-        SpannableString out = new SpannableString(nameAndNumber);
-        int len = out.length();
-
-        if (!TextUtils.isEmpty(name)) {
-            out.setSpan(new Annotation("name", name), 0, len,
-                        Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-        } else {
-            out.setSpan(new Annotation("name", number), 0, len,
-                        Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-        }
-
-        String person_id = cursor.getString(RecipientsAdapter.PERSON_ID_INDEX);
-        out.setSpan(new Annotation("person_id", person_id), 0, len,
-                    Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-        out.setSpan(new Annotation("label", displayLabel.toString()), 0, len,
-                    Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-        out.setSpan(new Annotation("number", number), 0, len,
-                    Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-
-        return out;
-    }
-
-    @Override
-    public final void bindView(View view, Context context, Cursor cursor) {
-        TextView name = (TextView) view.findViewById(R.id.name);
-        name.setText(cursor.getString(NAME_INDEX));
-
-        TextView label = (TextView) view.findViewById(R.id.label);
-        int type = cursor.getInt(TYPE_INDEX);
-        label.setText(Phones.getDisplayLabel(mContext, type, cursor.getString(LABEL_INDEX)));
-
-        TextView number = (TextView) view.findViewById(R.id.number);
-        number.setText("(" + cursor.getString(NUMBER_INDEX) + ")");
-    }
-
-    @Override
-    public Cursor runQueryOnBackgroundThread(CharSequence constraint) {
-        String wherePhone = null;
-        String whereEmail = null;
-        String phone = "";
-        String cons = null;
-
-        if (constraint != null) {
-            cons = constraint.toString();
-
-            if (usefulAsDigits(cons)) {
-                phone = PhoneNumberUtils.convertKeypadLettersToDigits(cons);
-                if (phone.equals(cons)) {
-                    phone = "";
-                } else {
-                    phone = phone.trim();
-                }
-            }
-
-            String filter = DatabaseUtils.sqlEscapeString(cons + '%');
-            String filterLastName = DatabaseUtils.sqlEscapeString("% " + cons + '%');
-
-            StringBuilder s = new StringBuilder();
-            s.append("((name LIKE ");
-            s.append(filter);
-            s.append(") OR (name LIKE ");
-            s.append(filterLastName);
-            s.append(") OR (REPLACE(REPLACE(REPLACE(REPLACE(number, ' ', ''), '(', ''), ')', ''), '-', '') LIKE ");
-            s.append(filter);
-            s.append(")) AND type = ");
-            s.append(Phones.TYPE_MOBILE);
-            wherePhone = s.toString();
-        }
-
-        Cursor phoneCursor = SqliteWrapper.query(mContext, mContentResolver,
-                Phones.CONTENT_URI, PROJECTION_PHONE, wherePhone, null, SORT_ORDER);
-
-        if (phone.length() > 0) {
-            ArrayList result = new ArrayList();
-            result.add(Integer.valueOf(-1));                    // ID
-            result.add(Long.valueOf(-1));                       // PERSON_ID
-            result.add(Integer.valueOf(Phones.TYPE_CUSTOM));    // TYPE
-            result.add(phone);                                  // NUMBER
-
-            /*
-             * The "\u00A0" keeps Phones.getDisplayLabel() from deciding
-             * to display the default label ("Home") next to the transformation
-             * of the letters into numbers.
-             */
-            result.add("\u00A0");                               // LABEL
-            result.add(cons);                                   // NAME
-
-            ArrayList<ArrayList> wrap = new ArrayList<ArrayList>();
-            wrap.add(result);
-
-            ArrayListCursor translated = new ArrayListCursor(PROJECTION_PHONE, wrap);
-
-            return new MergeCursor(new Cursor[] { translated, phoneCursor });
-        } else {
-            return phoneCursor;
-        }
-    }
-
-    /**
-     * Returns true if all the characters are meaningful as digits
-     * in a phone number -- letters, digits, and a few punctuation marks.
-     */
-    private boolean usefulAsDigits(CharSequence cons) {
-        int len = cons.length();
-
-        for (int i = 0; i < len; i++) {
-            char c = cons.charAt(i);
-
-            if ((c == ' ') || (c == '-') || (c == '(') || (c == ')') || (c == '.')) {
-                continue;
-            }
-            if ((c >= 'A') && (c <= 'Z')) {
-                continue;
-            }
-            if ((c >= 'a') && (c <= 'z')) {
-                continue;
-            }
-            if ((c >= '0') && (c <= '9')) {
-                continue;
-            }
-
-            return false;
-        }
-
-        return true;
-    }
-}
diff --git a/src/com/android/mms/ui/RecipientsEditor.java b/src/com/android/mms/ui/RecipientsEditor.java
deleted file mode 100644
index d7f4c9e..0000000
--- a/src/com/android/mms/ui/RecipientsEditor.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.ui.RecipientList.Recipient;
-
-import android.content.Context;
-import android.text.Annotation;
-import android.text.Layout;
-import android.text.SpannableStringBuilder;
-import android.text.Spanned;
-import android.text.TextUtils;
-import android.text.style.TextAppearanceSpan;
-import android.util.AttributeSet;
-import android.view.KeyEvent;
-import android.view.LayoutInflater;
-import android.view.MotionEvent;
-import android.view.ContextMenu.ContextMenuInfo;
-import android.widget.ListAdapter;
-import android.widget.MultiAutoCompleteTextView;
-import android.util.Log;
-
-import java.util.Iterator;
-
-/**
- * Provide UI for editing the recipients of multi-media messages.
- */
-public class RecipientsEditor extends MultiAutoCompleteTextView {
-    private int mLongPressedPosition = -1;
-    private final RecipientsEditorTokenizer mTokenizer;
-
-    public RecipientsEditor(Context context, AttributeSet attrs) {
-        super(context, attrs, android.R.attr.autoCompleteTextViewStyle);
-        mTokenizer = new RecipientsEditorTokenizer(context, this);
-        setTokenizer(mTokenizer);
-    }
-
-    public RecipientList getRecipientList() {
-        return mTokenizer.getRecipientList();
-    }
-
-    public void populate(RecipientList list) {
-        SpannableStringBuilder sb = new SpannableStringBuilder();
-
-        Iterator<Recipient> iter = list.iterator();
-        while (iter.hasNext()) {
-            if (sb.length() != 0) {
-                sb.append(", ");
-            }
-
-            Recipient r = iter.next();
-            sb.append(r.toToken());
-        }
-
-        setText(sb);
-    }
-
-    private int pointToPosition(int x, int y) {
-        x -= getCompoundPaddingLeft();
-        y -= getExtendedPaddingTop();
-
-
-        x += getScrollX();
-        y += getScrollY();
-
-        Layout layout = getLayout();
-        if (layout == null) {
-            return -1;
-        }
-
-        int line = layout.getLineForVertical(y);
-        int off = layout.getOffsetForHorizontal(line, x);
-
-        return off;
-    }
-
-    @Override
-    public boolean onTouchEvent(MotionEvent ev) {
-        final int action = ev.getAction();
-        final int x = (int) ev.getX();
-        final int y = (int) ev.getY();
-
-        if (action == MotionEvent.ACTION_DOWN) {
-            mLongPressedPosition = pointToPosition(x, y);
-        }
-
-        return super.onTouchEvent(ev);
-    }
-
-    @Override
-    protected ContextMenuInfo getContextMenuInfo() {
-        if ((mLongPressedPosition >= 0)) {
-            Spanned text = getText();
-            int start = mTokenizer.findTokenStart(text, mLongPressedPosition);
-            int end = mTokenizer.findTokenEnd(text, start);
-
-            if (end != start) {
-                Recipient r = getRecipientAt(getText(), start, end);
-                return new RecipientContextMenuInfo(r);
-            }
-        }
-        return null;
-    }
-
-    private static Recipient getRecipientAt(Spanned sp, int start, int end) {
-        Annotation[] a = sp.getSpans(start, end, Annotation.class);
-        String person_id = getAnnotation(a, "person_id");
-        String name = getAnnotation(a, "name");
-        String label = getAnnotation(a, "label");
-        String bcc = getAnnotation(a, "bcc");
-        String number = getAnnotation(a, "number");
-
-        Recipient r = new Recipient();
-
-        r.name = name;
-        r.label = label;
-        r.bcc = bcc.equals("true");
-        r.number = TextUtils.isEmpty(number) ? TextUtils.substring(sp, start, end) : number;
-        r.nameAndNumber = Recipient.buildNameAndNumber(r.name, r.number);
-
-        if (person_id.length() > 0) {
-            r.person_id = Long.parseLong(person_id);
-        } else {
-            r.person_id = -1;
-        }
-
-        return r;
-    }
-
-    private static String getAnnotation(Annotation[] a, String key) {
-        for (int i = 0; i < a.length; i++) {
-            if (a[i].getKey().equals(key)) {
-                return a[i].getValue();
-            }
-        }
-
-        return "";
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        if (isPopupShowing()) {
-            switch (keyCode) {
-                case KeyEvent.KEYCODE_COMMA:
-                    ListAdapter adapter = getAdapter();
-                    // There is at least one item in the dropdown list
-                    // when isPopupShowing() is true.
-                    Object selectedItem = adapter.getItem(0);
-                    replaceText(convertSelectionToString(selectedItem));
-                    dismissDropDown();
-                    return true;
-            }
-        }
-
-        return super.onKeyDown(keyCode, event);
-    }
-
-    private class RecipientsEditorTokenizer
-            extends MultiAutoCompleteTextView.CommaTokenizer
-            implements MultiAutoCompleteTextView.Tokenizer {
-        private final MultiAutoCompleteTextView mList;
-        private final LayoutInflater mInflater;
-        private final TextAppearanceSpan mLabelSpan;
-        private final TextAppearanceSpan mTypeSpan;
-
-        RecipientsEditorTokenizer(Context context, MultiAutoCompleteTextView list) {
-            mInflater = LayoutInflater.from(context);
-            mList = list;
-
-            final int size = android.R.style.TextAppearance_Small;
-            final int color = android.R.styleable.Theme_textColorSecondary;
-            mLabelSpan = new TextAppearanceSpan(context, size, color);
-            mTypeSpan = new TextAppearanceSpan(context, size, color);
-        }
-
-        public RecipientList getRecipientList() {
-            Spanned sp = mList.getText();
-            int len = sp.length();
-            RecipientList rl = new RecipientList();
-            
-            int start = 0;
-            int i = 0;
-            while (i < len + 1) {
-                if ((i == len) || (sp.charAt(i) == ',')) {
-                    if (i > start) {
-                        Recipient r = getRecipientAt(sp, start, i);
-
-                        rl.add(r);
-                    }
-
-                    i++;
-
-                    while ((i < len) && (sp.charAt(i) == ' ')) {
-                        i++;
-                    }
-
-                    start = i;
-                } else {
-                    i++;
-                }
-            }
-
-            return rl;
-        }
-    }
-
-    static class RecipientContextMenuInfo implements ContextMenuInfo {
-        final Recipient recipient;
-
-        RecipientContextMenuInfo(Recipient r) {
-            recipient = r;
-        }
-    }
-}
diff --git a/src/com/android/mms/ui/SlideEditorActivity.java b/src/com/android/mms/ui/SlideEditorActivity.java
deleted file mode 100644
index 944197f..0000000
--- a/src/com/android/mms/ui/SlideEditorActivity.java
+++ /dev/null
@@ -1,706 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.google.android.mms.ContentType;
-import com.android.mms.ExceedMessageSizeException;
-import com.google.android.mms.MmsException;
-import com.android.mms.R;
-import com.android.mms.ResolutionException;
-import com.android.mms.UnsupportContentTypeException;
-import com.android.mms.model.IModelChangedObserver;
-import com.android.mms.model.LayoutModel;
-import com.android.mms.model.Model;
-import com.android.mms.model.SlideModel;
-import com.android.mms.model.SlideshowModel;
-import com.google.android.mms.pdu.PduBody;
-import com.google.android.mms.pdu.PduPart;
-import com.google.android.mms.pdu.PduPersister;
-import com.android.mms.ui.BasicSlideEditorView.OnTextChangedListener;
-import com.android.mms.ui.MessageUtils.ResizeImageResultCallback;
-
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.ContentUris;
-import android.content.Context;
-import android.content.DialogInterface;
-import android.content.Intent;
-import android.content.res.Resources;
-import android.graphics.Bitmap;
-import android.media.RingtoneManager;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Handler;
-import android.provider.MediaStore;
-import android.provider.Settings;
-import android.text.TextUtils;
-import android.util.Config;
-import android.util.Log;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.SubMenu;
-import android.view.View;
-import android.view.View.OnClickListener;
-import android.widget.Button;
-import android.widget.ImageButton;
-import android.widget.Toast;
-
-/**
- * This activity allows user to edit the contents of a slide.
- */
-public class SlideEditorActivity extends Activity {
-    private static final String TAG = "SlideEditorActivity";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    // Key for extra data.
-    public static final String SLIDE_INDEX = "slide_index";
-
-    // Menu ids.
-    private final static int MENU_REMOVE_TEXT       = 0;
-    private final static int MENU_ADD_PICTURE       = 1;
-    private final static int MENU_TAKE_PICTURE      = 2;
-    private final static int MENU_DEL_PICTURE       = 3;
-    private final static int MENU_ADD_AUDIO         = 4;
-    private final static int MENU_DEL_AUDIO         = 5;
-    private final static int MENU_ADD_VIDEO         = 6;
-    private final static int MENU_ADD_SLIDE         = 7;
-    private final static int MENU_DEL_VIDEO         = 8;
-    private final static int MENU_LAYOUT            = 9;
-    private final static int MENU_DURATION          = 10;
-    private final static int MENU_PREVIEW_SLIDESHOW = 11;
-    private final static int MENU_RECORD_SOUND      = 12;
-    private final static int MENU_SUB_AUDIO         = 13;
-
-    // Request code.
-    private final static int REQUEST_CODE_EDIT_TEXT          = 0;
-    private final static int REQUEST_CODE_CHANGE_PICTURE     = 1;
-    private final static int REQUEST_CODE_TAKE_PICTURE       = 2;
-    private final static int REQUEST_CODE_CHANGE_MUSIC       = 3;
-    private final static int REQUEST_CODE_RECORD_SOUND       = 4;
-    private final static int REQUEST_CODE_CHANGE_VIDEO       = 5;
-    private final static int REQUEST_CODE_CHANGE_DURATION    = 6;
-
-    // number of items in the duration selector dialog that directly map from
-    // item index to duration in seconds (duration = index + 1)
-    private final static int NUM_DIRECT_DURATIONS = 10;
-
-    private ImageButton mNextSlide;
-    private ImageButton mPreSlide;
-    private Button mPreview;
-    private Button mReplaceImage;
-    private Button mRemoveSlide;
-    private Button mDone;
-    private BasicSlideEditorView mSlideView;
-
-    private SlideshowModel mSlideshowModel;
-    private SlideshowEditor mSlideshowEditor;
-    private SlideshowPresenter mPresenter;
-    private boolean mDirty;
-
-    private int mPosition;
-    private Uri mUri;
-
-    private final static String MESSAGE_URI = "message_uri";
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.edit_slide_activity);
-
-        mSlideView = (BasicSlideEditorView) findViewById(R.id.slide_editor_view);
-        mSlideView.setOnTextChangedListener(mOnTextChangedListener);
-
-        mPreSlide = (ImageButton) findViewById(R.id.pre_slide_button);
-        mPreSlide.setOnClickListener(mOnNavigateBackward);
-
-        mNextSlide = (ImageButton) findViewById(R.id.next_slide_button);
-        mNextSlide.setOnClickListener(mOnNavigateForward);
-
-        mPreview = (Button) findViewById(R.id.preview_button);
-        mPreview.setOnClickListener(mOnPreview);
-
-        mReplaceImage = (Button) findViewById(R.id.replace_image_button);
-        mReplaceImage.setOnClickListener(mOnReplaceImage);
-
-        mRemoveSlide = (Button) findViewById(R.id.remove_slide_button);
-        mRemoveSlide.setOnClickListener(mOnRemoveSlide);
-
-        mDone = (Button) findViewById(R.id.done_button);
-        mDone.setOnClickListener(mDoneClickListener);
-
-        initActivityState(savedInstanceState, getIntent());
-
-        try {
-            mSlideshowModel = SlideshowModel.createFromMessageUri(this, mUri);
-            // Register an observer to watch whether the data model is changed.
-            mSlideshowModel.registerModelChangedObserver(mModelChangedObserver);
-            mSlideshowEditor = new SlideshowEditor(this, mSlideshowModel);
-            mPresenter = (SlideshowPresenter) PresenterFactory.getPresenter(
-                    "SlideshowPresenter", this, mSlideView, mSlideshowModel);
-            showCurrentSlide();
-        } catch (MmsException e) {
-            Log.e(TAG, "Create SlideshowModel failed!", e);
-            finish();
-            return;
-        }
-    }
-
-    private void initActivityState(Bundle savedInstanceState, Intent intent) {
-        if (savedInstanceState != null) {
-            mUri = (Uri) savedInstanceState.getParcelable(MESSAGE_URI);
-            mPosition = savedInstanceState.getInt(SLIDE_INDEX, 0);
-        } else {
-            mUri = intent.getData();
-            mPosition = intent.getIntExtra(SLIDE_INDEX, 0);
-        }
-    }
-
-    @Override
-    protected void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-
-        outState.putInt(SLIDE_INDEX, mPosition);
-        outState.putParcelable(MESSAGE_URI, mUri);
-    }
-
-    @Override
-    protected void onPause()  {
-        super.onPause();
-
-        synchronized (this) {
-            if (mDirty) {
-                try {
-                    PduBody pb = mSlideshowModel.toPduBody();
-                    PduPersister.getPduPersister(this).updateParts(mUri, pb);
-                    mSlideshowModel.sync(pb);
-                }  catch (MmsException e) {
-                    Log.e(TAG, "Cannot update the message: " + mUri, e);
-                }
-            }
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-
-        if (mSlideshowModel != null) {
-            mSlideshowModel.unregisterModelChangedObserver(
-                    mModelChangedObserver);
-        }
-    }
-
-    private final IModelChangedObserver mModelChangedObserver =
-        new IModelChangedObserver() {
-            public void onModelChanged(Model model, boolean dataChanged) {
-                synchronized (SlideEditorActivity.this) {
-                    mDirty = true;
-                }
-                setResult(RESULT_OK);
-            }
-        };
-
-    private final OnClickListener mOnRemoveSlide = new OnClickListener() {
-        public void onClick(View v) {
-            mSlideshowEditor.removeSlide(mPosition);
-            int size = mSlideshowModel.size();
-            if (size > 0) {
-                if (mPosition >= size) {
-                    mPosition--;
-                }
-                showCurrentSlide();
-            } else {
-                finish();
-                return;
-            }
-        }
-    };
-
-    private final OnTextChangedListener mOnTextChangedListener = new OnTextChangedListener() {
-        public void onTextChanged(String s) {
-            mSlideshowEditor.changeText(mPosition, s);
-        }
-    };
-
-    private final OnClickListener mOnPreview = new OnClickListener() {
-        public void onClick(View v) {
-            previewSlideshow();
-        }
-    };
-
-    private final OnClickListener mOnReplaceImage = new OnClickListener() {
-        public void onClick(View v) {
-            Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null);
-            intent.setType(ContentType.IMAGE_UNSPECIFIED);
-            startActivityForResult(intent, REQUEST_CODE_CHANGE_PICTURE);
-        }
-    };
-
-    private final OnClickListener mOnNavigateBackward = new OnClickListener() {
-        public void onClick(View v) {
-            if (mPosition > 0) {
-                mPosition --;
-                showCurrentSlide();
-            }
-        }
-    };
-
-    private final OnClickListener mOnNavigateForward = new OnClickListener() {
-        public void onClick(View v) {
-            if (mPosition < mSlideshowModel.size() - 1) {
-                mPosition ++;
-                showCurrentSlide();
-            }
-        }
-    };
-
-    private final OnClickListener mDoneClickListener = new OnClickListener() {
-        public void onClick(View v) {
-            Intent data = new Intent();
-            data.putExtra("done", true);
-            setResult(RESULT_OK, data);
-            finish();
-        }
-    };
-
-    private void previewSlideshow() {
-        try {
-            PduBody pb = mSlideshowModel.toPduBody();
-            PduPersister.getPduPersister(SlideEditorActivity.this).updateParts(mUri, pb);
-            mSlideshowModel.sync(pb);
-
-            Intent intent = new Intent(SlideEditorActivity.this, SlideshowActivity.class);
-            intent.setData(mUri);
-            startActivity(intent);
-        } catch (MmsException e) {
-            Log.e(TAG, "Failed to save the message to storage.", e);
-        }
-    }
-
-    private void updateTitle() {
-        setTitle("Slide " + (mPosition + 1) + "/" + mSlideshowModel.size());
-    }
-
-    @Override
-    public boolean onPrepareOptionsMenu(Menu menu) {
-        menu.clear();
-
-        SlideModel slide = mSlideshowModel.get(mPosition);
-
-        // Preview slideshow.
-        menu.add(0, MENU_PREVIEW_SLIDESHOW, 0, R.string.preview_slideshow).setIcon(
-                com.android.internal.R.drawable.ic_menu_play_clip);
-
-        // Text
-        if (slide.hasText() && !TextUtils.isEmpty(slide.getText().getText())) {
-            //"Change text" if text is set.
-            menu.add(0, MENU_REMOVE_TEXT, 0, R.string.remove_text).setIcon(
-                    R.drawable.ic_menu_remove_text);
-        }
-
-        // Picture
-        if (slide.hasImage()) {
-            menu.add(0, MENU_DEL_PICTURE, 0, R.string.remove_picture).setIcon(
-                    R.drawable.ic_menu_remove_picture);
-        } else if (!slide.hasVideo()) {
-            menu.add(0, MENU_ADD_PICTURE, 0, R.string.add_picture).setIcon(
-                    R.drawable.ic_menu_picture);
-            menu.add(0, MENU_TAKE_PICTURE, 0, R.string.attach_take_photo).setIcon(
-                    R.drawable.ic_menu_picture);
-        }
-
-        // Music
-        if (slide.hasAudio()) {
-            menu.add(0, MENU_DEL_AUDIO, 0, R.string.remove_music).setIcon(
-                    R.drawable.ic_menu_remove_sound);
-        } else if (!slide.hasVideo()) {
-            SubMenu subMenu = menu.addSubMenu(0, MENU_SUB_AUDIO, 0, R.string.add_music).setIcon(
-                    R.drawable.ic_menu_add_sound);
-            subMenu.add(0, MENU_ADD_AUDIO, 0, R.string.attach_sound);
-            subMenu.add(0, MENU_RECORD_SOUND, 0, R.string.attach_record_sound);
-        }
-
-        // Video
-//      TODO: should support video in the future.
-//        if (slide.hasVideo()) {
-//            // FIXME: set correct icon when ic_menu_remove_movie is available.
-//            menu.add(0, MENU_DEL_VIDEO, 0, R.string.remove_video).setIcon(
-//                    R.drawable.ic_menu_movie);
-//        } else if (!slide.hasAudio() && !slide.hasImage()) {
-//            menu.add(0, MENU_ADD_VIDEO, 0, R.string.add_video).setIcon(R.drawable.ic_menu_movie);
-//        }
-
-        // Add slide
-        menu.add(0, MENU_ADD_SLIDE, 0, R.string.add_slide).setIcon(
-                R.drawable.ic_menu_add_slide);
-
-        // Slide duration
-        String duration = getResources().getString(R.string.duration_sec);
-        menu.add(0, MENU_DURATION, 0,
-                duration.replace("%s", String.valueOf(slide.getDuration() / 1000))).setIcon(
-                        R.drawable.ic_menu_duration);
-
-        // Slide layout
-        int resId;
-        if (mSlideshowModel.getLayout().getLayoutType() == LayoutModel.LAYOUT_TOP_TEXT) {
-            resId = R.string.layout_top;
-        } else {
-            resId = R.string.layout_bottom;
-        }
-        // FIXME: set correct icon when layout icon is available.
-        menu.add(0, MENU_LAYOUT, 0, resId).setIcon(R.drawable.ic_menu_picture);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case MENU_PREVIEW_SLIDESHOW:
-                previewSlideshow();
-                break;
-
-            case MENU_REMOVE_TEXT:
-                SlideModel slide = mSlideshowModel.get(mPosition);
-                slide.removeText();
-                break;
-
-            case MENU_ADD_PICTURE:
-                Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null);
-                intent.setType(ContentType.IMAGE_UNSPECIFIED);
-                startActivityForResult(intent, REQUEST_CODE_CHANGE_PICTURE);
-                break;
-
-            case MENU_TAKE_PICTURE:
-                intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
-                startActivityForResult(intent, REQUEST_CODE_TAKE_PICTURE);
-                break;
-
-            case MENU_DEL_PICTURE:
-                mSlideshowEditor.removeImage(mPosition);
-                setReplaceButtonText(R.string.add_picture);
-                break;
-
-            case MENU_ADD_AUDIO:
-                MessageUtils.selectAudio(this, REQUEST_CODE_CHANGE_MUSIC);
-                break;
-
-            case MENU_RECORD_SOUND:
-                MessageUtils.recordSound(this, REQUEST_CODE_RECORD_SOUND);
-                break;
-
-            case MENU_DEL_AUDIO:
-                mSlideshowEditor.removeAudio(mPosition);
-                break;
-
-            case MENU_ADD_VIDEO:
-                intent = new Intent(Intent.ACTION_GET_CONTENT);
-                intent.setType(ContentType.VIDEO_UNSPECIFIED);
-                startActivityForResult(intent, REQUEST_CODE_CHANGE_VIDEO);
-                break;
-
-            case MENU_DEL_VIDEO:
-                mSlideshowEditor.removeVideo(mPosition);
-                break;
-
-            case MENU_ADD_SLIDE:
-                mPosition++;
-                if ( mSlideshowEditor.addNewSlide(mPosition) ) {
-                    // add successfully
-                    showCurrentSlide();
-                } else {
-                    // move position back
-                    mPosition--;
-                    Toast.makeText(this, R.string.cannot_add_slide_anymore,
-                            Toast.LENGTH_SHORT).show();
-                }
-                break;
-
-            case MENU_LAYOUT:
-                showLayoutSelectorDialog();
-                break;
-
-            case MENU_DURATION:
-                showDurationDialog();
-                break;
-        }
-
-        return true;
-    }
-
-    private void setReplaceButtonText(int text) {
-        mReplaceImage.setText(text);
-    }
-
-    private void showDurationDialog() {
-        AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        builder.setIcon(R.drawable.ic_mms_duration);
-        String title = getResources().getString(R.string.duration_selector_title);
-        builder.setTitle(title + (mPosition + 1) + "/" + mSlideshowModel.size());
-
-        builder.setItems(R.array.select_dialog_items,
-                new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int which) {
-                if ((which >= 0) && (which < NUM_DIRECT_DURATIONS)) {
-                    mSlideshowEditor.changeDuration(
-                            mPosition, (which + 1) * 1000);
-                } else {
-                    Intent intent = new Intent(SlideEditorActivity.this,
-                            EditSlideDurationActivity.class);
-                    intent.putExtra(EditSlideDurationActivity.SLIDE_INDEX, mPosition);
-                    intent.putExtra(EditSlideDurationActivity.SLIDE_TOTAL,
-                            mSlideshowModel.size());
-                    intent.putExtra(EditSlideDurationActivity.SLIDE_DUR,
-                            mSlideshowModel.get(mPosition).getDuration() / 1000); // in seconds
-                    startActivityForResult(intent, REQUEST_CODE_CHANGE_DURATION);
-                }
-            }
-        });
-
-        builder.show();
-    }
-
-    private void showLayoutSelectorDialog() {
-        AlertDialog.Builder builder = new AlertDialog.Builder(this);
-        builder.setIcon(R.drawable.ic_mms_layout);
-
-        String title = getResources().getString(R.string.layout_selector_title);
-        builder.setTitle(title + (mPosition + 1) + "/" + mSlideshowModel.size());
-
-        LayoutSelectorAdapter adapter = new LayoutSelectorAdapter(this);
-        builder.setAdapter(adapter, new DialogInterface.OnClickListener() {
-            public void onClick(DialogInterface dialog, int which) {
-                switch (which) {
-                    case 0: // Bottom text.
-                        mSlideshowEditor.changeLayout(LayoutModel.LAYOUT_BOTTOM_TEXT);
-                        break;
-                    case 1: // Top text.
-                        mSlideshowEditor.changeLayout(LayoutModel.LAYOUT_TOP_TEXT);
-                        break;
-                }
-            }
-        });
-
-        builder.show();
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        if (resultCode != RESULT_OK) {
-            return;
-        }
-
-        switch(requestCode) {
-            case REQUEST_CODE_EDIT_TEXT:
-                // XXX where does this come from?  Action is probably not the
-                // right place to have the text...
-                mSlideshowEditor.changeText(mPosition, data.getAction());
-                break;
-
-            case REQUEST_CODE_TAKE_PICTURE:
-                Bitmap bitmap = (Bitmap) data.getParcelableExtra("data");
-                if (bitmap == null) {
-                    Toast.makeText(this,
-                            getResourcesString(R.string.failed_to_add_media, getPictureString()),
-                            Toast.LENGTH_SHORT).show();
-                    return;
-                }
-
-                try {
-                    mSlideshowEditor.changeImage(mPosition,
-                            MessageUtils.saveBitmapAsPart(this, mUri, bitmap));
-
-                    setReplaceButtonText(R.string.replace_image);
-                } catch (MmsException e) {
-                    Log.e(TAG, "add image failed", e);
-                    notifyUser("add picture failed");
-                    Toast.makeText(SlideEditorActivity.this,
-                            getResourcesString(R.string.failed_to_add_media, getPictureString()),
-                            Toast.LENGTH_SHORT).show();
-                } catch (UnsupportContentTypeException e) {
-                    MessageUtils.showErrorDialog(SlideEditorActivity.this,
-                            getResourcesString(R.string.unsupported_media_format, getPictureString()),
-                            getResourcesString(R.string.select_different_media, getPictureString()));
-                } catch (ResolutionException e) {
-                    MessageUtils.resizeImageAsync(this, data.getData(), new Handler(), mResizeImageCallback);
-                } catch (ExceedMessageSizeException e) {
-                    MessageUtils.showErrorDialog(SlideEditorActivity.this,
-                            getResourcesString(R.string.exceed_message_size_limitation),
-                            getResourcesString(R.string.failed_to_add_media, getPictureString()));
-                }
-                break;
-
-            case REQUEST_CODE_CHANGE_PICTURE:
-                try {
-                    mSlideshowEditor.changeImage(mPosition, data.getData());
-                    setReplaceButtonText(R.string.replace_image);
-                } catch (MmsException e) {
-                    Log.e(TAG, "add image failed", e);
-                    notifyUser("add picture failed");
-                    Toast.makeText(SlideEditorActivity.this,
-                            getResourcesString(R.string.failed_to_add_media, getPictureString()),
-                            Toast.LENGTH_SHORT).show();
-                } catch (UnsupportContentTypeException e) {
-                    MessageUtils.showErrorDialog(SlideEditorActivity.this,
-                            getResourcesString(R.string.unsupported_media_format, getPictureString()),
-                            getResourcesString(R.string.select_different_media, getPictureString()));
-                } catch (ResolutionException e) {
-                    MessageUtils.resizeImageAsync(this, data.getData(), new Handler(), mResizeImageCallback);
-                } catch (ExceedMessageSizeException e) {
-                    MessageUtils.showErrorDialog(SlideEditorActivity.this,
-                            getResourcesString(R.string.exceed_message_size_limitation),
-                            getResourcesString(R.string.failed_to_add_media, getPictureString()));
-                }
-                break;
-
-            case REQUEST_CODE_CHANGE_MUSIC:
-            case REQUEST_CODE_RECORD_SOUND:
-                Uri uri;
-                if (requestCode == REQUEST_CODE_CHANGE_MUSIC) {
-                    uri = (Uri) data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
-                    if (Settings.System.DEFAULT_RINGTONE_URI.equals(uri)) {
-                        return;
-                    }
-                } else {
-                    uri = data.getData();
-                }
-
-                try {
-                    mSlideshowEditor.changeAudio(mPosition, uri);
-                } catch (MmsException e) {
-                    Log.e(TAG, "add audio failed", e);
-                    notifyUser("add music failed");
-                    Toast.makeText(SlideEditorActivity.this,
-                            getResourcesString(R.string.failed_to_add_media, getAudioString()),
-                            Toast.LENGTH_SHORT).show();
-                } catch (UnsupportContentTypeException e) {
-                    MessageUtils.showErrorDialog(SlideEditorActivity.this,
-                            getResourcesString(R.string.unsupported_media_format, getAudioString()),
-                            getResourcesString(R.string.select_different_media, getAudioString()));
-                } catch (ExceedMessageSizeException e) {
-                    MessageUtils.showErrorDialog(SlideEditorActivity.this,
-                            getResourcesString(R.string.exceed_message_size_limitation),
-                            getResourcesString(R.string.failed_to_add_media, getAudioString()));
-                }
-                break;
-
-            case REQUEST_CODE_CHANGE_VIDEO:
-                try {
-                    mSlideshowEditor.changeVideo(mPosition, data.getData());
-                } catch (MmsException e) {
-                    Log.e(TAG, "add video failed", e);
-                    notifyUser("add video failed");
-                    Toast.makeText(SlideEditorActivity.this,
-                            getResourcesString(R.string.failed_to_add_media, getVideoString()),
-                            Toast.LENGTH_SHORT).show();
-                } catch (UnsupportContentTypeException e) {
-                    MessageUtils.showErrorDialog(SlideEditorActivity.this,
-                            getResourcesString(R.string.unsupported_media_format, getVideoString()),
-                            getResourcesString(R.string.select_different_media, getVideoString()));
-                } catch (ExceedMessageSizeException e) {
-                    MessageUtils.showErrorDialog(SlideEditorActivity.this,
-                            getResourcesString(R.string.exceed_message_size_limitation),
-                            getResourcesString(R.string.failed_to_add_media, getVideoString()));
-                }
-                break;
-
-            case REQUEST_CODE_CHANGE_DURATION:
-                mSlideshowEditor.changeDuration(mPosition,
-                    Integer.valueOf(data.getAction()) * 1000);
-                break;
-        }
-    }
-
-    private final ResizeImageResultCallback mResizeImageCallback = new ResizeImageResultCallback() {
-        public void onResizeResult(PduPart part) {
-            Context context = SlideEditorActivity.this;
-            if (part == null) {
-                Toast.makeText(SlideEditorActivity.this,
-                        getResourcesString(R.string.failed_to_add_media, getPictureString()),
-                        Toast.LENGTH_SHORT).show();
-                return;
-            }
-
-            try {
-                long messageId = ContentUris.parseId(mUri);
-                PduPersister persister = PduPersister.getPduPersister(context);
-                Uri newUri = persister.persistPart(part, messageId);
-                mSlideshowEditor.changeImage(mPosition, newUri);
-
-                setReplaceButtonText(R.string.replace_image);
-            } catch (MmsException e) {
-                notifyUser("add picture failed");
-                Toast.makeText(SlideEditorActivity.this,
-                        getResourcesString(R.string.failed_to_add_media, getPictureString()),
-                        Toast.LENGTH_SHORT).show();
-            } catch (UnsupportContentTypeException e) {
-                MessageUtils.showErrorDialog(SlideEditorActivity.this,
-                        getResourcesString(R.string.unsupported_media_format, getPictureString()),
-                        getResourcesString(R.string.select_different_media, getPictureString()));
-            } catch (ResolutionException e) {
-                MessageUtils.showErrorDialog(SlideEditorActivity.this,
-                        getResourcesString(R.string.failed_to_resize_image),
-                        getResourcesString(R.string.resize_image_error_information));
-            } catch (ExceedMessageSizeException e) {
-                MessageUtils.showErrorDialog(SlideEditorActivity.this,
-                        getResourcesString(R.string.exceed_message_size_limitation),
-                        getResourcesString(R.string.failed_to_add_media, getPictureString()));
-            }
-        }
-    };
-
-    private String getResourcesString(int id, String mediaName) {
-        Resources r = getResources();
-        return r.getString(id, mediaName);
-    }
-
-    private String getResourcesString(int id) {
-        Resources r = getResources();
-        return r.getString(id);
-    }
-
-    private String getAudioString() {
-        return getResourcesString(R.string.type_audio);
-    }
-
-    private String getPictureString() {
-        return getResourcesString(R.string.type_picture);
-    }
-
-    private String getVideoString() {
-        return getResourcesString(R.string.type_video);
-    }
-
-    private void notifyUser(String message) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "notifyUser: message=" + message);
-        }
-    }
-
-    private void showCurrentSlide() {
-        mPresenter.setLocation(mPosition);
-        mPresenter.present();
-        updateTitle();
-
-        if (mSlideshowModel.get(mPosition).hasImage()) {
-            setReplaceButtonText(R.string.replace_image);
-        } else {
-            setReplaceButtonText(R.string.add_picture);
-        }
-    }
-}
diff --git a/src/com/android/mms/ui/SlideListItemView.java b/src/com/android/mms/ui/SlideListItemView.java
deleted file mode 100644
index 044e968..0000000
--- a/src/com/android/mms/ui/SlideListItemView.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.media.MediaPlayer;
-import android.net.Uri;
-import android.text.method.HideReturnsTransformationMethod;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * A simplified view of slide in the slides list.
- */
-public class SlideListItemView extends LinearLayout implements SlideViewInterface {
-    private static final String TAG = "SlideListItemView";
-
-    private TextView mTextPreview;
-    private ImageView mImagePreview;
-    private TextView mAttachmentName;
-    private ImageView mAttachmentIcon;
-
-    public SlideListItemView(Context context) {
-        super(context);
-    }
-
-    public SlideListItemView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        mTextPreview = (TextView) findViewById(R.id.text_preview);
-        mTextPreview.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
-        mImagePreview = (ImageView) findViewById(R.id.image_preview);
-        mAttachmentName = (TextView) findViewById(R.id.attachment_name);
-        mAttachmentIcon = (ImageView) findViewById(R.id.attachment_icon);
-    }
-
-    public void startAudio() {
-        // Playing audio is not needed in this view.
-    }
-
-    public void startVideo() {
-        // Playing audio is not needed in this view.
-    }
-
-    public void setAudio(Uri audio, String name, Map<String, ?> extras) {
-        if (name != null) {
-            mAttachmentName.setText(name);
-            mAttachmentIcon.setImageResource(R.drawable.ic_mms_music);
-        } else {
-            mAttachmentName.setText("");
-            mAttachmentIcon.setImageDrawable(null);
-        }
-    }
-
-    public void setImage(String name, Bitmap bitmap) {
-        if (bitmap != null) {
-            mImagePreview.setImageBitmap(bitmap);
-        }
-    }
-
-    public void setImageRegionFit(String fit) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setImageVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setText(String name, String text) {
-        mTextPreview.setText(text);
-    }
-
-    public void setTextVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setVideo(String name, Uri video) {
-        if (name != null) {
-            mAttachmentName.setText(name);
-            mAttachmentIcon.setImageResource(R.drawable.movie);
-        } else {
-            mAttachmentName.setText("");
-            mAttachmentIcon.setImageDrawable(null);
-        }
-
-        MediaPlayer mp = new MediaPlayer();
-        try {
-            mp.setDataSource(mContext, video);
-            mImagePreview.setImageBitmap(mp.getFrameAt(1000));
-        } catch (IOException e) {
-            Log.e(TAG, "Unexpected IOException.", e);
-        } finally {
-            mp.release();
-        }
-    }
-
-    public void setVideoVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void stopAudio() {
-        // Stopping audio is not needed in this view.
-    }
-
-    public void stopVideo() {
-        // Stopping video is not needed in this view.
-    }
-
-    public void reset() {
-        // TODO Auto-generated method stub
-    }
-
-    public void setVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void pauseAudio() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void pauseVideo() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekAudio(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekVideo(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-}
diff --git a/src/com/android/mms/ui/SlideView.java b/src/com/android/mms/ui/SlideView.java
deleted file mode 100644
index b647bdb..0000000
--- a/src/com/android/mms/ui/SlideView.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.media.MediaPlayer;
-import android.net.Uri;
-import android.text.method.HideReturnsTransformationMethod;
-import android.util.AttributeSet;
-import android.util.Config;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.AbsoluteLayout;
-import android.widget.ImageView;
-import android.widget.ScrollView;
-import android.widget.TextView;
-import android.widget.VideoView;
-
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * A basic view to show the contents of a slide.
- */
-public class SlideView extends AbsoluteLayout implements
-        AdaptableSlideViewInterface {
-    private static final String TAG = "SlideView";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-    // FIXME: Need getHeight from mAudioInfoView instead of constant AUDIO_INFO_HEIGHT.
-    private static final int AUDIO_INFO_HEIGHT = 82;
-
-    private View mAudioInfoView;
-    private ImageView mImageView;
-    private VideoView mVideoView;
-    private ScrollView mScrollText;
-    private TextView mTextView;
-    private OnSizeChangedListener mSizeChangedListener;
-    private MediaPlayer mAudioPlayer;
-    private boolean mIsPrepared;
-    private boolean mStartWhenPrepared;
-    private int     mSeekWhenPrepared;
-    private boolean mStopWhenPrepared;
-    MediaPlayer.OnPreparedListener mPreparedListener = new MediaPlayer.OnPreparedListener() {
-        public void onPrepared(MediaPlayer mp) {
-            mIsPrepared = true;
-            if (mSeekWhenPrepared > 0) {
-                mAudioPlayer.seekTo(mSeekWhenPrepared);
-                mSeekWhenPrepared = 0;
-            }
-            if (mStartWhenPrepared) {
-                mAudioPlayer.start();
-                mStartWhenPrepared = false;
-                displayAudioInfo();
-            }
-            if (mStopWhenPrepared) {
-                mAudioPlayer.stop();
-                mAudioPlayer.release();
-                mAudioPlayer = null;
-                mStopWhenPrepared = false;
-                hideAudioInfo();
-            }
-        }
-    };
-
-    public SlideView(Context context) {
-        super(context);
-    }
-
-    public SlideView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    public void setImage(String name, Bitmap bitmap) {
-        if (mImageView == null) {
-            mImageView = new ImageView(mContext);
-            addView(mImageView, new LayoutParams(
-                    0, 0, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
-            if (DEBUG) {
-                mImageView.setBackgroundColor(0xFFFF0000);
-            }
-        }
-
-        mImageView.setImageBitmap(bitmap);
-    }
-
-    public void setImageRegion(int left, int top, int width, int height) {
-        if (mImageView != null) {
-            mImageView.setLayoutParams(new LayoutParams(width, height, left, top));
-        }
-    }
-
-    public void setImageRegionFit(String fit) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setVideo(String name, Uri video) {
-        if (mVideoView == null) {
-            mVideoView = new VideoView(mContext);
-            addView(mVideoView, new LayoutParams(
-                    0, 0, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
-            if (DEBUG) {
-                mVideoView.setBackgroundColor(0xFFFF0000);
-            }
-        }
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Changing video source to " + video);
-        }
-        mVideoView.setVideoURI(video);
-    }
-
-    private void initAudioInfoView(String name) {
-        if (null == mAudioInfoView) {
-            LayoutInflater factory = LayoutInflater.from(getContext());
-            mAudioInfoView = factory.inflate(R.layout.playing_audio_info, null);
-            int height = mAudioInfoView.getHeight();
-            TextView audioName = (TextView) mAudioInfoView.findViewById(R.id.name);
-            audioName.setText(name);
-            addView(mAudioInfoView, new LayoutParams(
-                    LayoutParams.FILL_PARENT, AUDIO_INFO_HEIGHT,
-                    0, getHeight() - AUDIO_INFO_HEIGHT));
-            if (DEBUG) {
-                mAudioInfoView.setBackgroundColor(0xFFFF0000);
-            }
-        }
-
-        mAudioInfoView.setVisibility(View.GONE);
-    }
-
-    private void displayAudioInfo() {
-        if (null != mAudioInfoView) {
-            mAudioInfoView.setVisibility(View.VISIBLE);
-        }
-    }
-
-    private void hideAudioInfo() {
-        if (null != mAudioInfoView) {
-            mAudioInfoView.setVisibility(View.GONE);
-        }
-    }
-
-    public void setAudio(Uri audio, String name, Map<String, ?> extras) {
-        if (audio == null) {
-            throw new IllegalArgumentException("Audio URI may not be null.");
-        }
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Changing audio source to " + audio);
-        }
-
-        if (mAudioPlayer != null) {
-            mAudioPlayer.reset();
-            mAudioPlayer.release();
-            mAudioPlayer = null;
-        }
-        mIsPrepared = false;
-
-        try {
-            mAudioPlayer = new MediaPlayer();
-            mAudioPlayer.setOnPreparedListener(mPreparedListener);
-            mAudioPlayer.setDataSource(mContext, audio);
-            mAudioPlayer.prepareAsync();
-        } catch (IOException e) {
-            Log.e(TAG, "Unexpected IOException.", e);
-            mAudioPlayer.release();
-            mAudioPlayer = null;
-        }
-        initAudioInfoView(name);
-    }
-
-    public void setText(String name, String text) {
-        if (null == mScrollText) {
-            mScrollText = new ScrollView(mContext);
-            mScrollText.setScrollBarStyle(SCROLLBARS_OUTSIDE_INSET);
-            addView(mScrollText, new LayoutParams(
-                    0, 0, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
-            if (DEBUG) {
-                mScrollText.setBackgroundColor(0xFF00FF00);
-            }
-        }
-
-        if (null == mTextView) {
-            mTextView = new TextView(mContext);
-            mTextView.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
-            mScrollText.addView(mTextView);
-        }
-
-        mScrollText.requestFocus();
-        mTextView.setText(text);
-    }
-
-    public void setTextRegion(int left, int top, int width, int height) {
-        if (mScrollText != null) {
-            mScrollText.setLayoutParams(new LayoutParams(width, height, left, top));
-        }
-    }
-
-    public void setVideoRegion(int left, int top, int width, int height) {
-        if (mVideoView != null) {
-            mVideoView.setLayoutParams(new LayoutParams(width, height, left, top));
-        }
-    }
-
-    public void setImageVisibility(boolean visible) {
-        if (mImageView != null) {
-            mImageView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
-        }
-    }
-
-    public void setTextVisibility(boolean visible) {
-        if (mScrollText != null) {
-            mScrollText.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
-        }
-    }
-
-    public void setVideoVisibility(boolean visible) {
-        if (mVideoView != null) {
-            mVideoView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
-        }
-    }
-
-    public void startAudio() {
-        if ((mAudioPlayer != null) && mIsPrepared) {
-            mAudioPlayer.start();
-            mStartWhenPrepared = false;
-            displayAudioInfo();
-        } else {
-            mStartWhenPrepared = true;
-        }
-    }
-
-    public void stopAudio() {
-        if ((mAudioPlayer != null) && mIsPrepared) {
-            mAudioPlayer.stop();
-            mAudioPlayer.release();
-            mAudioPlayer = null;
-            hideAudioInfo();
-        } else {
-            mStopWhenPrepared = true;
-        }
-    }
-
-    public void pauseAudio() {
-        if ((mAudioPlayer != null) && mIsPrepared) {
-            if (mAudioPlayer.isPlaying()) {
-                mAudioPlayer.pause();
-            }
-        }
-        mStartWhenPrepared = false;
-    }
-
-    public void seekAudio(int seekTo) {
-        if ((mAudioPlayer != null) && mIsPrepared) {
-            mAudioPlayer.seekTo(seekTo);
-        } else {
-            mSeekWhenPrepared = seekTo;
-        }
-    }
-
-    public void startVideo() {
-        if (mVideoView != null) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Starting video playback.");
-            }
-            mVideoView.start();
-        }
-    }
-
-    public void stopVideo() {
-        if ((mVideoView != null)) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Stopping video playback.");
-            }
-            mVideoView.stopPlayback();
-        }
-    }
-
-    public void pauseVideo() {
-        if (mVideoView != null) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Pausing video playback.");
-            }
-            mVideoView.pause();
-        }
-    }
-
-    public void seekVideo(int seekTo) {
-        if (mVideoView != null) {
-            if (seekTo > 0) {
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "Seeking video playback to " + seekTo);
-                }
-                mVideoView.seekTo(seekTo);
-            }
-        }
-    }
-
-    public void reset() {
-        if (null != mScrollText) {
-            mScrollText.setVisibility(View.GONE);
-        }
-
-        if (null != mImageView) {
-            mImageView.setVisibility(View.GONE);
-        }
-
-        if (null != mAudioPlayer) {
-            stopAudio();
-        }
-
-        if (null != mVideoView) {
-            stopVideo();
-            mVideoView.setVisibility(View.GONE);
-        }
-    }
-
-    public void setVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    @Override
-    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
-        super.onSizeChanged(w, h, oldw, oldh);
-
-        if (mSizeChangedListener != null) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "new size=" + w + "x" + h);
-            }
-            mSizeChangedListener.onSizeChanged(w, h - AUDIO_INFO_HEIGHT);
-        }
-    }
-
-    public void setOnSizeChangedListener(OnSizeChangedListener l) {
-        mSizeChangedListener = l;
-    }
-}
diff --git a/src/com/android/mms/ui/SlideViewInterface.java b/src/com/android/mms/ui/SlideViewInterface.java
deleted file mode 100644
index aa3e6eb..0000000
--- a/src/com/android/mms/ui/SlideViewInterface.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import android.graphics.Bitmap;
-import android.net.Uri;
-
-import java.util.Map;
-
-/**
- * Defines the interfaces of the view to show contents of a slide.
- */
-public interface SlideViewInterface extends ViewInterface {
-    void setImage(String name, Bitmap bitmap);
-    void setImageRegionFit(String fit);
-    void setImageVisibility(boolean visible);
-
-    void setVideo(String name, Uri video);
-    void setVideoVisibility(boolean visible);
-    void startVideo();
-    void stopVideo();
-    void pauseVideo();
-    void seekVideo(int seekTo);
-
-    void setAudio(Uri audio, String name, Map<String, ?> extras);
-    void startAudio();
-    void stopAudio();
-    void pauseAudio();
-    void seekAudio(int seekTo);
-
-    void setText(String name, String text);
-    void setTextVisibility(boolean visible);
-}
diff --git a/src/com/android/mms/ui/SlideshowActivity.java b/src/com/android/mms/ui/SlideshowActivity.java
deleted file mode 100644
index 4f15126..0000000
--- a/src/com/android/mms/ui/SlideshowActivity.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.android.mms.dom.smil.SmilDocumentImpl;
-import com.android.mms.dom.smil.SmilPlayer;
-import com.android.mms.dom.smil.parser.SmilXmlSerializer;
-import com.android.mms.model.SlideshowModel;
-import com.android.mms.model.SmilHelper;
-import com.google.android.mms.MmsException;
-
-import org.w3c.dom.events.Event;
-import org.w3c.dom.events.EventListener;
-import org.w3c.dom.events.EventTarget;
-import org.w3c.dom.smil.SMILDocument;
-
-import android.app.Activity;
-import android.content.Intent;
-import android.graphics.PixelFormat;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Handler;
-import android.util.Config;
-import android.util.Log;
-import android.view.KeyEvent;
-import android.view.MotionEvent;
-import android.view.Window;
-import android.widget.MediaController;
-import android.widget.MediaController.MediaPlayerControl;
-
-import java.io.ByteArrayOutputStream;
-
-/**
- * Plays the given slideshow in full-screen mode with a common controller.
- */
-public class SlideshowActivity extends Activity implements EventListener {
-    private static final String TAG = "SlideshowActivity";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private MediaController mMediaController;
-    private SmilPlayer mSmilPlayer;
-
-    private Handler mHandler;
-
-    private SMILDocument mSmilDoc;
-
-    @Override
-    public void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-        mHandler = new Handler();
-
-        // Play slide-show in full-screen mode.
-        requestWindowFeature(Window.FEATURE_NO_TITLE);
-        getWindow().setFormat(PixelFormat.TRANSLUCENT);
-        setContentView(R.layout.slideshow);
-
-        Intent intent = getIntent();
-        Uri msg = intent.getData();
-        final SlideshowModel model;
-
-        try {
-            model = SlideshowModel.createFromMessageUri(this, msg);
-        } catch (MmsException e) {
-            Log.e(TAG, "Cannot present the slide show.", e);
-            finish();
-            return;
-        }
-
-        SlideView view = (SlideView) findViewById(R.id.slide_view);
-        PresenterFactory.getPresenter("SlideshowPresenter", this, view, model);
-
-        mHandler.post(new Runnable() {
-            private boolean isRotating() {
-                return mSmilPlayer.isPausedState()
-                        || mSmilPlayer.isPlayingState()
-                        || mSmilPlayer.isPlayedState();
-            }
-
-            public void run() {
-                mSmilPlayer = SmilPlayer.getPlayer();
-                initMediaController();
-
-                // Use SmilHelper.getDocument() to ensure rebuilding the
-                // entire SMIL document.
-                mSmilDoc = SmilHelper.getDocument(model);
-                if (DEBUG) {
-                    ByteArrayOutputStream ostream = new ByteArrayOutputStream();
-                    SmilXmlSerializer.serialize(mSmilDoc, ostream);
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, ostream.toString());
-                    }
-                }
-
-                // Add event listener.
-                ((EventTarget) mSmilDoc).addEventListener(
-                        SmilDocumentImpl.SMIL_DOCUMENT_END_EVENT,
-                        SlideshowActivity.this, false);
-
-                mSmilPlayer.init(mSmilDoc);
-                if (isRotating()) {
-                    mSmilPlayer.reload();
-                } else {
-                    mSmilPlayer.play();
-                }
-            }
-        });
-    }
-
-    private void initMediaController() {
-        mMediaController = new MediaController(SlideshowActivity.this, false);
-        mMediaController.setMediaPlayer(new SmilPlayerController(mSmilPlayer));
-        mMediaController.setAnchorView(findViewById(R.id.slide_view));
-    }
-
-    @Override
-    public boolean onTouchEvent(MotionEvent ev) {
-        if ((mSmilPlayer != null) && (mMediaController != null)) {
-            mMediaController.show();
-        }
-        return false;
-    }
-
-    @Override
-    protected void onPause() {
-        super.onPause();
-        if (mSmilDoc != null) {
-            ((EventTarget) mSmilDoc).removeEventListener(
-                    SmilDocumentImpl.SMIL_DOCUMENT_END_EVENT, this, false);
-        }
-    }
-
-    @Override
-    protected void onStop() {
-        super.onStop();
-        if ((null != mSmilPlayer)) {
-            if (isFinishing()) {
-                mSmilPlayer.stop();
-            } else {
-                mSmilPlayer.stopWhenReload();
-            }
-        }
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        switch (keyCode) {
-            case KeyEvent.KEYCODE_VOLUME_DOWN:
-            case KeyEvent.KEYCODE_VOLUME_UP:
-            case KeyEvent.KEYCODE_BACK:
-            case KeyEvent.KEYCODE_MENU:
-            case KeyEvent.KEYCODE_DPAD_UP:
-            case KeyEvent.KEYCODE_DPAD_DOWN:
-            case KeyEvent.KEYCODE_DPAD_LEFT:
-            case KeyEvent.KEYCODE_DPAD_RIGHT:
-                break;
-            default:
-                if ((mSmilPlayer != null) && (mMediaController != null)) {
-                    mMediaController.show();
-                }
-        }
-        return super.onKeyDown(keyCode, event);
-    }
-
-    private class SmilPlayerController implements MediaPlayerControl {
-        private final SmilPlayer mPlayer;
-
-        public SmilPlayerController(SmilPlayer player) {
-            mPlayer = player;
-        }
-
-        public int getBufferPercentage() {
-            // We don't need to buffer data, always return 100%.
-            return 100;
-        }
-
-        public int getCurrentPosition() {
-            return mPlayer.getCurrentPosition();
-        }
-
-        public int getDuration() {
-            return mPlayer.getDuration();
-        }
-
-        public boolean isPlaying() {
-            return mPlayer != null ? mPlayer.isPlayingState() : false;
-        }
-
-        public void pause() {
-            if (mPlayer != null) {
-                mPlayer.pause();
-            }
-        }
-
-        public void seekTo(int pos) {
-            // Don't need to support.
-        }
-
-        public void start() {
-            if (mPlayer != null) {
-                mPlayer.start();
-            }
-        }
-    }
-
-    public void handleEvent(Event evt) {
-        final Event event = evt;
-        mHandler.post(new Runnable() {
-            public void run() {
-                String type = event.getType();
-                if(type.equals(SmilDocumentImpl.SMIL_DOCUMENT_END_EVENT)) {
-                    finish();
-                }
-            }
-        });
-    }
-}
diff --git a/src/com/android/mms/ui/SlideshowAttachmentView.java b/src/com/android/mms/ui/SlideshowAttachmentView.java
deleted file mode 100644
index eb9a6e3..0000000
--- a/src/com/android/mms/ui/SlideshowAttachmentView.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.media.MediaPlayer;
-import android.net.Uri;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.view.View;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * This class provides an embedded editor/viewer of slide-show attachment.
- */
-public class SlideshowAttachmentView extends LinearLayout implements
-        SlideViewInterface {
-    private static final String TAG = "SlideshowAttachmentView";
-
-    private ImageView mImageView;
-    private TextView mTextView;
-
-    public SlideshowAttachmentView(Context context) {
-        super(context);
-    }
-
-    public SlideshowAttachmentView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        mImageView = (ImageView) findViewById(R.id.slideshow_image);
-        mTextView = (TextView) findViewById(R.id.slideshow_text);
-    }
-
-    public void startAudio() {
-        // TODO Auto-generated method stub
-    }
-
-    public void startVideo() {
-        // TODO Auto-generated method stub
-    }
-
-    public void setAudio(Uri audio, String name, Map<String, ?> extras) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setImage(String name, Bitmap bitmap) {
-        mImageView.setImageBitmap(bitmap);
-    }
-
-    public void setImageRegionFit(String fit) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setImageVisibility(boolean visible) {
-        mImageView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
-    }
-
-    public void setText(String name, String text) {
-        mTextView.setText(text);
-    }
-
-    public void setTextVisibility(boolean visible) {
-        mTextView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
-    }
-
-    public void setVideo(String name, Uri video) {
-        MediaPlayer mp = new MediaPlayer();
-        try {
-            mp.setDataSource(mContext, video);
-            mImageView.setImageBitmap(mp.getFrameAt(1000));
-        } catch (IOException e) {
-            Log.e(TAG, "Unexpected IOException.", e);
-        } finally {
-            mp.release();
-        }
-    }
-
-    public void setVideoVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void stopAudio() {
-        // TODO Auto-generated method stub
-    }
-
-    public void stopVideo() {
-        // TODO Auto-generated method stub
-    }
-
-    public void reset() {
-        mImageView.setImageURI(null);
-        mTextView.setText("");
-    }
-
-    public void setVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void pauseAudio() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void pauseVideo() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekAudio(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekVideo(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-}
diff --git a/src/com/android/mms/ui/SlideshowEditActivity.java b/src/com/android/mms/ui/SlideshowEditActivity.java
deleted file mode 100644
index ebc390d..0000000
--- a/src/com/android/mms/ui/SlideshowEditActivity.java
+++ /dev/null
@@ -1,385 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.google.android.mms.MmsException;
-import com.android.mms.R;
-import com.android.mms.model.IModelChangedObserver;
-import com.android.mms.model.Model;
-import com.android.mms.model.SlideModel;
-import com.android.mms.model.SlideshowModel;
-
-import com.google.android.mms.pdu.PduBody;
-import com.google.android.mms.pdu.PduPersister;
-
-import android.app.ListActivity;
-import android.content.Context;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Bundle;
-import android.util.Config;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.ImageView;
-import android.widget.ListView;
-import android.widget.TextView;
-import android.widget.Toast;
-
-/**
- * A list of slides which allows user to edit each item in it.
- */
-public class SlideshowEditActivity extends ListActivity {
-    private final static String TAG = "SlideshowEditActivity";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    // Menu ids.
-    private final static int MENU_MOVE_UP           = 0;
-    private final static int MENU_MOVE_DOWN         = 1;
-    private final static int MENU_REMOVE_SLIDE      = 2;
-    private final static int MENU_ADD_SLIDE         = 3;
-    private final static int MENU_DISCARD_SLIDESHOW = 4;
-
-    private final static int REQUEST_CODE_EDIT_SLIDE         = 6;
-
-    // State.
-    private final static String STATE = "state";
-    private final static String SLIDE_INDEX = "slide_index";
-    private final static String MESSAGE_URI = "message_uri";
-
-    private ListView mList;
-    private SlideListAdapter mSlideListAdapter;
-
-    private SlideshowModel mSlideshowModel = null;
-    private SlideshowEditor mSlideshowEditor = null;
-
-    private Bundle mState;
-    private Uri mUri;
-    private boolean mDirty;
-
-    @Override
-    protected void onCreate(Bundle icicle) {
-        super.onCreate(icicle);
-
-        mList = getListView();
-        mList.addFooterView(createAddSlideItem());
-
-        if (icicle != null) {
-            // Retrieve previously saved state of this activity.
-            mState = icicle.getBundle(STATE);
-        }
-
-        if (mState != null) {
-            mUri = Uri.parse(mState.getString(MESSAGE_URI));
-        } else {
-            mUri = getIntent().getData();
-        }
-
-        if (mUri == null) {
-            Log.e(TAG, "Cannot startup activity, null Uri.");
-            finish();
-            return;
-        }
-
-        try {
-            initSlideList();
-        } catch (MmsException e) {
-            Log.e(TAG, "Failed to initialize the slide-list.", e);
-            finish();
-        }
-    }
-
-    private View createAddSlideItem() {
-        View v = ((LayoutInflater) getSystemService(
-                Context.LAYOUT_INFLATER_SERVICE)).inflate(R.layout.slideshow_edit_item, null);
-
-        //  Add slide.
-        TextView text = (TextView) v.findViewById(R.id.slide_number_text);
-        text.setText(R.string.add_slide);
-
-        text = (TextView) v.findViewById(R.id.text_preview);
-        text.setText(R.string.add_slide_hint);
-
-        ImageView image = (ImageView) v.findViewById(R.id.image_preview);
-        image.setImageResource(R.drawable.ic_launcher_slideshow_add_sms);
-
-        return v;
-    }
-
-    @Override
-    protected void onListItemClick(ListView l, View v, int position, long id) {
-        if (position == (l.getCount() - 1)) {
-            addNewSlide();
-        } else {
-            openSlide(position);
-        }
-    }
-
-    @Override
-    protected void onResume() {
-        super.onResume();
-
-        if (mState != null) {
-            mList.setSelection(mState.getInt(SLIDE_INDEX, 0));
-        }
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see android.app.Activity#onSaveInstanceState(android.os.Bundle)
-     */
-    @Override
-    protected void onSaveInstanceState(Bundle outState) {
-        super.onSaveInstanceState(outState);
-
-        mState = new Bundle();
-        if (mList.getSelectedItemPosition() >= 0) {
-            mState.putInt(SLIDE_INDEX, mList.getSelectedItemPosition());
-        }
-
-        if (mUri != null) {
-            mState.putString(MESSAGE_URI, mUri.toString());
-        }
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "Saving state: " + mState);
-        }
-        outState.putBundle(STATE, mState);
-    }
-
-    @Override
-    protected void onPause()  {
-        super.onPause();
-
-        synchronized (this) {
-            if (mDirty) {
-                try {
-                    PduBody pb = mSlideshowModel.toPduBody();
-                    PduPersister.getPduPersister(this).updateParts(mUri, pb);
-                    mSlideshowModel.sync(pb);
-                }  catch (MmsException e) {
-                    Log.e(TAG, "Cannot update the message: " + mUri, e);
-                }
-            }
-        }
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        cleanupSlideshowModel();
-    }
-
-    private void cleanupSlideshowModel() {
-        if (mSlideshowModel != null) {
-            mSlideshowModel.unregisterModelChangedObserver(
-                    mModelChangedObserver);
-            mSlideshowModel = null;
-        }
-    }
-
-    private void initSlideList() throws MmsException {
-        cleanupSlideshowModel();
-        mSlideshowModel = SlideshowModel.createFromMessageUri(this, mUri);
-        mSlideshowModel.registerModelChangedObserver(mModelChangedObserver);
-        mSlideshowEditor = new SlideshowEditor(this, mSlideshowModel);
-        mSlideListAdapter = new SlideListAdapter(
-                this, R.layout.slideshow_edit_item, mSlideshowModel);
-        mList.setAdapter(mSlideListAdapter);
-    }
-
-    @Override
-    public boolean onPrepareOptionsMenu(Menu menu) {
-        menu.clear();
-
-        int position = mList.getSelectedItemPosition();
-        if ((position >= 0) && (position != (mList.getCount() - 1))) {
-            // Selected one slide.
-            if (position > 0) {
-                menu.add(0, MENU_MOVE_UP, 0, R.string.move_up).setIcon(R.drawable.ic_menu_move_up);
-            }
-
-            if (position < (mSlideListAdapter.getCount() - 1)) {
-                menu.add(0, MENU_MOVE_DOWN, 0, R.string.move_down).setIcon(
-                        R.drawable.ic_menu_move_down);
-            }
-
-            menu.add(0, MENU_ADD_SLIDE, 0, R.string.add_slide).setIcon(R.drawable.ic_menu_add_slide);
-
-            menu.add(0, MENU_REMOVE_SLIDE, 0, R.string.remove_slide).setIcon(
-                    android.R.drawable.ic_menu_delete);
-        } else {
-            menu.add(0, MENU_ADD_SLIDE, 0, R.string.add_slide).setIcon(R.drawable.ic_menu_add_slide);
-        }
-
-        menu.add(0, MENU_DISCARD_SLIDESHOW, 0,
-                R.string.discard_slideshow).setIcon(R.drawable.ic_menu_delete_played);
-
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        int position = mList.getSelectedItemPosition();
-
-        switch (item.getItemId()) {
-            case MENU_MOVE_UP:
-                if ((position > 0) && (position < mSlideshowModel.size())) {
-                    mSlideshowEditor.moveSlideUp(position);
-                    mSlideListAdapter.notifyDataSetChanged();
-                    mList.setSelection(position - 1);
-                }
-                break;
-            case MENU_MOVE_DOWN:
-                if ((position >= 0) && (position < mSlideshowModel.size() - 1)) {
-                    mSlideshowEditor.moveSlideDown(position);
-                    mSlideListAdapter.notifyDataSetChanged();
-                    mList.setSelection(position + 1);
-                }
-                break;
-            case MENU_REMOVE_SLIDE:
-                if ((position >= 0) && (position < mSlideshowModel.size())) {
-                    mSlideshowEditor.removeSlide(position);
-                    mSlideListAdapter.notifyDataSetChanged();
-                }
-                break;
-            case MENU_ADD_SLIDE:
-                addNewSlide();
-                break;
-            case MENU_DISCARD_SLIDESHOW:
-                // delete all slides from slideshow.
-                mSlideshowEditor.removeAllSlides();
-                mSlideListAdapter.notifyDataSetChanged();
-                finish();
-                break;
-        }
-
-        return true;
-    }
-
-    private void openSlide(int index) {
-        Intent intent = new Intent(this, SlideEditorActivity.class);
-        intent.setData(mUri);
-        intent.putExtra(SlideEditorActivity.SLIDE_INDEX, index);
-        startActivityForResult(intent, REQUEST_CODE_EDIT_SLIDE);
-    }
-
-    private void addNewSlide() {
-        if ( mSlideshowEditor.addNewSlide() ) {
-            // add successfully
-            mSlideListAdapter.notifyDataSetChanged();
-
-            // Select the new slide.
-            mList.requestFocus();
-            mList.setSelection(mSlideshowModel.size() - 1);
-        } else {
-            Toast.makeText(this, R.string.cannot_add_slide_anymore,
-                    Toast.LENGTH_SHORT).show();
-        }
-    }
-
-    @Override
-    protected void onActivityResult(int requestCode, int resultCode,
-            Intent data) {
-        if (resultCode != RESULT_OK) {
-            return;
-        }
-
-        switch(requestCode) {
-            case REQUEST_CODE_EDIT_SLIDE:
-                synchronized (this) {
-                    mDirty = true;
-                }
-                setResult(RESULT_OK);
-
-                if ((data != null) && data.getBooleanExtra("done", false)) {
-                    finish();
-                    return;
-                }
-
-                try {
-                    initSlideList();
-                } catch (MmsException e) {
-                    Log.e(TAG, "Failed to initialize the slide-list.", e);
-                    finish();
-                    return;
-                }
-                break;
-        }
-    }
-
-    private static class SlideListAdapter extends ArrayAdapter<SlideModel> {
-        private final Context mContext;
-        private final int mResource;
-        private final LayoutInflater mInflater;
-        private final SlideshowModel mSlideshow;
-
-        public SlideListAdapter(Context context, int resource,
-                SlideshowModel slideshow) {
-            super(context, resource, slideshow);
-
-            mContext = context;
-            mResource = resource;
-            mInflater = LayoutInflater.from(context);
-            mSlideshow = slideshow;
-        }
-
-        @Override
-        public View getView(int position, View convertView, ViewGroup parent) {
-            return createViewFromResource(position, convertView, mResource);
-        }
-
-        private View createViewFromResource(int position, View convertView, int resource) {
-            SlideListItemView slideListItemView;
-            slideListItemView = (SlideListItemView) mInflater.inflate(
-                    resource, null);
-
-            // Show slide number.
-            TextView text;
-            text = (TextView) slideListItemView.findViewById(R.id.slide_number_text);
-            text.setText("Slide " + (position + 1));
-
-            SlideModel slide = getItem(position);
-            int dur = slide.getDuration() / 1000;
-            text = (TextView) slideListItemView.findViewById(R.id.duration_text);
-            text.setText(dur + " secs");
-
-            Presenter presenter = PresenterFactory.getPresenter(
-                    "SlideshowPresenter", mContext, slideListItemView, mSlideshow);
-            ((SlideshowPresenter) presenter).setLocation(position);
-            presenter.present();
-
-            return slideListItemView;
-        }
-    }
-
-    private final IModelChangedObserver mModelChangedObserver =
-        new IModelChangedObserver() {
-            public void onModelChanged(Model model, boolean dataChanged) {
-                synchronized (SlideshowEditActivity.this) {
-                    mDirty = true;
-                }
-                setResult(RESULT_OK);
-            }
-        };
-}
diff --git a/src/com/android/mms/ui/SlideshowEditor.java b/src/com/android/mms/ui/SlideshowEditor.java
deleted file mode 100644
index aab2ebc..0000000
--- a/src/com/android/mms/ui/SlideshowEditor.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.google.android.mms.ContentType;
-import com.google.android.mms.MmsException;
-import com.android.mms.model.AudioModel;
-import com.android.mms.model.ImageModel;
-import com.android.mms.model.RegionModel;
-import com.android.mms.model.SlideModel;
-import com.android.mms.model.SlideshowModel;
-import com.android.mms.model.TextModel;
-import com.android.mms.model.VideoModel;
-
-import android.content.Context;
-import android.net.Uri;
-import android.util.Log;
-
-/**
- * An utility to edit contents of a slide.
- */
-public class SlideshowEditor {
-    private static final String TAG = "SlideshowEditor";
-
-    private static final int MAX_SLIDE_NUM = 10;
-
-    private final Context mContext;
-    private final SlideshowModel mModel;
-
-    public SlideshowEditor(Context context, SlideshowModel model) {
-        mContext = context;
-        mModel = model;
-    }
-
-    /**
-     * Add a new slide to the end of message.
-     *
-     * @return true if success, false if reach the max slide number.
-     */
-    public boolean addNewSlide() {
-        int position = mModel.size();
-        return addNewSlide(position);
-    }
-
-    /**
-     * Add a new slide at the specified position in the message.
-     *
-     * @return true if success, false if reach the max slide number.
-     * @throws IndexOutOfBoundsException - if position is out of range
-     *         (position < 0 || position > size()).
-     */
-    public boolean addNewSlide(int position) {
-        int size = mModel.size();
-        if (size < MAX_SLIDE_NUM) {
-            SlideModel slide = new SlideModel(mModel);
-
-            TextModel text = new TextModel(
-                    mContext, ContentType.TEXT_PLAIN, "text_" + size + ".txt",
-                    mModel.getLayout().getTextRegion());
-            slide.add(text);
-
-            mModel.add(position, slide);
-            return true;
-        } else {
-            Log.w(TAG, "The limitation of the number of slides is reached.");
-            return false;
-        }
-    }
-
-    /**
-     * Remove one slide.
-     *
-     * @param position
-     */
-    public void removeSlide(int position) {
-        mModel.remove(position);
-    }
-    
-    /**
-     * Remove all slides.
-     */
-    public void removeAllSlides() {
-        while (mModel.size() > 0) {
-            removeSlide(0);
-        }
-    }
-
-    /**
-     * Remove the text of the specified slide.
-     *
-     * @param position index of the slide
-     * @return true if success, false if no text in the slide.
-     */
-    public boolean removeText(int position) {
-        return mModel.get(position).removeText();
-    }
-
-    public boolean removeImage(int position) {
-        return mModel.get(position).removeImage();
-    }
-
-    public boolean removeVideo(int position) {
-        return mModel.get(position).removeVideo();
-    }
-
-    public boolean removeAudio(int position) {
-        return mModel.get(position).removeAudio();
-    }
-
-    public void changeText(int position, String newText) {
-        if (newText != null) {
-            SlideModel slide = mModel.get(position);
-            TextModel text = slide.getText();
-            if (text == null) {
-                text = new TextModel(mContext,
-                        ContentType.TEXT_PLAIN, "text_" + position + ".txt",
-                        mModel.getLayout().getTextRegion());
-                text.setText(newText);
-                slide.add(text);
-            } else if (!newText.equals(text.getText())) {
-                text.setText(newText);
-            }
-        }
-    }
-
-    public void changeImage(int position, Uri newImage) throws MmsException {
-        mModel.get(position).add(new ImageModel(
-                mContext, newImage, mModel.getLayout().getImageRegion()));
-    }
-
-    public void changeAudio(int position, Uri newAudio) throws MmsException {
-        AudioModel audio = new AudioModel(mContext, newAudio);
-        SlideModel slide = mModel.get(position);
-        slide.add(audio);
-        slide.updateDuration(audio.getDuration());
-    }
-
-    public void changeVideo(int position, Uri newVideo) throws MmsException {
-        VideoModel video = new VideoModel(mContext, newVideo,
-                mModel.getLayout().getImageRegion());
-        SlideModel slide = mModel.get(position);
-        slide.add(video);
-        slide.updateDuration(video.getDuration());
-    }
-
-    public void moveSlideUp(int position) {
-        mModel.add(position - 1, mModel.remove(position));
-    }
-
-    public void moveSlideDown(int position) {
-        mModel.add(position + 1, mModel.remove(position));
-    }
-
-    public void changeDuration(int position, int dur) {
-        if (dur >= 0) {
-            mModel.get(position).setDuration(dur);
-        }
-    }
-
-    public void changeLayout(int layout) {
-        mModel.getLayout().changeTo(layout);
-    }
-
-    public RegionModel getImageRegion() {
-        return mModel.getLayout().getImageRegion();
-    }
-
-    public RegionModel getTextRegion() {
-        return mModel.getLayout().getTextRegion();
-    }
-}
diff --git a/src/com/android/mms/ui/SlideshowPresenter.java b/src/com/android/mms/ui/SlideshowPresenter.java
deleted file mode 100644
index 1148d13..0000000
--- a/src/com/android/mms/ui/SlideshowPresenter.java
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-import com.android.mms.model.AudioModel;
-import com.android.mms.model.ImageModel;
-import com.android.mms.model.LayoutModel;
-import com.android.mms.model.MediaModel;
-import com.android.mms.model.Model;
-import com.android.mms.model.RegionMediaModel;
-import com.android.mms.model.RegionModel;
-import com.android.mms.model.SlideModel;
-import com.android.mms.model.SlideshowModel;
-import com.android.mms.model.TextModel;
-import com.android.mms.model.VideoModel;
-import com.android.mms.model.MediaModel.MediaAction;
-import com.android.mms.ui.AdaptableSlideViewInterface.OnSizeChangedListener;
-
-import android.content.Context;
-import android.drm.mobile1.DrmException;
-import android.os.Handler;
-import android.util.Config;
-import android.util.Log;
-import android.widget.Toast;
-
-/**
- * A basic presenter of slides.
- */
-public class SlideshowPresenter extends Presenter {
-    private static final String TAG = "SlideshowPresenter";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    protected int mLocation;
-    protected final int mSlideNumber;
-
-    protected float mWidthTransformRatio;
-    protected float mHeightTransformRatio;
-
-    // Since only the original thread that created a view hierarchy can touch
-    // its views, we have to use Handler to manage the views in the some
-    // callbacks such as onModelChanged().
-    protected final Handler mHandler = new Handler();
-
-    public SlideshowPresenter(Context context, ViewInterface view, Model model) {
-        super(context, view, model);
-        mLocation = 0;
-        mSlideNumber = ((SlideshowModel) mModel).size();
-
-        if (view instanceof AdaptableSlideViewInterface) {
-            ((AdaptableSlideViewInterface) view).setOnSizeChangedListener(
-                    mViewSizeChangedListener);
-        }
-    }
-
-    private final OnSizeChangedListener mViewSizeChangedListener =
-        new OnSizeChangedListener() {
-        public void onSizeChanged(int width, int height) {
-            LayoutModel layout = ((SlideshowModel) mModel).getLayout();
-            mWidthTransformRatio = getWidthTransformRatio(
-                    width, layout.getLayoutWidth());
-            mHeightTransformRatio = getHeightTransformRatio(
-                    height, layout.getLayoutHeight());
-
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "ratio_w = " + mWidthTransformRatio
-                        + ", ratio_h = " + mHeightTransformRatio);
-            }
-        }
-    };
-
-    private float getWidthTransformRatio(int width, int layoutWidth) {
-        if (width > 0) {
-            return (float) layoutWidth / (float) width;
-        }
-        return 1.0f;
-    }
-
-    private float getHeightTransformRatio(int height, int layoutHeight) {
-        if (height > 0) {
-            return (float) layoutHeight / (float) height;
-        }
-        return 1.0f;
-    }
-
-    private int transformWidth(int width) {
-        return (int) (width / mWidthTransformRatio);
-    }
-
-    private int transformHeight(int height) {
-        return (int) (height / mHeightTransformRatio);
-    }
-
-    @Override
-    public void present() {
-        presentSlide((SlideViewInterface) mView, ((SlideshowModel) mModel).get(mLocation));
-    }
-
-    /**
-     * @param view
-     * @param model
-     */
-    protected void presentSlide(SlideViewInterface view, SlideModel model) {
-        view.reset();
-
-        try {
-            for (MediaModel media : model) {
-                if (media instanceof RegionMediaModel) {
-                    presentRegionMedia(view, (RegionMediaModel) media, true);
-                } else if (media.isAudio()) {
-                    presentAudio(view, (AudioModel) media, true);
-                }
-            }
-        } catch (DrmException e) {
-            Log.e(TAG, e.getMessage(), e);
-            Toast.makeText(mContext,
-                    mContext.getString(R.string.insufficient_drm_rights),
-                    Toast.LENGTH_SHORT).show();
-        }
-    }
-
-    /**
-     * @param view
-     * @throws DrmException
-     */
-    protected void presentRegionMedia(SlideViewInterface view,
-            RegionMediaModel rMedia, boolean dataChanged)
-            throws DrmException {
-        RegionModel r = (rMedia).getRegion();
-        if (rMedia.isText()) {
-            presentText(view, (TextModel) rMedia, r, dataChanged);
-        } else if (rMedia.isImage()) {
-            presentImage(view, (ImageModel) rMedia, r, dataChanged);
-        } else if (rMedia.isVideo()) {
-            presentVideo(view, (VideoModel) rMedia, r, dataChanged);
-        }
-    }
-
-    protected void presentAudio(SlideViewInterface view, AudioModel audio,
-            boolean dataChanged) throws DrmException {
-        // Set audio only when data changed.
-        if (dataChanged) {
-            view.setAudio(audio.getUriWithDrmCheck(), audio.getSrc(), audio.getExtras());
-        }
-
-        MediaAction action = audio.getCurrentAction();
-        if (action == MediaAction.START) {
-            view.startAudio();
-        } else if (action == MediaAction.PAUSE) {
-            view.pauseAudio();
-        } else if (action == MediaAction.STOP) {
-            view.stopAudio();
-        } else if (action == MediaAction.SEEK) {
-            view.seekAudio(audio.getSeekTo());
-        }
-    }
-
-    protected void presentText(SlideViewInterface view, TextModel text,
-            RegionModel r, boolean dataChanged) {
-        if (dataChanged) {
-            view.setText(text.getSrc(), text.getText());
-        }
-
-        if (view instanceof AdaptableSlideViewInterface) {
-            ((AdaptableSlideViewInterface) view).setTextRegion(
-                    transformWidth(r.getLeft()),
-                    transformHeight(r.getTop()),
-                    transformWidth(r.getWidth()),
-                    transformHeight(r.getHeight()));
-        }
-        view.setTextVisibility(text.isVisible());
-    }
-
-    /**
-     * @param view
-     * @param image
-     * @param r
-     * @throws DrmException
-     */
-    protected void presentImage(SlideViewInterface view, ImageModel image,
-            RegionModel r, boolean dataChanged) throws DrmException {
-        if (dataChanged) {
-            view.setImage(image.getSrc(), image.getBitmapWithDrmCheck());
-        }
-
-        if (view instanceof AdaptableSlideViewInterface) {
-            ((AdaptableSlideViewInterface) view).setImageRegion(
-                    transformWidth(r.getLeft()),
-                    transformHeight(r.getTop()),
-                    transformWidth(r.getWidth()),
-                    transformHeight(r.getHeight()));
-        }
-        view.setImageRegionFit(r.getFit());
-        view.setImageVisibility(image.isVisible());
-    }
-
-    /**
-     * @param view
-     * @param video
-     * @param r
-     * @throws DrmException
-     */
-    protected void presentVideo(SlideViewInterface view, VideoModel video,
-            RegionModel r, boolean dataChanged) throws DrmException {
-        if (dataChanged) {
-            view.setVideo(video.getSrc(), video.getUriWithDrmCheck());
-        }
-
-        if (view instanceof AdaptableSlideViewInterface) {
-            ((AdaptableSlideViewInterface) view).setVideoRegion(
-                    transformWidth(r.getLeft()),
-                    transformHeight(r.getTop()),
-                    transformWidth(r.getWidth()),
-                    transformHeight(r.getHeight()));
-        }
-        view.setVideoVisibility(video.isVisible());
-
-        MediaAction action = video.getCurrentAction();
-        if (action == MediaAction.START) {
-            view.startVideo();
-        } else if (action == MediaAction.PAUSE) {
-            view.pauseVideo();
-        } else if (action == MediaAction.STOP) {
-            view.stopVideo();
-        } else if (action == MediaAction.SEEK) {
-            view.seekVideo(video.getSeekTo());
-        }
-    }
-
-    public void setLocation(int location) {
-        mLocation = location;
-    }
-
-    public int getLocation() {
-        return mLocation;
-    }
-
-    public void goBackward() {
-        if (mLocation > 0) {
-            mLocation--;
-        }
-    }
-
-    public void goForward() {
-        if (mLocation < (mSlideNumber - 1)) {
-            mLocation++;
-        }
-    }
-
-    public void onModelChanged(final Model model, final boolean dataChanged) {
-        final SlideViewInterface view = (SlideViewInterface) mView;
-
-        // FIXME: Should be optimized.
-        if (model instanceof SlideshowModel) {
-            // TODO:
-        } else if (model instanceof SlideModel) {
-            if (((SlideModel) model).isVisible()) {
-                mHandler.post(new Runnable() {
-                    public void run() {
-                        presentSlide(view, (SlideModel) model);
-                    }
-                });
-            } else {
-                mHandler.post(new Runnable() {
-                    public void run() {
-                        goForward();
-                    }
-                });
-            }
-        } else if (model instanceof MediaModel) {
-            if (model instanceof RegionMediaModel) {
-                mHandler.post(new Runnable() {
-                    public void run() {
-                        try {
-                            presentRegionMedia(view, (RegionMediaModel) model, dataChanged);
-                        } catch (DrmException e) {
-                            Log.e(TAG, e.getMessage(), e);
-                            Toast.makeText(mContext,
-                                    mContext.getString(R.string.insufficient_drm_rights),
-                                    Toast.LENGTH_SHORT).show();
-                        }
-                    }
-                });
-            } else if (((MediaModel) model).isAudio()) {
-                mHandler.post(new Runnable() {
-                    public void run() {
-                        try {
-                            presentAudio(view, (AudioModel) model, dataChanged);
-                        } catch (DrmException e) {
-                            Log.e(TAG, e.getMessage(), e);
-                            Toast.makeText(mContext,
-                                    mContext.getString(R.string.insufficient_drm_rights),
-                                    Toast.LENGTH_SHORT).show();
-                        }
-                    }
-                });
-            }
-        } else if (model instanceof RegionModel) {
-            // TODO:
-        }
-    }
-}
diff --git a/src/com/android/mms/ui/UriImage.java b/src/com/android/mms/ui/UriImage.java
deleted file mode 100644
index 1b15bf1..0000000
--- a/src/com/android/mms/ui/UriImage.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.MmsConfig;
-import com.android.mms.model.ImageModel;
-import com.google.android.mms.pdu.PduPart;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.Context;
-import android.database.Cursor;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.graphics.Bitmap.CompressFormat;
-import android.net.Uri;
-import android.provider.MediaStore.Images;
-import android.provider.Telephony.Mms.Part;
-import android.text.TextUtils;
-import android.util.Config;
-import android.util.Log;
-
-import java.io.ByteArrayOutputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-
-public class UriImage {
-    private static final String TAG = "UriImage";
-    private static final boolean DEBUG = true;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private final Context mContext;
-    private final Uri mUri;
-    private String mContentType;
-    private String mSrc;
-    private int mWidth;
-    private int mHeight;
-
-    public UriImage(Context context, Uri uri) {
-        if ((null == context) || (null == uri)) {
-            throw new IllegalArgumentException();
-        }
-
-        mContext = context;
-        mUri = uri;
-
-        Cursor c = SqliteWrapper.query(context, context.getContentResolver(),
-                            uri, null, null, null, null);
-
-        if (c == null) {
-            throw new IllegalArgumentException(
-                    "Query on " + uri + " returns null result.");
-        }
-
-        if ((c.getCount() != 1) || !c.moveToFirst()) {
-            c.close();
-            throw new IllegalArgumentException(
-                    "Query on " + uri + " returns 0 or multiple rows.");
-        }
-
-        try {
-            String filePath;
-            if (ImageModel.isMmsUri(uri)) {
-                filePath = c.getString(c.getColumnIndexOrThrow(Part.FILENAME));
-                if (TextUtils.isEmpty(filePath)) {
-                    filePath = c.getString(
-                            c.getColumnIndexOrThrow(Part._DATA));
-                }
-                mContentType = c.getString(
-                        c.getColumnIndexOrThrow(Part.CONTENT_TYPE));
-            } else {
-                filePath = c.getString(
-                        c.getColumnIndexOrThrow(Images.Media.DATA));
-                mContentType = c.getString(
-                        c.getColumnIndexOrThrow(Images.Media.MIME_TYPE));
-            }
-            mSrc = filePath.substring(filePath.lastIndexOf('/') + 1);
-            decodeBoundsInfo();
-        } finally {
-            c.close();
-        }
-    }
-
-    private void decodeBoundsInfo() {
-        InputStream input = null;
-        try {
-            input = mContext.getContentResolver().openInputStream(mUri);
-            BitmapFactory.Options opt = new BitmapFactory.Options();
-            opt.inJustDecodeBounds = true;
-            BitmapFactory.decodeStream(input, null, opt);
-            mWidth = opt.outWidth;
-            mHeight = opt.outHeight;
-        } catch (FileNotFoundException e) {
-            // Ignore
-            Log.e(TAG, "IOException caught while opening stream", e);
-        } finally {
-            if (null != input) {
-                try {
-                    input.close();
-                } catch (IOException e) {
-                    // Ignore
-                    Log.e(TAG, "IOException caught while closing stream", e);
-                }
-            }
-        }
-    }
-
-    public String getContentType() {
-        return mContentType;
-    }
-
-    public String getSrc() {
-        return mSrc;
-    }
-
-    public int getWidth() {
-        return mWidth;
-    }
-
-    public int getHeight() {
-        return mHeight;
-    }
-
-    public PduPart getResizedImageAsPart(int widthLimit, int heightLimit) {
-        PduPart part = new PduPart();
-
-        byte[] data = getResizedImageData(widthLimit, heightLimit);
-        if (data == null) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Resize image failed.");
-            }
-            return null;
-        }
-
-        part.setData(data);
-        part.setContentType(getContentType().getBytes());
-        String src = getSrc();
-        byte[] srcBytes = src.getBytes();
-        part.setContentLocation(srcBytes);
-        part.setFilename(srcBytes);
-        part.setContentId(src.substring(0, src.lastIndexOf(".")).getBytes());
-
-        return part;
-    }
-
-    private byte[] getResizedImageData(int widthLimit, int heightLimit) {
-        int outWidth = mWidth;
-        int outHeight = mHeight;
-
-        int s = 1;
-        while ((outWidth / s > widthLimit) || (outHeight / s > heightLimit)) {
-            s *= 2;
-        }
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "outWidth=" + outWidth / s
-                    + " outHeight=" + outHeight / s);
-        }
-        BitmapFactory.Options options = new BitmapFactory.Options();
-        options.inSampleSize = s;
-
-        InputStream input = null;
-        try {
-            input = mContext.getContentResolver().openInputStream(mUri);
-            Bitmap b = BitmapFactory.decodeStream(input, null, options);
-            if (b == null) {
-                return null;
-            }
-
-            ByteArrayOutputStream os = new ByteArrayOutputStream();
-            b.compress(CompressFormat.JPEG, MmsConfig.IMAGE_COMPRESSION_QUALITY, os);
-            return os.toByteArray();
-        } catch (FileNotFoundException e) {
-            Log.e(TAG, e.getMessage(), e);
-            return null;
-        } finally {
-            if (input != null) {
-                try {
-                    input.close();
-                } catch (IOException e) {
-                    Log.e(TAG, e.getMessage(), e);
-                }
-            }
-        }
-    }
-}
diff --git a/src/com/android/mms/ui/VideoAttachmentView.java b/src/com/android/mms/ui/VideoAttachmentView.java
deleted file mode 100644
index dac84e9..0000000
--- a/src/com/android/mms/ui/VideoAttachmentView.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-import com.android.mms.R;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.media.MediaMetadataRetriever;
-import android.media.MediaPlayer;
-import android.net.Uri;
-import android.util.AttributeSet;
-import android.util.Log;
-import android.widget.ImageView;
-import android.widget.LinearLayout;
-
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * This class provides an embedded editor/viewer of video attachment.
- */
-public class VideoAttachmentView extends LinearLayout implements
-        SlideViewInterface {
-    private static final String TAG = "VideoAttachmentView";
-
-    private ImageView mThumbnailView;
-
-    public VideoAttachmentView(Context context) {
-        super(context);
-    }
-
-    public VideoAttachmentView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    @Override
-    protected void onFinishInflate() {
-        mThumbnailView = (ImageView) findViewById(R.id.video_thumbnail);
-    }
-
-    public void startAudio() {
-        // TODO Auto-generated method stub
-    }
-
-    public void startVideo() {
-        // TODO Auto-generated method stub
-    }
-
-    public void setAudio(Uri audio, String name, Map<String, ?> extras) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setImage(String name, Bitmap bitmap) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setImageRegionFit(String fit) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setImageVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setText(String name, String text) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setTextVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void setVideo(String name, Uri video) {
-        Bitmap bitmap = createVideoThumbnail(mContext, video);
-        if (null == bitmap) {
-            bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.mms_play_btn);
-        }
-        mThumbnailView.setImageBitmap(bitmap);
-    }
-
-    public static Bitmap createVideoThumbnail(Context context, Uri uri) {
-        Bitmap bitmap = null;
-        MediaMetadataRetriever retriever = new MediaMetadataRetriever();
-        try {
-            retriever.setMode(MediaMetadataRetriever.MODE_CAPTURE_FRAME_ONLY);
-            retriever.setDataSource(context, uri);
-            bitmap = retriever.captureFrame();
-        } catch (RuntimeException ex) {
-            // Assume this is a corrupt video file.
-        } finally {
-            try {
-                retriever.release();
-            } catch (RuntimeException ex) {
-                // Ignore failures while cleaning up.
-            }
-        }
-        return bitmap;
-    }
-
-    public void setVideoVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void stopAudio() {
-        // TODO Auto-generated method stub
-    }
-
-    public void stopVideo() {
-        // TODO Auto-generated method stub
-    }
-
-    public void reset() {
-        // TODO Auto-generated method stub
-    }
-
-    public void setVisibility(boolean visible) {
-        // TODO Auto-generated method stub
-    }
-
-    public void pauseAudio() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void pauseVideo() {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekAudio(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void seekVideo(int seekTo) {
-        // TODO Auto-generated method stub
-
-    }
-}
diff --git a/src/com/android/mms/ui/ViewInterface.java b/src/com/android/mms/ui/ViewInterface.java
deleted file mode 100644
index 1fcd94a..0000000
--- a/src/com/android/mms/ui/ViewInterface.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.ui;
-
-/**
- * Top-level interfaces of views.
- */
-public interface ViewInterface {
-    /**
-     * Get the width of the View object.
-     */
-    int getWidth();
-    /**
-     * Get the height of the View object.
-     */
-    int getHeight();
-    /**
-     * Reset the view (for next presentation).
-     */
-    void reset();
-    /**
-     * Set the visibility of the View object.
-     */
-    void setVisibility(boolean visible);
-}
diff --git a/src/com/android/mms/util/AddressUtils.java b/src/com/android/mms/util/AddressUtils.java
deleted file mode 100644
index bbb8cce..0000000
--- a/src/com/android/mms/util/AddressUtils.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-package com.android.mms.util;
-
-import com.android.mms.R;
-import com.google.android.mms.pdu.EncodedStringValue;
-import com.google.android.mms.pdu.PduHeaders;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.Context;
-import android.database.Cursor;
-import android.net.Uri;
-import android.provider.Telephony.Mms;
-import android.provider.Telephony.Mms.Addr;
-import android.text.TextUtils;
-
-public class AddressUtils {
-    private static final String TAG = "AddressUtils";
-
-    private AddressUtils() {
-        // Forbidden being instantiated.
-    }
-
-    public static boolean containsEmailAddress(String[] addresses) {
-        for (String address : addresses) {
-            if (Mms.isEmailAddress(address)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public static String getFrom(Context context, Uri uri) {
-        String msgId = uri.getLastPathSegment();
-        Uri.Builder builder = Mms.CONTENT_URI.buildUpon();
-
-        builder.appendPath(msgId).appendPath("addr");
-
-        Cursor cursor = SqliteWrapper.query(context, context.getContentResolver(),
-                            builder.build(), new String[] {Addr.ADDRESS, Addr.CHARSET},
-                            Addr.TYPE + "=" + PduHeaders.FROM, null, null);
-
-        if (cursor != null) {
-            try {
-                if (cursor.moveToFirst()) {
-                    String from = cursor.getString(0);
-
-                    if (!TextUtils.isEmpty(from)) {
-                        byte[] bytes = PduPersister.getBytes(from);
-                        int charset = cursor.getInt(1);
-                        return new EncodedStringValue(charset, bytes)
-                                .getString();
-                    }
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-        return context.getString(R.string.hidden_sender_address);
-    }
-}
diff --git a/src/com/android/mms/util/ContactInfoCache.java b/src/com/android/mms/util/ContactInfoCache.java
deleted file mode 100644
index 06eab68..0000000
--- a/src/com/android/mms/util/ContactInfoCache.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.util;
-
-import com.android.internal.telephony.CallerInfo;
-import com.android.mms.ui.MessageUtils;
-import com.android.mms.ui.RecipientList.Recipient;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.Context;
-import android.content.ContentResolver;
-import android.database.ContentObserver;
-import android.database.Cursor;
-import android.os.Handler;
-import android.provider.Contacts;
-import android.provider.Telephony.Mms;
-import android.telephony.PhoneNumberUtils;
-import android.telephony.TelephonyManager;
-import android.text.TextUtils;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.regex.Matcher;
-
-/**
- * This class caches query results of contact database and provides convenient
- * methods to return contact display name, etc.
- * 
- * TODO: To improve performance, we should make contacts query by ourselves instead of
- *       doing it one by one calling the CallerInfo API. In the long term, the contacts
- *       database could have a caching layer to ease the work for all apps.
- */
-public class ContactInfoCache {
-
-    private static final long REBUILD_DELAY = 5000; // 5 seconds
-    private static final String SEPARATOR = ";";
-
-    private static ContactInfoCache sInstance;
-
-    private final Context mContext;
-
-    // cached contact info
-    private final HashMap<String, CallerInfo> mCache = new HashMap<String, CallerInfo>();
-
-    // for background cache rebuilding
-    private Thread mCacheRebuilder = null;
-    private Object mCacheRebuildLock = new Object();
-    private boolean mPhoneCacheInvalidated = false;
-    private boolean mEmailCacheInvalidated = false;
-
-    private ContactInfoCache(Context context) {
-        mContext = context;
-
-        ContentResolver resolver = context.getContentResolver();
-        resolver.registerContentObserver(Contacts.Phones.CONTENT_URI, true,
-                new ContentObserver(new Handler()) {
-                    @Override
-                    public void onChange(boolean selfUpdate) {
-                        synchronized (mCacheRebuildLock) {
-                            mPhoneCacheInvalidated = true;
-                            startCacheRebuilder();
-                        }
-                    }
-                });
-        resolver.registerContentObserver(Contacts.ContactMethods.CONTENT_EMAIL_URI, true,
-                new ContentObserver(new Handler()) {
-                    @Override
-                    public void onChange(boolean selfUpdate) {
-                        synchronized (mCacheRebuildLock) {
-                            mEmailCacheInvalidated = true;
-                            startCacheRebuilder();
-                        }
-                    }
-                });
-    }
-
-    /**
-     * Initialize the global instance. Should call only once.
-     */
-    public static void init(Context context) {
-        sInstance = new ContactInfoCache(context);
-    }
-
-    /**
-     * Get the global instance.
-     */
-    public static ContactInfoCache getInstance() {
-        return sInstance;
-    }
-
-    /**
-     * A cached version of CallerInfo.getCallerInfo().
-     */
-    public CallerInfo getCallerInfo(Context context, String number) {
-        // TODO: numbers like "6501234567" and "+16501234567" are equivalent.
-        // we should convert them into a uniform format so that we don't cache
-        // them twice.
-        number = Recipient.filterPhoneNumber(number);
-        synchronized (mCache) {
-            if (mCache.containsKey(number)) {
-                return mCache.get(number);
-            } else {
-                CallerInfo ci = CallerInfo.getCallerInfo(context, number);
-                mCache.put(number, ci);
-                return ci;
-            }
-        }
-    }
-
-    /**
-     * Get the display names of contacts. Contacts can be either email address or
-     * phone number.
-     *
-     * @param context the context to use
-     * @param address the addresses to lookup, separated by ";"
-     * @return a nicely formatted version of the contact names to display
-     */
-    public String getContactName(Context context, String address) {
-        if (TextUtils.isEmpty(address)) {
-            return "";
-        }
-
-        StringBuilder result = new StringBuilder();
-        for (String value : address.split(SEPARATOR)) {
-            if (value.length() > 0) {
-                result.append(SEPARATOR);
-                if (MessageUtils.isLocalNumber(value)) {
-                    result.append(context.getString(com.android.internal.R.string.me));
-                } else if (Mms.isEmailAddress(value)) {
-                    result.append(getDisplayName(context, value));
-                } else {
-                    result.append(getCallerId(context, value));
-                }
-            }
-        }
-
-        if (result.length() > 0) {
-            // Skip the first ";"
-            return result.substring(1);
-        }
-
-        return "";
-    }
-
-    /**
-     * Get the display name of an email address. If the address already contains
-     * the name, parse and return it. Otherwise, query the contact database. Cache
-     * query results for repeated queries.
-     */
-    public String getDisplayName(Context context, String email) {
-        Matcher match = Mms.NAME_ADDR_EMAIL_PATTERN.matcher(email);
-        if (match.matches()) {
-            // email has display name
-            return getEmailDisplayName(match.group(1));
-        }
-
-        CallerInfo ci;
-        synchronized (mCache) {
-            if (mCache.containsKey(email)) {
-                ci = mCache.get(email);
-            } else {
-                ci = new CallerInfo();
-                ci.name = queryEmailDisplayName(context, email);
-                mCache.put(email, ci);
-            }
-        }
-
-        if (ci.name != null) {
-            return ci.name;
-        }
-
-        return email;
-    }
-
-    /**
-     * A cached version of CallerInfo.getCallerId().
-     */
-    private String getCallerId(Context context, String number) {
-        CallerInfo info = getCallerInfo(context, number);
-        if (!TextUtils.isEmpty(info.name)) {
-            return info.name;
-        }
-        return number;
-    }
-
-    private static String getEmailDisplayName(String displayString) {
-        Matcher match = Mms.QUOTED_STRING_PATTERN.matcher(displayString);
-        if (match.matches()) {
-            return match.group(1);
-        }
-
-        return displayString;
-    }
-
-    /**
-     * Query the contact email table to get the name of an email address.
-     */
-    private static String queryEmailDisplayName(Context context, String email) {
-        Cursor cursor = SqliteWrapper.query(context, context.getContentResolver(),
-                Contacts.ContactMethods.CONTENT_EMAIL_URI,
-                new String[] { Contacts.ContactMethods.NAME },
-                Contacts.ContactMethods.DATA + " = \'" + email + "\'",
-                null, null);
-
-        if (cursor != null) {
-            try {
-                int columnIndex = cursor.getColumnIndexOrThrow(
-                        Contacts.ContactMethods.NAME);
-                while (cursor.moveToNext()) {
-                    String name = cursor.getString(columnIndex);
-                    if (!TextUtils.isEmpty(name)) {
-                        return name;
-                    }
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-
-        return null;
-    }
-
-    /**
-     * Start the background cache rebuilding thread if there is not one yet.
-     */
-    private void startCacheRebuilder() {
-        if (mCacheRebuilder == null) {
-            mCacheRebuilder = new Thread(new Runnable() {
-                    public void run() {
-                        rebuildCache();
-                    }
-            });
-            mCacheRebuilder.start();
-        }
-    }
-
-    /**
-     * Get the list of phone/email candidates for the cache rebuilding. This is
-     * a snapshot of the keys in the cache.
-     */
-    private void getRebuildList(List<String> phones, List<String> emails) {
-        synchronized (mCache) {
-            for (String name : mCache.keySet()) {
-                if (Mms.isEmailAddress(name)) {
-                    if (emails != null) {
-                        emails.add(name);
-                    }
-                } else {
-                    if (phones != null) {
-                        phones.add(name);
-                    }
-                }
-            }
-        } 
-    }
-
-    /**
-     * The actual work of rebuilding the cache, i.e. syncing our cache with
-     * the contacts database.
-     */
-    private void rebuildCache() {
-        List<String> phones;
-        List<String> emails;
-
-        for (;;) {
-
-            // simulate the Nagle's algorithm:
-            // delay for a while to prevent from getting too busy, when, say,
-            // there is a big contacts sync going on
-            try {
-                Thread.sleep(REBUILD_DELAY);
-            } catch (InterruptedException ie) {
-            }
-
-            phones = null;
-            emails = null;
-            synchronized (mCacheRebuildLock) {
-                // if nothing changed during our sync, stop this thread
-                // otherwise, just keep working on it.
-                if (!(mPhoneCacheInvalidated || mEmailCacheInvalidated)) {
-                    mCacheRebuilder = null;
-                    return;
-                }
-                if (mPhoneCacheInvalidated) {
-                    phones = new ArrayList<String>();
-                    mPhoneCacheInvalidated = false;
-                }
-                if (mEmailCacheInvalidated) {
-                    emails = new ArrayList<String>();
-                    mEmailCacheInvalidated = false;
-                }
-            }
-            // retrieve the list of phone/email candidates for syncing
-            // which is a snapshot of the keys in the cache
-            getRebuildList(phones, emails);
-            // now sync
-            if (phones != null) {
-                for (String phone : phones) {
-                    synchronized (mCache) {
-                        CallerInfo ci = CallerInfo.getCallerInfo(mContext, phone);
-                        mCache.put(phone, ci);
-                    }
-                }
-            }
-            if (emails != null) {
-                for (String email : emails) {
-                    synchronized (mCache) {
-                        CallerInfo ci = new CallerInfo();
-                        ci.name = queryEmailDisplayName(mContext, email);
-                        mCache.put(email, ci);
-                    }
-                }
-            }
-        }
-    }
-}
diff --git a/src/com/android/mms/util/DownloadManager.java b/src/com/android/mms/util/DownloadManager.java
deleted file mode 100644
index 9a7b3d3..0000000
--- a/src/com/android/mms/util/DownloadManager.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.util;
-
-import com.android.internal.telephony.TelephonyIntents;
-import com.android.internal.telephony.TelephonyProperties;
-import com.android.mms.R;
-import com.android.mms.ui.MessagingPreferenceActivity;
-import com.google.android.mms.MmsException;
-import com.google.android.mms.pdu.EncodedStringValue;
-import com.google.android.mms.pdu.NotificationInd;
-import com.google.android.mms.pdu.PduPersister;
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.BroadcastReceiver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
-import android.database.Cursor;
-import android.net.Uri;
-import android.os.Handler;
-import android.os.SystemProperties;
-import android.preference.PreferenceManager;
-import android.provider.Telephony.Mms;
-import android.telephony.ServiceState;
-import android.util.Config;
-import android.util.Log;
-import android.widget.Toast;
-
-public class DownloadManager {
-    private static final String TAG = "DownloadManager";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private static final int DEFERRED_MASK           = 0x04;
-
-    public static final int STATE_UNSTARTED         = 0x80;
-    public static final int STATE_DOWNLOADING       = 0x81;
-    public static final int STATE_TRANSIENT_FAILURE = 0x82;
-    public static final int STATE_PERMANENT_FAILURE = 0x87;
-
-    private final Context mContext;
-    private final Handler mHandler;
-    private final SharedPreferences mPreferences;
-    private boolean mAutoDownload;
-
-    private final OnSharedPreferenceChangeListener mPreferencesChangeListener =
-        new OnSharedPreferenceChangeListener() {
-        public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
-            if (MessagingPreferenceActivity.AUTO_RETRIEVAL.equals(key)
-                    || MessagingPreferenceActivity.RETRIEVAL_DURING_ROAMING.equals(key)) {
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "Preferences updated.");
-                }
-
-                synchronized (sInstance) {
-                    mAutoDownload = getAutoDownloadState(prefs);
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, "mAutoDownload ------> " + mAutoDownload);
-                    }
-                }
-            }
-        }
-    };
-
-    private final BroadcastReceiver mRoamingStateListener =
-        new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            if (TelephonyIntents.ACTION_SERVICE_STATE_CHANGED.equals(intent.getAction())) {
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "Service state changed: " + intent.getExtras());
-                }
-
-                ServiceState state = ServiceState.newFromBundle(intent.getExtras());
-                boolean isRoaming = state.getRoaming();
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "roaming ------> " + isRoaming);
-                }
-                synchronized (sInstance) {
-                    mAutoDownload = getAutoDownloadState(mPreferences, isRoaming);
-                    if (LOCAL_LOGV) {
-                        Log.v(TAG, "mAutoDownload ------> " + mAutoDownload);
-                    }
-                }
-            }
-        }
-    };
-
-    private static DownloadManager sInstance;
-
-    private DownloadManager(Context context) {
-        mContext = context;
-        mHandler = new Handler();
-        mPreferences = PreferenceManager.getDefaultSharedPreferences(context);
-        mPreferences.registerOnSharedPreferenceChangeListener(mPreferencesChangeListener);
-
-        context.registerReceiver(
-                mRoamingStateListener,
-                new IntentFilter(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED));
-
-        mAutoDownload = getAutoDownloadState(mPreferences);
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "mAutoDownload ------> " + mAutoDownload);
-        }
-    }
-
-    public boolean isAuto() {
-        return mAutoDownload;
-    }
-
-    public static void init(Context context) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "DownloadManager.init()");
-        }
-
-        if (sInstance != null) {
-            Log.w(TAG, "Already initialized.");
-        }
-        sInstance = new DownloadManager(context);
-    }
-
-    public static DownloadManager getInstance() {
-        if (sInstance == null) {
-            throw new IllegalStateException("Uninitialized.");
-        }
-        return sInstance;
-    }
-
-    static boolean getAutoDownloadState(SharedPreferences prefs) {
-        return getAutoDownloadState(prefs, isRoaming());
-    }
-
-    static boolean getAutoDownloadState(SharedPreferences prefs, boolean roaming) {
-        boolean autoDownload = prefs.getBoolean(
-                MessagingPreferenceActivity.AUTO_RETRIEVAL, true);
-
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "auto download without roaming -> " + autoDownload);
-        }
-
-        if (autoDownload) {
-            boolean alwaysAuto = prefs.getBoolean(
-                    MessagingPreferenceActivity.RETRIEVAL_DURING_ROAMING, false);
-
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "auto download during roaming -> " + alwaysAuto);
-            }
-
-            if (!roaming || alwaysAuto) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    static boolean isRoaming() {
-        String roaming = SystemProperties.get(
-                TelephonyProperties.PROPERTY_OPERATOR_ISROAMING, null);
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "roaming ------> " + roaming);
-        }
-        return "true".equals(roaming);
-    }
-
-    public void markState(final Uri uri, int state) {
-        // Notify user if downloading permanently failed.
-        if (state == STATE_PERMANENT_FAILURE) {
-            mHandler.post(new Runnable() {
-                public void run() {
-                    try {
-                        Toast.makeText(mContext, getMessage(uri),
-                                Toast.LENGTH_LONG).show();
-                    } catch (MmsException e) {
-                        Log.e(TAG, e.getMessage(), e);
-                    }
-                }
-            });
-        } else if (!mAutoDownload) {
-            state |= DEFERRED_MASK;
-        }
-
-        // Use the STATUS field to store the state of downloading process
-        // because it's useless for M-Notification.ind.
-        ContentValues values = new ContentValues(1);
-        values.put(Mms.STATUS, state);
-        SqliteWrapper.update(mContext, mContext.getContentResolver(),
-                    uri, values, null, null);
-    }
-
-    private String getMessage(Uri uri) throws MmsException {
-        NotificationInd ind = (NotificationInd) PduPersister
-                .getPduPersister(mContext).load(uri);
-
-        EncodedStringValue v = ind.getSubject();
-        String subject = (v != null) ? v.getString()
-                : mContext.getString(R.string.no_subject);
-
-        v = ind.getFrom();
-        String from = (v != null)
-                ? ContactInfoCache.getInstance().getContactName(mContext, v.getString())
-                : mContext.getString(R.string.unknown_sender);
-
-        return mContext.getString(R.string.dl_failure_notification, subject, from);
-    }
-
-    public int getState(Uri uri) {
-        Cursor cursor = SqliteWrapper.query(mContext, mContext.getContentResolver(),
-                            uri, new String[] {Mms.STATUS}, null, null, null);
-
-        if (cursor != null) {
-            try {
-                if (cursor.moveToFirst()) {
-                    return cursor.getInt(0) &~ DEFERRED_MASK;
-                }
-            } finally {
-                cursor.close();
-            }
-        }
-        return STATE_UNSTARTED;
-    }
-}
diff --git a/src/com/android/mms/util/RateController.java b/src/com/android/mms/util/RateController.java
deleted file mode 100644
index 48502d3..0000000
--- a/src/com/android/mms/util/RateController.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.util;
-
-import com.google.android.mms.util.SqliteWrapper;
-
-import android.content.BroadcastReceiver;
-import android.content.ContentValues;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.database.Cursor;
-import android.provider.Telephony.Mms.Rate;
-import android.util.Config;
-import android.util.Log;
-
-public class RateController {
-    private static final String TAG = "RateController";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-
-    private static final int RATE_LIMIT = 100;
-    private static final long ONE_HOUR = 1000 * 60 * 60;
-
-    private static final int NO_ANSWER  = 0;
-    private static final int ANSWER_YES = 1;
-    private static final int ANSWER_NO  = 2;
-
-    public static final int ANSWER_TIMEOUT = 20000;
-    public static final String RATE_LIMIT_SURPASSED_ACTION =
-        "com.android.mms.RATE_LIMIT_SURPASSED";
-    public static final String RATE_LIMIT_CONFIRMED_ACTION =
-        "com.android.mms.RATE_LIMIT_CONFIRMED";
-
-    private static RateController sInstance;
-    private static boolean sMutexLock;
-
-    private final Context mContext;
-    private int mAnswer;
-
-    private final BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
-        @Override
-        public void onReceive(Context context, Intent intent) {
-            if (LOCAL_LOGV) {
-                Log.v(TAG, "Intent received: " + intent);
-            }
-
-            if (RATE_LIMIT_CONFIRMED_ACTION.equals(intent.getAction())) {
-                synchronized (this) {
-                    mAnswer = intent.getBooleanExtra("answer", false)
-                                            ? ANSWER_YES : ANSWER_NO;
-                    notifyAll();
-                }
-            }
-        }
-    };
-
-    private RateController(Context context) {
-        mContext = context;
-    }
-
-    public static void init(Context context) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "RateController.init()");
-        }
-
-        if (sInstance != null) {
-            Log.w(TAG, "Already initialized.");
-        }
-        sInstance = new RateController(context);
-    }
-
-    public static RateController getInstance() {
-        if (sInstance == null) {
-            throw new IllegalStateException("Uninitialized.");
-        }
-        return sInstance;
-    }
-
-    public final void update() {
-        ContentValues values = new ContentValues(1);
-        values.put(Rate.SENT_TIME, System.currentTimeMillis());
-        SqliteWrapper.insert(mContext, mContext.getContentResolver(),
-                             Rate.CONTENT_URI, values);
-    }
-
-    public final boolean isLimitSurpassed() {
-        long oneHourAgo = System.currentTimeMillis() - ONE_HOUR;
-        Cursor c = SqliteWrapper.query(mContext, mContext.getContentResolver(),
-                Rate.CONTENT_URI, new String[] { "COUNT(*) AS rate" },
-                Rate.SENT_TIME + ">" + oneHourAgo, null, null);
-        if (c != null) {
-            try {
-                if (c.moveToFirst()) {
-                    return c.getInt(0) >= RATE_LIMIT;
-                }
-            } finally {
-                c.close();
-            }
-        }
-        return false;
-    }
-
-    synchronized public boolean isAllowedByUser() {
-        while (sMutexLock) {
-            try {
-                wait();
-            } catch (InterruptedException _) {
-                 // Ignore it.
-            }
-        }
-        sMutexLock = true;
-
-        mContext.registerReceiver(mBroadcastReceiver,
-                new IntentFilter(RATE_LIMIT_CONFIRMED_ACTION));
-
-        mAnswer = NO_ANSWER;
-        try {
-            Intent intent = new Intent(RATE_LIMIT_SURPASSED_ACTION);
-            // Using NEW_TASK here is necessary because we're calling
-            // startActivity from outside an activity.
-            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-            mContext.startActivity(intent);
-            return waitForAnswer() == ANSWER_YES;
-        } finally {
-            mContext.unregisterReceiver(mBroadcastReceiver);
-            sMutexLock = false;
-            notifyAll();
-        }
-    }
-
-    synchronized private int waitForAnswer() {
-        for (int t = 0; (mAnswer == NO_ANSWER) && (t < ANSWER_TIMEOUT); t += 1000) {
-            try {
-                if (LOCAL_LOGV) {
-                    Log.v(TAG, "Waiting for answer..." + t / 1000);
-                }
-                wait(1000L);
-            } catch (InterruptedException _) {
-                 // Ignore it.
-            }
-        }
-        return mAnswer;
-    }
-}
diff --git a/src/com/android/mms/util/SendingProgressTokenManager.java b/src/com/android/mms/util/SendingProgressTokenManager.java
deleted file mode 100644
index 20824c0..0000000
--- a/src/com/android/mms/util/SendingProgressTokenManager.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2008 Esmertec AG.
- * Copyright (C) 2008 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.
- */
-
-package com.android.mms.util;
-
-import android.util.Config;
-import android.util.Log;
-
-import java.util.HashMap;
-
-public class SendingProgressTokenManager {
-    private static final String TAG = "SendingProgressTokenManager";
-    private static final boolean DEBUG = false;
-    private static final boolean LOCAL_LOGV = DEBUG ? Config.LOGD : Config.LOGV;
-    private static final HashMap<Object, Long> TOKEN_POOL;
-
-    public static final long NO_TOKEN = -1L;
-
-    static {
-        TOKEN_POOL = new HashMap<Object, Long>();
-    }
-
-    synchronized public static long get(Object key) {
-        Long token = TOKEN_POOL.get(key);
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "TokenManager.get(" + key + ") -> " + token);
-        }
-        return token != null ? token : NO_TOKEN;
-    }
-
-    synchronized public static void put(Object key, long token) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "TokenManager.put(" + key + ", " + token + ")");
-        }
-        TOKEN_POOL.put(key, token);
-    }
-
-    synchronized public static void remove(Object key) {
-        if (LOCAL_LOGV) {
-            Log.v(TAG, "TokenManager.remove(" + key + ")");
-        }
-        TOKEN_POOL.remove(key);
-    }
-}
diff --git a/src/com/android/mms/util/SmileyParser.java b/src/com/android/mms/util/SmileyParser.java
deleted file mode 100644
index bb86027..0000000
--- a/src/com/android/mms/util/SmileyParser.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * 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.
- */
-
-package com.android.mms.util;
-
-import android.content.Context;
-import android.text.Spannable;
-import android.text.SpannableStringBuilder;
-import android.text.style.ImageSpan;
-
-import com.android.mms.R;
-
-import java.util.HashMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * A class for annotating a CharSequence with spans to convert textual emoticons
- * to graphical ones.
- */
-public class SmileyParser {
-    // Singleton stuff
-    private static SmileyParser sInstance;
-    public static SmileyParser getInstance() { return sInstance; }
-    public static void init(Context context) {
-        sInstance = new SmileyParser(context);
-    }
-    
-    private final Context mContext;
-    private final String[] mSmileyTexts;
-    private final Pattern mPattern;
-    private final HashMap<String, Integer> mSmileyToRes;
- 
-    private SmileyParser(Context context) {
-        mContext = context;
-        mSmileyTexts = mContext.getResources().getStringArray(DEFAULT_SMILEY_TEXTS);
-        mSmileyToRes = buildSmileyToRes();
-        mPattern = buildPattern();
-    }
-    
-    // NOTE: if you change anything about this array, you must make the corresponding change
-    // to the string arrays: default_smiley_texts and default_smiley_names in res/values/arrays.xml
-    public static final int[] DEFAULT_SMILEY_RES_IDS = {
-        android.R.drawable.emo_im_happy,                //  0
-        android.R.drawable.emo_im_sad,                  //  1
-        android.R.drawable.emo_im_winking,              //  2
-        android.R.drawable.emo_im_tongue_sticking_out,  //  3
-        android.R.drawable.emo_im_surprised,            //  4
-        android.R.drawable.emo_im_kissing,              //  5
-        android.R.drawable.emo_im_yelling,              //  6
-        android.R.drawable.emo_im_cool,                 //  7
-        android.R.drawable.emo_im_money_mouth,          //  8
-        android.R.drawable.emo_im_foot_in_mouth,        //  9
-        android.R.drawable.emo_im_embarrassed,          //  10
-        android.R.drawable.emo_im_angel,                //  11
-        android.R.drawable.emo_im_undecided,            //  12
-        android.R.drawable.emo_im_crying,               //  13
-        android.R.drawable.emo_im_lips_are_sealed,      //  14
-        android.R.drawable.emo_im_laughing,             //  15
-        android.R.drawable.emo_im_wtf                   //  16
-    };
-    
-    public static final int DEFAULT_SMILEY_TEXTS = R.array.default_smiley_texts;
-    public static final int DEFAULT_SMILEY_NAMES = R.array.default_smiley_names;
-
-    /**
-     * Builds the hashtable we use for mapping the string version
-     * of a smiley (e.g. ":-)") to a resource ID for the icon version.
-     */
-    private HashMap<String, Integer> buildSmileyToRes() {
-        if (DEFAULT_SMILEY_RES_IDS.length != mSmileyTexts.length) {
-            // Throw an exception if someone updated DEFAULT_SMILEY_RES_IDS
-            // and failed to update arrays.xml
-            throw new IllegalStateException("Smiley resource ID/text mismatch");
-        }
-
-        HashMap<String, Integer> smileyToRes =
-                            new HashMap<String, Integer>(mSmileyTexts.length);
-        for (int i = 0; i < mSmileyTexts.length; i++) {
-            smileyToRes.put(mSmileyTexts[i], DEFAULT_SMILEY_RES_IDS[i]);
-        }
-        
-        return smileyToRes;
-    }
-    
-    /**
-     * Builds the regular expression we use to find smileys in {@link #addSmileySpans}.
-     */
-    private Pattern buildPattern() {
-        // Set the StringBuilder capacity with the assumption that the average
-        // smiley is 3 characters long.
-        StringBuilder patternString = new StringBuilder(mSmileyTexts.length * 3);
-
-        // Build a regex that looks like (:-)|:-(|...), but escaping the smilies
-        // properly so they will be interpreted literally by the regex matcher.
-        patternString.append('(');
-        for (String s : mSmileyTexts) {
-            patternString.append(Pattern.quote(s));
-            patternString.append('|');
-        }
-        // Replace the extra '|' with a ')'
-        patternString.replace(patternString.length() - 1, patternString.length(), ")");
-        
-        return Pattern.compile(patternString.toString());
-    }
-
-
-    /**
-     * Adds ImageSpans to a CharSequence that replace textual emoticons such
-     * as :-) with a graphical version.
-     * 
-     * @param text A CharSequence possibly containing emoticons
-     * @return A CharSequence annotated with ImageSpans covering any
-     *         recognized emoticons.
-     */
-    public CharSequence addSmileySpans(CharSequence text) {
-        SpannableStringBuilder builder = new SpannableStringBuilder(text);
-
-        Matcher matcher = mPattern.matcher(text);
-        while (matcher.find()) {
-            int resId = mSmileyToRes.get(matcher.group());
-            builder.setSpan(new ImageSpan(mContext, resId),
-                            matcher.start(), matcher.end(),
-                            Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
-        }
-
-        return builder;
-    }
-}
-
-
diff --git a/src/org/w3c/dom/events/DocumentEvent.java b/src/org/w3c/dom/events/DocumentEvent.java
deleted file mode 100644
index 3c294de..0000000
--- a/src/org/w3c/dom/events/DocumentEvent.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2007 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] in the hope that
- * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- *
- * Difference to the original copy of this file:
- *   1) REMOVE public boolean canDispatch(String namespaceURI,
- *                             String type);
- */
-
-package org.w3c.dom.events;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  The <code>DocumentEvent</code> interface provides a mechanism by which the
- * user can create an <code>Event</code> object of a type supported by the
- * implementation. If the feature "Events" is supported by the
- * <code>Document</code> object, the <code>DocumentEvent</code> interface
- * must be implemented on the same object. If the feature "+Events" is
- * supported by the <code>Document</code> object, an object that supports
- * the <code>DocumentEvent</code> interface must be returned by invoking the
- * method <code>Node.getFeature("+Events", "3.0")</code> on the
- * <code>Document</code> object.
- * <p>See also the <a href='http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071207'>
-   Document Object Model (DOM) Level 3 Events Specification
-  </a>.
- * @since DOM Level 2
- */
-public interface DocumentEvent {
-    /**
-     *  Creates an event object of the type specified.
-     * @param eventType  The <code>eventType</code> parameter specifies the
-     *   name of the DOM Events interface to be supported by the created
-     *   event object, e.g. <code>"Event"</code>, <code>"MouseEvent"</code>,
-     *   <code>"MutationEvent"</code> and so on. If the <code>Event</code>
-     *   is to be dispatched via the <code>EventTarget.dispatchEvent()</code>
-     *    method the appropriate event initialization method must be called
-     *   after creation in order to initialize the <code>Event</code>'s
-     *   values.  As an example, a user wishing to synthesize some kind of
-     *   <code>UIEvent</code> would invoke
-     *   <code>DocumentEvent.createEvent("UIEvent")</code>. The
-     *   <code>UIEvent.initUIEventNS()</code> method could then be called on
-     *   the newly created <code>UIEvent</code> object to set the specific
-     *   type of user interface event to be dispatched, DOMActivate for
-     *   example, and set its context information, e.g.
-     *   <code>UIEvent.detail</code> in this example.  For backward
-     *   compatibility reason, "UIEvents", "MouseEvents", "MutationEvents",
-     *   and "HTMLEvents" feature names are valid values for the parameter
-     *   <code>eventType</code> and represent respectively the interfaces
-     *   "UIEvent", "MouseEvent", "MutationEvent", and "Event", and the
-     *   characters 'a'..'z' are considered equivalent to the characters
-     *   'A'..'Z'.
-     * @return  The newly created event object.
-     * @exception DOMException
-     *    NOT_SUPPORTED_ERR: Raised if the implementation does not support the
-     *   <code>Event</code> interface requested.
-     */
-    public Event createEvent(String eventType)
-                             throws DOMException;
-
-}
diff --git a/src/org/w3c/dom/events/Event.java b/src/org/w3c/dom/events/Event.java
deleted file mode 100644
index ca02198..0000000
--- a/src/org/w3c/dom/events/Event.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 2007 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] in the hope that
- * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- *
- * Difference to the original copy of this file:
- *   1) REMOVE public String getNamespaceURI();
- *   2) REMOVE public void stopImmediatePropagation();
- *   3) REMOVE public boolean getDefaultPrevented();
- *   4) REMOVE public void initEventNS(String namespaceURIArg,
- *                          String eventTypeArg,
- *                          boolean canBubbleArg,
- *                          boolean cancelableArg);
- *   5) ADD    public void initEvent(String eventTypeArg,
- *                          boolean canBubbleArg,
- *                          boolean cancelableArg,
- *                          int seekTo);
- *
- *   6) ADD    public int getSeekTo();
- */
-
-package org.w3c.dom.events;
-
-/**
- *  The <code>Event</code> interface is used to provide contextual information
- * about an event to the listener processing the event. An object which
- * implements the <code>Event</code> interface is passed as the parameter to
- * an <code>EventListener</code>. The object passed to the event listener
- * may also implement derived interfaces that provide access to information
- * directly relating to the type of event they represent.
- * <p> To create an instance of the <code>Event</code> interface, use the
- * <code>DocumentEvent.createEvent("Event")</code> method call.
- * <p>See also the <a href='http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071207'>
-   Document Object Model (DOM) Level 3 Events Specification
-  </a>.
- * @since DOM Level 2
- */
-public interface Event {
-    // PhaseType
-    /**
-     *  The current event phase is the capture phase.
-     */
-    public static final short CAPTURING_PHASE           = 1;
-    /**
-     *  The current event is in the target phase, i.e. it is being evaluated
-     * at the event target.
-     */
-    public static final short AT_TARGET                 = 2;
-    /**
-     *  The current event phase is the bubbling phase.
-     */
-    public static final short BUBBLING_PHASE            = 3;
-
-    /**
-     *  The local name of the event type. The name must be an <a href='http://www.w3.org/TR/2004/REC-xml-names11-20040204/#NT-NCName'>NCName</a> as defined in [<a href='http://www.w3.org/TR/2006/REC-xml-names11-20060816'>XML Namespaces 1.1</a>]
-     *  and is case-sensitive.
-     */
-    public String getType();
-
-    /**
-     *  Used to indicate the event target. This attribute contains the target
-     * node when used with the .
-     */
-    public EventTarget getTarget();
-
-    /**
-     *  Used to indicate the <code>EventTarget</code> whose
-     * <code>EventListeners</code> are currently being processed. This is
-     * particularly useful during the capture and bubbling phases. This
-     * attribute could contain the target node or a target ancestor when
-     * used with the .
-     */
-    public EventTarget getCurrentTarget();
-
-    /**
-     *  Used to indicate which phase of event flow is currently being
-     * accomplished.
-     */
-    public short getEventPhase();
-
-    /**
-     *  Used to indicate whether or not an event is a bubbling event. If the
-     * event can bubble the value is <code>true</code>, otherwise the value
-     * is <code>false</code>.
-     */
-    public boolean getBubbles();
-
-    /**
-     *  Used to indicate whether or not an event can have its default action
-     * prevented (see also ). If the default action can be prevented the
-     * value is <code>true</code>, otherwise the value is <code>false</code>
-     * .
-     */
-    public boolean getCancelable();
-
-    /**
-     *  Used to specify the time at which the event was created in
-     * milliseconds relative to 1970-01-01T00:00:00Z. Due to the fact that
-     * some systems may not provide this information the value of
-     * <code>timeStamp</code> may be not available for all events. When not
-     * available, the value is <code>0</code>.
-     */
-    public long getTimeStamp();
-
-    /**
-     *  Prevents other event listeners from being triggered but its effect is
-     * deferred until all event listeners attached on the
-     * <code>Event.currentTarget</code> have been triggered  . Once it has
-     * been called, further calls to this method have no additional effect.
-     * <p ><b>Note:</b>  This method does not prevent the default action from
-     * being invoked; use <code>Event.preventDefault()</code> for that
-     * effect.
-     */
-    public void stopPropagation();
-
-    /**
-     *  Signifies that the event is to be canceled, meaning any default action
-     * normally taken by the implementation as a result of the event will
-     * not occur (see also ). Calling this method for a non-cancelable event
-     * has no effect.
-     * <p ><b>Note:</b>  This method does not stop the event propagation; use
-     * <code>Event.stopPropagation()</code> or
-     * <code>Event.stopImmediatePropagation()</code> for that effect.
-     */
-    public void preventDefault();
-
-    /**
-     *  Initializes attributes of an <code>Event</code> created through the
-     * <code>DocumentEvent.createEvent</code> method. This method may only
-     * be called before the <code>Event</code> has been dispatched via the
-     * <code>EventTarget.dispatchEvent()</code> method. If the method is
-     * called several times before invoking
-     * <code>EventTarget.dispatchEvent</code>, only the final invocation
-     * takes precedence. This method has no effect if called after the event
-     * has been dispatched. If called from a subclass of the
-     * <code>Event</code> interface only the values specified in this method
-     * are modified, all other attributes are left unchanged.
-     * <br> This method sets the <code>Event.type</code> attribute to
-     * <code>eventTypeArg</code>, and <code>Event.namespaceURI</code> to
-     * <code>null</code>. To initialize an event with a namespace URI, use
-     * the <code>Event.initEventNS()</code> method.
-     * @param eventTypeArg  Specifies <code>Event.type</code>, the local name
-     *   of the event type.
-     * @param canBubbleArg  Specifies <code>Event.bubbles</code>. This
-     *   parameter overrides the intrinsic bubbling behavior of the event.
-     * @param cancelableArg  Specifies <code>Event.cancelable</code>. This
-     *   parameter overrides the intrinsic cancelable behavior of the event.
-     *
-     */
-    public void initEvent(String eventTypeArg,
-                          boolean canBubbleArg,
-                          boolean cancelableArg);
-
-    /**
-     *  Initializes attributes of an <code>Event</code> created through the
-     * <code>DocumentEvent.createEvent</code> method. This method may only
-     * be called before the <code>Event</code> has been dispatched via the
-     * <code>EventTarget.dispatchEvent()</code> method. If the method is
-     * called several times before invoking
-     * <code>EventTarget.dispatchEvent</code>, only the final invocation
-     * takes precedence. This method has no effect if called after the event
-     * has been dispatched. If called from a subclass of the
-     * <code>Event</code> interface only the values specified in this method
-     * are modified, all other attributes are left unchanged.
-     * <br> This method sets the <code>Event.type</code> attribute to
-     * <code>eventTypeArg</code>, and <code>Event.namespaceURI</code> to
-     * <code>null</code>. To initialize an event with a namespace URI, use
-     * the <code>Event.initEventNS()</code> method.
-     * @param eventTypeArg  Specifies <code>Event.type</code>, the local name
-     *   of the event type.
-     * @param canBubbleArg  Specifies <code>Event.bubbles</code>. This
-     *   parameter overrides the intrinsic bubbling behavior of the event.
-     * @param cancelableArg  Specifies <code>Event.cancelable</code>. This
-     *   parameter overrides the intrinsic cancelable behavior of the event.
-     * @param seekTo  Specifies <code>Event.seekTo</code>. the int seekTo of event.
-     *
-     */
-    public void initEvent(String eventTypeArg,
-                          boolean canBubbleArg,
-                          boolean cancelableArg,
-                          int seekTo);
-
-    public int getSeekTo();
-}
diff --git a/src/org/w3c/dom/events/EventException.java b/src/org/w3c/dom/events/EventException.java
deleted file mode 100644
index e7e0cbb..0000000
--- a/src/org/w3c/dom/events/EventException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2007 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] in the hope that
- * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- *
- * Difference to the original copy of this file:
- *   1) ADD @SuppressWarnings("serial") for EventException;
- *   2) REMOVE public static final short DISPATCH_REQUEST_ERR      = 1;
- */
-
-package org.w3c.dom.events;
-
-/**
- *  Event operations may throw an <code>EventException</code> as specified in
- * their method descriptions.
- * <p>See also the <a href='http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071207'>
-   Document Object Model (DOM) Level 3 Events Specification
-  </a>.
- * @since DOM Level 2
- */
-@SuppressWarnings("serial")
-public class EventException extends RuntimeException {
-    public EventException(short code, String message) {
-       super(message);
-       this.code = code;
-    }
-    public short   code;
-    // EventExceptionCode
-    /**
-     *  If the <code>Event.type</code> was not specified by initializing the
-     * event before the method was called. Specification of the
-     * <code>Event.type</code> as <code>null</code> or an empty string will
-     * also trigger this exception.
-     */
-    public static final short UNSPECIFIED_EVENT_TYPE_ERR = 0;
-
-}
diff --git a/src/org/w3c/dom/events/EventListener.java b/src/org/w3c/dom/events/EventListener.java
deleted file mode 100644
index 1c48aa3..0000000
--- a/src/org/w3c/dom/events/EventListener.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2007 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] in the hope that
- * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- */
-
-package org.w3c.dom.events;
-
-/**
- *  The <code>EventListener</code> interface is the primary way for handling
- * events. Users implement the <code>EventListener</code> interface and
- * register their event listener on an <code>EventTarget</code>. The users
- * should also remove their <code>EventListener</code> from its
- * <code>EventTarget</code> after they have completed using the listener.
- * <p> Copying a <code>Node</code>, with methods such as
- * <code>Node.cloneNode</code> or <code>Range.cloneContents</code>, does not
- * copy the event listeners attached to it. Event listeners must be attached
- * to the newly created <code>Node</code> afterwards if so desired.
- * <p> Moving a <code>Node</code>, with methods <code>Document.adoptNode</code>
- * , <code>Node.appendChild</code>, or <code>Range.extractContents</code>,
- * does not affect the event listeners attached to it.
- * <p>See also the <a href='http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071207'>
-   Document Object Model (DOM) Level 3 Events Specification
-  </a>.
- * @since DOM Level 2
- */
-public interface EventListener {
-    /**
-     *  This method is called whenever an event occurs of the event type for
-     * which the <code>EventListener</code> interface was registered.
-     * @param evt  The <code>Event</code> contains contextual information
-     *   about the event.
-     */
-    public void handleEvent(Event evt);
-
-}
diff --git a/src/org/w3c/dom/events/EventTarget.java b/src/org/w3c/dom/events/EventTarget.java
deleted file mode 100644
index 5dc48b6..0000000
--- a/src/org/w3c/dom/events/EventTarget.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2007 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] in the hope that
- * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- *
- * Difference to the original copy of this file:
- *   1) REMOVE DOMException thrown by dispatchEvent(Event evt);
- *   2) REMOVE public void addEventListenerNS(String namespaceURI,
- *                                 String type,
- *                                 EventListener listener,
- *                                 boolean useCapture);
- *   3) REMOVE public void removeEventListenerNS(String namespaceURI,
- *                                    String type,
- *                                    EventListener listener,
- *                                    boolean useCapture);
- */
-
-package org.w3c.dom.events;
-
-/**
- *  The <code>EventTarget</code> interface is implemented by all the objects
- * which could be event targets in an implementation which supports an event
- * flow. The interface allows registration and removal of event listeners,
- * and dispatch of events to an event target.
- * <p> When used with the DOM event flow, this interface is implemented by all
- * target nodes and target ancestors, i.e. all DOM <code>Nodes</code> of the
- * tree support this interface when the implementation conforms to DOM Level
- * 3 Events and, therefore, this interface can be obtained by using
- * binding-specific casting methods on an instance of the <code>Node</code>
- * interface.
- * <p> Invoking <code>addEventListener</code> or
- * <code>addEventListenerNS</code> repeatedly on the same
- * <code>EventTarget</code> with the same values for the parameters
- * <code>namespaceURI</code>, <code>type</code>, <code>listener</code>, and
- * <code>useCapture</code> has no effect. Doing so does not cause the
- * <code>EventListener</code> to be called more than once and does not cause
- * a change in the triggering order.
- * <p>See also the <a href='http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071207'>
-   Document Object Model (DOM) Level 3 Events Specification
-  </a>.
- * @since DOM Level 2
- */
-public interface EventTarget {
-    /**
-     *  Registers an event listener, depending on the <code>useCapture</code>
-     * parameter, on the capture phase of the DOM event flow or its target
-     * and bubbling phases. Invoking this method is equivalent to invoking
-     * <code>addEventListenerNS</code> with the same values for the
-     * parameters <code>type</code>, <code>listener</code>, and
-     * <code>useCapture</code>, and the value <code>null</code> for the
-     * parameter <code>namespaceURI</code>.
-     * @param type  Specifies the <code>Event.type</code> associated with the
-     *   event for which the user is registering.
-     * @param listener  The <code>listener</code> parameter takes an object
-     *   implemented by the user which implements the
-     *   <code>EventListener</code> interface and contains the method to be
-     *   called when the event occurs.
-     * @param useCapture  If true, <code>useCapture</code> indicates that the
-     *   user wishes to add the event listener for the capture phase only,
-     *   i.e. this event listener will not be triggered during the target
-     *   and bubbling phases. If <code>false</code>, the event listener will
-     *   only be triggered during the target and bubbling phases.
-     */
-    public void addEventListener(String type,
-                                 EventListener listener,
-                                 boolean useCapture);
-
-    /**
-     *  Removes an event listener. Calling <code>removeEventListener</code>
-     * with arguments which do not identify any currently registered
-     * <code>EventListener</code> on the <code>EventTarget</code> has no
-     * effect. The <code>Event.namespaceURI</code> for which the user
-     * registered the event listener is implied and is <code>null</code>.
-     * @param type  Specifies the <code>Event.type</code> for which the user
-     *   registered the event listener.
-     * @param listener  The <code>EventListener</code> to be removed.
-     * @param useCapture  Specifies whether the <code>EventListener</code>
-     *   being removed was registered for the capture phase or not. If a
-     *   listener was registered twice, once for the capture phase and once
-     *   for the target and bubbling phases, each must be removed
-     *   separately. Removal of an event listener registered for the capture
-     *   phase does not affect the same event listener registered for the
-     *   target and bubbling phases, and vice versa.
-     */
-    public void removeEventListener(String type,
-                                    EventListener listener,
-                                    boolean useCapture);
-
-    /**
-     *  Dispatches an event into the implementation's event model. The event
-     * target of the event is the <code>EventTarget</code> object on which
-     * <code>dispatchEvent</code> is called.
-     * @param evt  The event to be dispatched.
-     * @return  Indicates whether any of the listeners which handled the
-     *   event called <code>Event.preventDefault()</code>. If
-     *   <code>Event.preventDefault()</code> was called the returned value
-     *   is <code>false</code>, else it is <code>true</code>.
-     * @exception EventException
-     *    UNSPECIFIED_EVENT_TYPE_ERR: Raised if the <code>Event.type</code>
-     *   was not specified by initializing the event before
-     *   <code>dispatchEvent</code> was called. Specification of the
-     *   <code>Event.type</code> as <code>null</code> or an empty string
-     *   will also trigger this exception.
-     *   <br> DISPATCH_REQUEST_ERR: Raised if the <code>Event</code> object is
-     *   already being dispatched.
-     * @exception DOMException
-     *    NOT_SUPPORTED_ERR: Raised if the <code>Event</code> object has not
-     *   been created using <code>DocumentEvent.createEvent()</code>.
-     *   <br> INVALID_CHARACTER_ERR: Raised if <code>Event.type</code> is not
-     *   an <a href='http://www.w3.org/TR/2004/REC-xml-names11-20040204/#NT-NCName'>NCName</a> as defined in [<a href='http://www.w3.org/TR/2006/REC-xml-names11-20060816'>XML Namespaces 1.1</a>]
-     *   .
-     * @version DOM Level 3
-     */
-    public boolean dispatchEvent(Event evt)
-                                 throws EventException;
-
-}
diff --git a/src/org/w3c/dom/events/MouseEvent.java b/src/org/w3c/dom/events/MouseEvent.java
deleted file mode 100644
index 8cfe0b1..0000000
--- a/src/org/w3c/dom/events/MouseEvent.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright (c) 2007 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] in the hope that
- * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- *
- * Difference to the original copy of this file:
- *   1) REMOVE public boolean getModifierState(String keyIdentifierArg);
- *   2) REMOVE public void initMouseEventNS(String namespaceURIArg,
- *                               String typeArg,
- *                               boolean canBubbleArg,
- *                               boolean cancelableArg,
- *                               AbstractView viewArg,
- *                               int detailArg,
- *                               int screenXArg,
- *                               int screenYArg,
- *                               int clientXArg,
- *                               int clientYArg,
- *                               short buttonArg,
- *                               EventTarget relatedTargetArg,
- *                               String modifiersListArg);
- */
-
-package org.w3c.dom.events;
-
-import org.w3c.dom.views.AbstractView;
-
-/**
- *  The <code>MouseEvent</code> interface provides specific contextual
- * information associated with Mouse events.
- * <p> In the case of nested elements mouse events are always targeted at the
- * most deeply nested element. Ancestors of the targeted element may use
- * bubbling to obtain notification of mouse events which occur within their
- * descendent elements.
- * <p> To create an instance of the <code>MouseEvent</code> interface, use the
- * <code>DocumentEvent.createEvent("MouseEvent")</code> method call.
- * <p ><b>Note:</b>  When initializing <code>MouseEvent</code> objects using
- * <code>initMouseEvent</code> or <code>initMouseEventNS</code>,
- * implementations should use the client coordinates <code>clientX</code>
- * and <code>clientY</code> for calculation of other coordinates (such as
- * target coordinates exposed by DOM Level 0 implementations).
- * <p>See also the <a href='http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071207'>
-   Document Object Model (DOM) Level 3 Events Specification
-  </a>.
- * @since DOM Level 2
- */
-public interface MouseEvent extends UIEvent {
-    /**
-     *  The horizontal coordinate at which the event occurred relative to the
-     * origin of the screen coordinate system.
-     */
-    public int getScreenX();
-
-    /**
-     *  The vertical coordinate at which the event occurred relative to the
-     * origin of the screen coordinate system.
-     */
-    public int getScreenY();
-
-    /**
-     *  The horizontal coordinate at which the event occurred relative to the
-     * viewport associated with the event.
-     */
-    public int getClientX();
-
-    /**
-     *  The vertical coordinate at which the event occurred relative to the
-     * viewport associated with the event.
-     */
-    public int getClientY();
-
-    /**
-     *  Refer to the <code>KeyboardEvent.ctrlKey</code> attribute.
-     */
-    public boolean getCtrlKey();
-
-    /**
-     *  Refer to the <code>KeyboardEvent.shiftKey</code> attribute.
-     */
-    public boolean getShiftKey();
-
-    /**
-     *  Refer to the <code>KeyboardEvent.altKey</code> attribute.
-     */
-    public boolean getAltKey();
-
-    /**
-     *  Refer to the <code>KeyboardEvent.metaKey</code> attribute.
-     */
-    public boolean getMetaKey();
-
-    /**
-     *  During mouse events caused by the depression or release of a mouse
-     * button, <code>button</code> is used to indicate which mouse button
-     * changed state. <code>0</code> indicates the normal button of the
-     * mouse (in general on the left or the one button on Macintosh mice,
-     * used to activate a button or select text). <code>2</code> indicates
-     * the contextual property (in general on the right, used to display a
-     * context menu) button of the mouse if present. <code>1</code>
-     * indicates the extra (in general in the middle and often combined with
-     * the mouse wheel) button. Some mice may provide or simulate more
-     * buttons, and values higher than <code>2</code> can be used to
-     * represent such buttons.
-     */
-    public short getButton();
-
-    /**
-     *  Used to identify a secondary <code>EventTarget</code> related to a UI
-     * event, depending on the type of event.
-     */
-    public EventTarget getRelatedTarget();
-
-    /**
-     *  Initializes attributes of a <code>MouseEvent</code> object. This
-     * method has the same behavior as <code>UIEvent.initUIEvent()</code>.
-     * @param typeArg  Refer to the <code>UIEvent.initUIEvent()</code> method
-     *   for a description of this parameter.
-     * @param canBubbleArg  Refer to the <code>UIEvent.initUIEvent()</code>
-     *   method for a description of this parameter.
-     * @param cancelableArg  Refer to the <code>UIEvent.initUIEvent()</code>
-     *   method for a description of this parameter.
-     * @param viewArg  Refer to the <code>UIEvent.initUIEvent()</code> method
-     *   for a description of this parameter.
-     * @param detailArg  Refer to the <code>UIEvent.initUIEvent()</code>
-     *   method for a description of this parameter.
-     * @param screenXArg  Specifies <code>MouseEvent.screenX</code>.
-     * @param screenYArg  Specifies <code>MouseEvent.screenY</code>.
-     * @param clientXArg  Specifies <code>MouseEvent.clientX</code>.
-     * @param clientYArg  Specifies <code>MouseEvent.clientY</code>.
-     * @param ctrlKeyArg  Specifies <code>MouseEvent.ctrlKey</code>.
-     * @param altKeyArg  Specifies <code>MouseEvent.altKey</code>.
-     * @param shiftKeyArg  Specifies <code>MouseEvent.shiftKey</code>.
-     * @param metaKeyArg  Specifies <code>MouseEvent.metaKey</code>.
-     * @param buttonArg  Specifies <code>MouseEvent.button</code>.
-     * @param relatedTargetArg  Specifies
-     *   <code>MouseEvent.relatedTarget</code>. This value may be
-     *   <code>null</code>.
-     */
-    public void initMouseEvent(String typeArg,
-                               boolean canBubbleArg,
-                               boolean cancelableArg,
-                               AbstractView viewArg,
-                               int detailArg,
-                               int screenXArg,
-                               int screenYArg,
-                               int clientXArg,
-                               int clientYArg,
-                               boolean ctrlKeyArg,
-                               boolean altKeyArg,
-                               boolean shiftKeyArg,
-                               boolean metaKeyArg,
-                               short buttonArg,
-                               EventTarget relatedTargetArg);
-
-}
diff --git a/src/org/w3c/dom/events/MutationEvent.java b/src/org/w3c/dom/events/MutationEvent.java
deleted file mode 100644
index 6e92e5b..0000000
--- a/src/org/w3c/dom/events/MutationEvent.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2007 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] in the hope that
- * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- *
- * Difference to the original copy of this file:
- *   1) REMOVE public void initMutationEventNS(String namespaceURIArg,
- *                                  String typeArg,
- *                                  boolean canBubbleArg,
- *                                  boolean cancelableArg,
- *                                  Node relatedNodeArg,
- *                                  String prevValueArg,
- *                                  String newValueArg,
- *                                  String attrNameArg,
- *                                  short attrChangeArg);
- */
-
-package org.w3c.dom.events;
-
-import org.w3c.dom.Node;
-
-/**
- *  The <code>MutationEvent</code> interface provides specific contextual
- * information associated with Mutation events.
- * <p> To create an instance of the <code>MutationEvent</code> interface, use
- * the <code>DocumentEvent.createEvent("MutationEvent")</code> method call.
- * <p>See also the <a href='http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071207'>
-   Document Object Model (DOM) Level 3 Events Specification
-  </a>.
- * @since DOM Level 2
- */
-public interface MutationEvent extends Event {
-    // attrChangeType
-    /**
-     *  The <code>Attr</code> was modified in place.
-     */
-    public static final short MODIFICATION              = 1;
-    /**
-     *  The <code>Attr</code> was just added.
-     */
-    public static final short ADDITION                  = 2;
-    /**
-     *  The <code>Attr</code> was just removed.
-     */
-    public static final short REMOVAL                   = 3;
-
-    /**
-     *  <code>relatedNode</code> is used to identify a secondary node related
-     * to a mutation event. For example, if a mutation event is dispatched
-     * to a node indicating that its parent has changed, the
-     * <code>relatedNode</code> is the changed parent. If an event is
-     * instead dispatched to a subtree indicating a node was changed within
-     * it, the <code>relatedNode</code> is the changed node. In the case of
-     * the DOMAttrModified event it indicates the <code>Attr</code> node
-     * which was modified, added, or removed.
-     */
-    public Node getRelatedNode();
-
-    /**
-     *  <code>prevValue</code> indicates the previous value of the
-     * <code>Attr</code> node in DOMAttrModified events, and of the
-     * <code>CharacterData</code> node in DOMCharacterDataModified events.
-     */
-    public String getPrevValue();
-
-    /**
-     *  <code>newValue</code> indicates the new value of the <code>Attr</code>
-     * node in DOMAttrModified events, and of the <code>CharacterData</code>
-     * node in DOMCharacterDataModified events.
-     */
-    public String getNewValue();
-
-    /**
-     *  <code>attrName</code> indicates the name of the changed
-     * <code>Attr</code> node in a DOMAttrModified event.
-     */
-    public String getAttrName();
-
-    /**
-     *  <code>attrChange</code> indicates the type of change which triggered
-     * the DOMAttrModified event. The values can be <code>MODIFICATION</code>
-     * , <code>ADDITION</code>, or <code>REMOVAL</code>.
-     */
-    public short getAttrChange();
-
-    /**
-     *  Initializes attributes of a <code>MutationEvent</code> object. This
-     * method has the same behavior as <code>Event.initEvent()</code>.
-     * @param typeArg  Refer to the <code>Event.initEvent()</code> method for
-     *   a description of this parameter.
-     * @param canBubbleArg  Refer to the <code>Event.initEvent()</code>
-     *   method for a description of this parameter.
-     * @param cancelableArg  Refer to the <code>Event.initEvent()</code>
-     *   method for a description of this parameter.
-     * @param relatedNodeArg  Specifies <code>MutationEvent.relatedNode</code>
-     *   .
-     * @param prevValueArg  Specifies <code>MutationEvent.prevValue</code>.
-     *   This value may be null.
-     * @param newValueArg  Specifies <code>MutationEvent.newValue</code>.
-     *   This value may be null.
-     * @param attrNameArg  Specifies <code>MutationEvent.attrName</code>.
-     *   This value may be null.
-     * @param attrChangeArg  Specifies <code>MutationEvent.attrChange</code>.
-     *   This value may be null.
-     */
-    public void initMutationEvent(String typeArg,
-                                  boolean canBubbleArg,
-                                  boolean cancelableArg,
-                                  Node relatedNodeArg,
-                                  String prevValueArg,
-                                  String newValueArg,
-                                  String attrNameArg,
-                                  short attrChangeArg);
-
-}
diff --git a/src/org/w3c/dom/events/UIEvent.java b/src/org/w3c/dom/events/UIEvent.java
deleted file mode 100644
index 73932a0..0000000
--- a/src/org/w3c/dom/events/UIEvent.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2007 World Wide Web Consortium,
- *
- * (Massachusetts Institute of Technology, European Research Consortium for
- * Informatics and Mathematics, Keio University). All Rights Reserved. This
- * work is distributed under the W3C(r) Software License [1] in the hope that
- * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
- *
- * Difference to the original copy of this file:
- *   1) public void initUIEventNS(String namespaceURIArg,
- *                            String typeArg,
- *                            boolean canBubbleArg,
- *                            boolean cancelableArg,
- *                            AbstractView viewArg,
- *                            int detailArg);
- */
-
-package org.w3c.dom.events;
-
-import org.w3c.dom.views.AbstractView;
-
-/**
- *  The <code>UIEvent</code> interface provides specific contextual
- * information associated with User Interface events.
- * <p> To create an instance of the <code>UIEvent</code> interface, use the
- * <code>DocumentEvent.createEvent("UIEvent")</code> method call.
- * <p>See also the <a href='http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071207'>
-   Document Object Model (DOM) Level 3 Events Specification
-  </a>.
- * @since DOM Level 2
- */
-public interface UIEvent extends Event {
-    /**
-     *  The <code>view</code> attribute identifies the
-     * <code>AbstractView</code> from which the event was generated.
-     */
-    public AbstractView getView();
-
-    /**
-     *  Specifies some detail information about the <code>Event</code>,
-     * depending on the type of event.
-     */
-    public int getDetail();
-
-    /**
-     *  Initializes attributes of an <code>UIEvent</code> object. This method
-     * has the same behavior as <code>Event.initEvent()</code>.
-     * @param typeArg  Refer to the <code>Event.initEvent()</code> method for
-     *   a description of this parameter.
-     * @param canBubbleArg  Refer to the <code>Event.initEvent()</code>
-     *   method for a description of this parameter.
-     * @param cancelableArg  Refer to the <code>Event.initEvent()</code>
-     *   method for a description of this parameter.
-     * @param viewArg  Specifies <code>UIEvent.view</code>. This value may be
-     *   <code>null</code>.
-     * @param detailArg  Specifies <code>UIEvent.detail</code>.
-     */
-    public void initUIEvent(String typeArg,
-                            boolean canBubbleArg,
-                            boolean cancelableArg,
-                            AbstractView viewArg,
-                            int detailArg);
-
-}
diff --git a/src/org/w3c/dom/smil/ElementExclusiveTimeContainer.java b/src/org/w3c/dom/smil/ElementExclusiveTimeContainer.java
deleted file mode 100644
index 84c7a14..0000000
--- a/src/org/w3c/dom/smil/ElementExclusiveTimeContainer.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.NodeList;
-
-/**
- *  This interface defines a time container with semantics based upon par, but 
- * with the additional constraint that only one child element may play at a 
- * time. 
- */
-public interface ElementExclusiveTimeContainer extends ElementTimeContainer {
-    /**
-     *  Controls the end of the container.  Need to address thr id-ref value. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getEndSync();
-    public void setEndSync(String endSync)
-                                     throws DOMException;
-
-    /**
-     *  This should support another method to get the ordered collection of 
-     * paused elements (the paused stack) at a given point in time. 
-     * @return  All paused elements at the current time. 
-     */
-    public NodeList getPausedElements();
-
-}
-
diff --git a/src/org/w3c/dom/smil/ElementLayout.java b/src/org/w3c/dom/smil/ElementLayout.java
deleted file mode 100644
index 7f3128f..0000000
--- a/src/org/w3c/dom/smil/ElementLayout.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  This interface is used by SMIL elements root-layout, top-layout and region.
- *  
- */
-public interface ElementLayout {
-    /**
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getTitle();
-    public void setTitle(String title)
-                                      throws DOMException;
-
-    /**
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getBackgroundColor();
-    public void setBackgroundColor(String backgroundColor)
-                                      throws DOMException;
-
-    /**
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public int getHeight();
-    public void setHeight(int height)
-                                      throws DOMException;
-
-    /**
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public int getWidth();
-    public void setWidth(int width)
-                                      throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/smil/ElementParallelTimeContainer.java b/src/org/w3c/dom/smil/ElementParallelTimeContainer.java
deleted file mode 100644
index a796bc7..0000000
--- a/src/org/w3c/dom/smil/ElementParallelTimeContainer.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  A <code>parallel</code> container defines a simple parallel time grouping 
- * in which multiple elements can play back at the same time.  It may have to 
- * specify a repeat iteration. (?) 
- */
-public interface ElementParallelTimeContainer extends ElementTimeContainer {
-    /**
-     *  Controls the end of the container.  Need to address thr id-ref value. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getEndSync();
-    public void setEndSync(String endSync)
-                                        throws DOMException;
-
-    /**
-     *  This method returns the implicit duration in seconds. 
-     * @return  The implicit duration in seconds or -1 if the implicit is 
-     *   unknown (indefinite?). 
-     */
-    public float getImplicitDuration();
-
-}
-
diff --git a/src/org/w3c/dom/smil/ElementSequentialTimeContainer.java b/src/org/w3c/dom/smil/ElementSequentialTimeContainer.java
deleted file mode 100644
index bca5841..0000000
--- a/src/org/w3c/dom/smil/ElementSequentialTimeContainer.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-/**
- *  A <code>seq</code> container defines a sequence of elements in which 
- * elements play one after the other. 
- */
-public interface ElementSequentialTimeContainer extends ElementTimeContainer {
-}
-
diff --git a/src/org/w3c/dom/smil/ElementSyncBehavior.java b/src/org/w3c/dom/smil/ElementSyncBehavior.java
deleted file mode 100644
index e75fecc..0000000
--- a/src/org/w3c/dom/smil/ElementSyncBehavior.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-/**
- *  The synchronization behavior extension. 
- */
-public interface ElementSyncBehavior {
-    /**
-     *  The runtime synchronization behavior for an element. 
-     */
-    public String getSyncBehavior();
-
-    /**
-     *  The sync tolerance for the associated element. It has an effect only if
-     *  the element has <code>syncBehavior="locked"</code> . 
-     */
-    public float getSyncTolerance();
-
-    /**
-     *  Defines the default value for the runtime synchronization behavior for 
-     * an element, and all descendents. 
-     */
-    public String getDefaultSyncBehavior();
-
-    /**
-     *  Defines the default value for the sync tolerance for an element, and 
-     * all descendents. 
-     */
-    public float getDefaultSyncTolerance();
-
-    /**
-     *  If set to true, forces the time container playback to sync to this 
-     * element.  
-     */
-    public boolean getSyncMaster();
-
-}
-
diff --git a/src/org/w3c/dom/smil/ElementTargetAttributes.java b/src/org/w3c/dom/smil/ElementTargetAttributes.java
deleted file mode 100644
index 23a37b6..0000000
--- a/src/org/w3c/dom/smil/ElementTargetAttributes.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-/**
- *  This interface define the set of animation target extensions. 
- */
-public interface ElementTargetAttributes {
-    /**
-     *  The name of the target attribute. 
-     */
-    public String getAttributeName();
-    public void setAttributeName(String attributeName);
-
-    // attributeTypes
-    public static final short ATTRIBUTE_TYPE_AUTO       = 0;
-    public static final short ATTRIBUTE_TYPE_CSS        = 1;
-    public static final short ATTRIBUTE_TYPE_XML        = 2;
-
-    /**
-     *  A code representing the value of the  attributeType attribute, as 
-     * defined above. Default value is <code>ATTRIBUTE_TYPE_CODE</code> . 
-     */
-    public short getAttributeType();
-    public void setAttributeType(short attributeType);
-
-}
-
diff --git a/src/org/w3c/dom/smil/ElementTest.java b/src/org/w3c/dom/smil/ElementTest.java
deleted file mode 100644
index 78fe497..0000000
--- a/src/org/w3c/dom/smil/ElementTest.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  Defines the test attributes interface. See the  Test attributes definition 
- * . 
- */
-public interface ElementTest {
-    /**
-     *  The  systemBitrate value. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public int getSystemBitrate();
-    public void setSystemBitrate(int systemBitrate)
-                                      throws DOMException;
-
-    /**
-     *  The  systemCaptions value. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public boolean getSystemCaptions();
-    public void setSystemCaptions(boolean systemCaptions)
-                                      throws DOMException;
-
-    /**
-     *  The  systemLanguage value. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getSystemLanguage();
-    public void setSystemLanguage(String systemLanguage)
-                                      throws DOMException;
-
-    /**
-     *  The result of the evaluation of the  systemRequired attribute. 
-     */
-    public boolean getSystemRequired();
-
-    /**
-     *  The result of the evaluation of the  systemScreenSize attribute. 
-     */
-    public boolean getSystemScreenSize();
-
-    /**
-     *  The result of the evaluation of the  systemScreenDepth attribute. 
-     */
-    public boolean getSystemScreenDepth();
-
-    /**
-     *  The value of the  systemOverdubOrSubtitle attribute. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getSystemOverdubOrSubtitle();
-    public void setSystemOverdubOrSubtitle(String systemOverdubOrSubtitle)
-                                      throws DOMException;
-
-    /**
-     *  The value of the  systemAudioDesc attribute. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public boolean getSystemAudioDesc();
-    public void setSystemAudioDesc(boolean systemAudioDesc)
-                                      throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/smil/ElementTime.java b/src/org/w3c/dom/smil/ElementTime.java
deleted file mode 100644
index 317cd2f..0000000
--- a/src/org/w3c/dom/smil/ElementTime.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- *
- * Difference to the original copy of this file:
- *   1) ADD public static final short FILL_AUTO = 2;
- *   2) ADD public short getFillDefault();
- *   3) AND public void setFillDefault(short fillDefault)
- *                   throws DOMException;
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  This interface defines the set of timing attributes that are common to all
- * timed elements.
- */
-public interface ElementTime {
-    /**
-     *  The desired value (as a list of times) of the  begin instant of this
-     * node.
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
-     */
-    public TimeList getBegin();
-    public void setBegin(TimeList begin)
-                     throws DOMException;
-
-    /**
-     *  The list of active  ends for this node.
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
-     */
-    public TimeList getEnd();
-    public void setEnd(TimeList end)
-                     throws DOMException;
-
-    /**
-     *  The desired simple  duration value of this node in seconds. Negative
-     * value means "indefinite".
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
-     */
-    public float getDur();
-    public void setDur(float dur)
-                     throws DOMException;
-
-    // restartTypes
-    public static final short RESTART_ALWAYS            = 0;
-    public static final short RESTART_NEVER             = 1;
-    public static final short RESTART_WHEN_NOT_ACTIVE   = 2;
-
-    /**
-     *  A code representing the value of the  restart attribute, as defined
-     * above. Default value is <code>RESTART_ALWAYS</code> .
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
-     */
-    public short getRestart();
-    public void setRestart(short restart)
-                     throws DOMException;
-
-    // fillTypes
-    public static final short FILL_REMOVE               = 0;
-    public static final short FILL_FREEZE               = 1;
-    public static final short FILL_AUTO                 = 2;
-
-    /**
-     *  A code representing the value of the  fill attribute, as defined
-     * above. Default value is <code>FILL_REMOVE</code> .
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
-     */
-    public short getFill();
-    public void setFill(short fill)
-                     throws DOMException;
-
-    /**
-     *  The  repeatCount attribute causes the element to play repeatedly
-     * (loop) for the specified number of times. A negative value repeat the
-     * element indefinitely. Default value is 0 (unspecified).
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
-     */
-    public float getRepeatCount();
-    public void setRepeatCount(float repeatCount)
-                     throws DOMException;
-
-    /**
-     *  The  repeatDur causes the element to play repeatedly (loop) for the
-     * specified duration in milliseconds. Negative means "indefinite".
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
-     */
-    public float getRepeatDur();
-    public void setRepeatDur(float repeatDur)
-                     throws DOMException;
-
-    /**
-     *  Causes this element to begin the local timeline (subject to sync
-     * constraints).
-     * @return  <code>true</code> if the method call was successful and the
-     *   element was begun. <code>false</code> if the method call failed.
-     *   Possible reasons for failure include:  The element doesn't support
-     *   the <code>beginElement</code> method. (the <code>beginEvent</code>
-     *   attribute is not set to <code>"undefinite"</code> )  The element is
-     *   already active and can't be restart when it is active. (the
-     *   <code>restart</code> attribute is set to <code>"whenNotActive"</code>
-     *    )  The element is active or has been active and can't be restart.
-     *   (the <code>restart</code> attribute is set to <code>"never"</code> ).
-     *
-     */
-    public boolean beginElement();
-
-    /**
-     *  Causes this element to end the local timeline (subject to sync
-     * constraints).
-     * @return  <code>true</code> if the method call was successful and the
-     *   element was endeed. <code>false</code> if method call failed.
-     *   Possible reasons for failure include:  The element doesn't support
-     *   the <code>endElement</code> method. (the <code>endEvent</code>
-     *   attribute is not set to <code>"undefinite"</code> )  The element is
-     *   not active.
-     */
-    public boolean endElement();
-
-    /**
-     *  Causes this element to pause the local timeline (subject to sync
-     * constraints).
-     */
-    public void pauseElement();
-
-    /**
-     *  Causes this element to resume a paused local timeline.
-     */
-    public void resumeElement();
-
-    /**
-     *  Seeks this element to the specified point on the local timeline
-     * (subject to sync constraints).  If this is a timeline, this must seek
-     * the entire timeline (i.e. propagate to all timeChildren).
-     * @param seekTo  The desired position on the local timeline in
-     *   milliseconds.
-     */
-    public void seekElement(float seekTo);
-
-    public short getFillDefault();
-    public void setFillDefault(short fillDefault)
-                     throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/smil/ElementTimeContainer.java b/src/org/w3c/dom/smil/ElementTimeContainer.java
deleted file mode 100644
index 69b39e8..0000000
--- a/src/org/w3c/dom/smil/ElementTimeContainer.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.NodeList;
-
-/**
- *  This is a placeholder - subject to change. This represents generic 
- * timelines. 
- */
-public interface ElementTimeContainer extends ElementTime {
-    /**
-     *  A NodeList that contains all timed childrens of this node. If there are
-     *  no timed children, the <code>Nodelist</code> is empty.  An iterator 
-     * is more appropriate here than a node list but it requires Traversal 
-     * module support. 
-     */
-    public NodeList getTimeChildren();
-
-    /**
-     *  Returns a list of child elements active at the specified invocation. 
-     * @param instant  The desired position on the local timeline in 
-     *   milliseconds. 
-     * @return  List of timed child-elements active at instant. 
-     */
-    public NodeList getActiveChildrenAt(float instant);
-
-}
-
diff --git a/src/org/w3c/dom/smil/ElementTimeControl.java b/src/org/w3c/dom/smil/ElementTimeControl.java
deleted file mode 100644
index e546b36..0000000
--- a/src/org/w3c/dom/smil/ElementTimeControl.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-
-/**
- */
-public interface ElementTimeControl {
-    /**
-     *  Causes this element to begin the local timeline (subject to sync 
-     * constraints).  
-     * @return  <code>true</code> if the method call was successful and the 
-     *   element was begun. <code>false</code> if the method call failed. 
-     *   Possible reasons for failure include:  The element doesn't support 
-     *   the <code>beginElement</code> method. (the <code>begin</code> 
-     *   attribute is not set to <code>"indefinite"</code> )  The element is 
-     *   already active and can't be restart when it is active. (the 
-     *   <code>restart</code> attribute is set to <code>"whenNotActive"</code>
-     *    )  The element is active or has been active and can't be restart. 
-     *   (the <code>restart</code> attribute is set to <code>"never"</code> ).
-     *    
-     * @exception DOMException
-     *    SYNTAX_ERR: The element was not defined with the appropriate syntax 
-     *   to allow <code>beginElement</code> calls. 
-     */
-    public boolean beginElement()
-                                throws DOMException;
-
-    /**
-     *  Causes this element to begin the local timeline (subject to sync 
-     * constraints), at the passed offset from the current time when the 
-     * method is called. If the offset is &gt;= 0, the semantics are 
-     * equivalent to an event-base begin with the specified offset. If the 
-     * offset is &lt; 0, the semantics are equivalent to beginElement(), but 
-     * the element active duration is evaluated as though the element had 
-     * begun at the passed (negative) offset from the current time when the 
-     * method is called. 
-     * @param offset  The offset in seconds at which to begin the element. 
-     * @return  <code>true</code> if the method call was successful and the 
-     *   element was begun. <code>false</code> if the method call failed. 
-     *   Possible reasons for failure include:  The element doesn't support 
-     *   the <code>beginElementAt</code> method. (the <code>begin</code> 
-     *   attribute is not set to <code>"indefinite"</code> )  The element is 
-     *   already active and can't be restart when it is active. (the 
-     *   <code>restart</code> attribute is set to <code>"whenNotActive"</code>
-     *    )  The element is active or has been active and can't be restart. 
-     *   (the <code>restart</code> attribute is set to <code>"never"</code> ).
-     *    
-     * @exception DOMException
-     *    SYNTAX_ERR: The element was not defined with the appropriate syntax 
-     *   to allow <code>beginElementAt</code> calls. 
-     */
-    public boolean beginElementAt(float offset)
-                                  throws DOMException;
-
-    /**
-     *  Causes this element to end the local timeline (subject to sync 
-     * constraints). 
-     * @return  <code>true</code> if the method call was successful and the 
-     *   element was ended. <code>false</code> if method call failed. 
-     *   Possible reasons for failure include:  The element doesn't support 
-     *   the <code>endElement</code> method. (the <code>end</code> attribute 
-     *   is not set to <code>"indefinite"</code> )  The element is not active.
-     *    
-     * @exception DOMException
-     *    SYNTAX_ERR: The element was not defined with the appropriate syntax 
-     *   to allow <code>endElement</code> calls. 
-     */
-    public boolean endElement()
-                              throws DOMException;
-
-    /**
-     *  Causes this element to end the local timeline (subject to sync 
-     * constraints) at the specified offset from the current time when the 
-     * method is called. 
-     * @param offset  The offset in seconds at which to end the element. Must 
-     *   be &gt;= 0. 
-     * @return  <code>true</code> if the method call was successful and the 
-     *   element was ended. <code>false</code> if method call failed. 
-     *   Possible reasons for failure include:  The element doesn't support 
-     *   the <code>endElementAt</code> method. (the <code>end</code> 
-     *   attribute is not set to <code>"indefinite"</code> )  The element is 
-     *   not active. 
-     * @exception DOMException
-     *    SYNTAX_ERR: The element was not defined with the appropriate syntax 
-     *   to allow <code>endElementAt</code> calls. 
-     */
-    public boolean endElementAt(float offset)
-                                throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/smil/ElementTimeManipulation.java b/src/org/w3c/dom/smil/ElementTimeManipulation.java
deleted file mode 100644
index bb83326..0000000
--- a/src/org/w3c/dom/smil/ElementTimeManipulation.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  This interface support use-cases commonly associated with animation.  
- * "accelerate" and "decelerate" are float values in the timing draft and 
- * percentage values even in this draft if both of them represent a 
- * percentage. 
- */
-public interface ElementTimeManipulation {
-    /**
-     *  Defines the playback  speed of element time. The value is specified as 
-     * a multiple of normal (parent time container) play speed.  Legal values 
-     * are signed floating point values.  Zero values are not allowed.  The 
-     * default is <code>1.0</code> (no modification of speed). 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public float getSpeed();
-    public void setSpeed(float speed)
-                            throws DOMException;
-
-    /**
-     *  The percentage value of the  simple acceleration of time for the 
-     * element. Allowed values are from <code>0</code> to <code>100</code> . 
-     * Default value is <code>0</code> (no acceleration). 
-     * <br> The sum of the values for accelerate and decelerate must not exceed
-     *  100. If it does, the deceleration value will be reduced to make the 
-     * sum legal. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public float getAccelerate();
-    public void setAccelerate(float accelerate)
-                            throws DOMException;
-
-    /**
-     *  The percentage value of the  simple decelerate of time for the 
-     * element. Allowed values are from <code>0</code> to <code>100</code> . 
-     * Default value is <code>0</code> (no deceleration). 
-     * <br> The sum of the values for accelerate and decelerate must not exceed
-     *  100. If it does, the deceleration value will be reduced to make the 
-     * sum legal. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public float getDecelerate();
-    public void setDecelerate(float decelerate)
-                            throws DOMException;
-
-    /**
-     *  The  autoReverse attribute controls the "play forwards then backwards" 
-     * functionality. Default value is <code>false</code> . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public boolean getAutoReverse();
-    public void setAutoReverse(boolean autoReverse)
-                            throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/smil/SMILAnimateColorElement.java b/src/org/w3c/dom/smil/SMILAnimateColorElement.java
deleted file mode 100644
index 9bd9d13..0000000
--- a/src/org/w3c/dom/smil/SMILAnimateColorElement.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-/**
- *  This interface represents the SMIL <code>animateColor</code> element. 
- */
-public interface SMILAnimateColorElement extends SMILAnimation {
-}
-
diff --git a/src/org/w3c/dom/smil/SMILAnimateElement.java b/src/org/w3c/dom/smil/SMILAnimateElement.java
deleted file mode 100644
index 9393e00..0000000
--- a/src/org/w3c/dom/smil/SMILAnimateElement.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-/**
- *  This interface represents the SMIL <code>animate</code> element. 
- */
-public interface SMILAnimateElement extends SMILAnimation {
-}
-
diff --git a/src/org/w3c/dom/smil/SMILAnimateMotionElement.java b/src/org/w3c/dom/smil/SMILAnimateMotionElement.java
deleted file mode 100644
index 6a140ad..0000000
--- a/src/org/w3c/dom/smil/SMILAnimateMotionElement.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  This interface present the <code>animationMotion</code> element in SMIL. 
- */
-public interface SMILAnimateMotionElement extends SMILAnimateElement {
-    /**
-     *  Specifies the curve that describes the attribute value as a function 
-     * of time.  Check with the SVG spec for better support 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getPath();
-    public void setPath(String path)
-                                throws DOMException;
-
-    /**
-     *  Specifies the origin of motion for the animation. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getOrigin();
-    public void setOrigin(String origin)
-                                throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/smil/SMILAnimation.java b/src/org/w3c/dom/smil/SMILAnimation.java
deleted file mode 100644
index 8615dfa..0000000
--- a/src/org/w3c/dom/smil/SMILAnimation.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  This interface define the set of animation extensions for SMIL.  The  
- * attributes will go in a XLink interface. 
- */
-public interface SMILAnimation extends SMILElement, ElementTargetAttributes, ElementTime, ElementTimeControl {
-    // additiveTypes
-    public static final short ADDITIVE_REPLACE          = 0;
-    public static final short ADDITIVE_SUM              = 1;
-
-    /**
-     *  A code representing the value of the  additive attribute, as defined 
-     * above. Default value is <code>ADDITIVE_REPLACE</code> . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public short getAdditive();
-    public void setAdditive(short additive)
-                                throws DOMException;
-
-    // accumulateTypes
-    public static final short ACCUMULATE_NONE           = 0;
-    public static final short ACCUMULATE_SUM            = 1;
-
-    /**
-     *  A code representing the value of the  accumulate attribute, as defined 
-     * above. Default value is <code>ACCUMULATE_NONE</code> . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public short getAccumulate();
-    public void setAccumulate(short accumulate)
-                                throws DOMException;
-
-    // calcModeTypes
-    public static final short CALCMODE_DISCRETE         = 0;
-    public static final short CALCMODE_LINEAR           = 1;
-    public static final short CALCMODE_PACED            = 2;
-    public static final short CALCMODE_SPLINE           = 3;
-
-    /**
-     *  A code representing the value of the  calcMode attribute, as defined 
-     * above. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public short getCalcMode();
-    public void setCalcMode(short calcMode)
-                                throws DOMException;
-
-    /**
-     *  A <code>DOMString</code> representing the value of the  keySplines 
-     * attribute.  Need an interface a point (x1,y1,x2,y2) 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getKeySplines();
-    public void setKeySplines(String keySplines)
-                                throws DOMException;
-
-    /**
-     *  A list of the time value of the  keyTimes attribute. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public TimeList getKeyTimes();
-    public void setKeyTimes(TimeList keyTimes)
-                                throws DOMException;
-
-    /**
-     *  A <code>DOMString</code> representing the value of the  values 
-     * attribute. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getValues();
-    public void setValues(String values)
-                                throws DOMException;
-
-    /**
-     *  A <code>DOMString</code> representing the value of the  from attribute.
-     *  
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getFrom();
-    public void setFrom(String from)
-                                throws DOMException;
-
-    /**
-     *  A <code>DOMString</code> representing the value of the  to attribute. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getTo();
-    public void setTo(String to)
-                                throws DOMException;
-
-    /**
-     *  A <code>DOMString</code> representing the value of the  by attribute. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getBy();
-    public void setBy(String by)
-                                throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/smil/SMILDocument.java b/src/org/w3c/dom/smil/SMILDocument.java
deleted file mode 100644
index e146810..0000000
--- a/src/org/w3c/dom/smil/SMILDocument.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- *
- * Difference to the original copy of this file:
- *   1) ADD public SMILElement getHead();
- *   2) ADD public SMILElement getBody();
- *   3) ADD public SMILLayoutElement getLayout();
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.Document;
-
-/**
- *  A SMIL document is the root of the SMIL Hierarchy and holds the entire
- * content. Beside providing access to the hierarchy, it also provides some
- * convenience methods for accessing certain sets of information from the
- * document.  Cover document timing, document locking?, linking modality and
- * any other document level issues. Are there issues with nested SMIL files?
- * Is it worth talking about different document scenarios, corresponding to
- * differing profiles? E.g. Standalone SMIL, HTML integration, etc.
- */
-public interface SMILDocument extends Document, ElementSequentialTimeContainer {
-
-    /**
-     * Returns the element that contains the layout node of this document,
-     * i.e. the <code>HEAD</code> element.
-     */
-    public SMILElement getHead();
-
-    /**
-     * Returns the element that contains the par's of the document, i.e. the
-     * <code>BODY</code> element.
-     */
-    public SMILElement getBody();
-
-    /**
-     * Returns the element that contains the layout information of the presentation,
-     * i.e. the <code>LAYOUT</code> element.
-     */
-    public SMILLayoutElement getLayout();
-}
-
diff --git a/src/org/w3c/dom/smil/SMILElement.java b/src/org/w3c/dom/smil/SMILElement.java
deleted file mode 100644
index 748de23..0000000
--- a/src/org/w3c/dom/smil/SMILElement.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-
-/**
- *  The <code>SMILElement</code> interface is the base for all SMIL element 
- * types. It follows the model of the <code>HTMLElement</code> in the HTML 
- * DOM, extending the base <code>Element</code> class to denote SMIL-specific 
- * elements. 
- * <p> Note that the <code>SMILElement</code> interface overlaps with the 
- * <code>HTMLElement</code> interface. In practice, an integrated document 
- * profile that include HTML and SMIL modules will effectively implement both 
- * interfaces (see also the DOM documentation discussion of  Inheritance vs 
- * Flattened Views of the API ).  // etc. This needs attention
- */
-public interface SMILElement extends Element {
-    /**
-     *  The unique id.
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getId();
-    public void setId(String id)
-                                      throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/smil/SMILLayoutElement.java b/src/org/w3c/dom/smil/SMILLayoutElement.java
deleted file mode 100644
index d812dac..0000000
--- a/src/org/w3c/dom/smil/SMILLayoutElement.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- *
- * Difference to the original copy of this file:
- *   1) ADD public SMILRootLayoutElement getRootLayout();
- *   2) ADD public NodeList getRegions();
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.NodeList;
-
-/**
- *  Declares layout type for the document. See the  LAYOUT element definition .
- *
- */
-public interface SMILLayoutElement extends SMILElement {
-    /**
-     *  The mime type of the layout langage used in this layout element.The
-     * default value of the type attribute is "text/smil-basic-layout".
-     */
-    public String getType();
-
-    /**
-     *  <code>true</code> if the player can understand the mime type,
-     * <code>false</code> otherwise.
-     */
-    public boolean getResolved();
-
-    /**
-     * Returns the root layout element of this document.
-     */
-    public SMILRootLayoutElement getRootLayout();
-
-    /**
-     * Return the region elements of this document.
-     */
-    public NodeList getRegions();
-}
-
diff --git a/src/org/w3c/dom/smil/SMILMediaElement.java b/src/org/w3c/dom/smil/SMILMediaElement.java
deleted file mode 100644
index d6a2d2d..0000000
--- a/src/org/w3c/dom/smil/SMILMediaElement.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  Declares media content. 
- */
-public interface SMILMediaElement extends ElementTime, SMILElement {
-    /**
-     *  See the  abstract attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getAbstractAttr();
-    public void setAbstractAttr(String abstractAttr)
-                              throws DOMException;
-
-    /**
-     *  See the  alt attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getAlt();
-    public void setAlt(String alt)
-                              throws DOMException;
-
-    /**
-     *  See the  author attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getAuthor();
-    public void setAuthor(String author)
-                              throws DOMException;
-
-    /**
-     *  See the  clipBegin attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getClipBegin();
-    public void setClipBegin(String clipBegin)
-                              throws DOMException;
-
-    /**
-     *  See the  clipEnd attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getClipEnd();
-    public void setClipEnd(String clipEnd)
-                              throws DOMException;
-
-    /**
-     *  See the  copyright attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getCopyright();
-    public void setCopyright(String copyright)
-                              throws DOMException;
-
-    /**
-     *  See the  longdesc attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getLongdesc();
-    public void setLongdesc(String longdesc)
-                              throws DOMException;
-
-    /**
-     *  See the  port attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getPort();
-    public void setPort(String port)
-                              throws DOMException;
-
-    /**
-     *  See the  readIndex attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getReadIndex();
-    public void setReadIndex(String readIndex)
-                              throws DOMException;
-
-    /**
-     *  See the  rtpformat attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getRtpformat();
-    public void setRtpformat(String rtpformat)
-                              throws DOMException;
-
-    /**
-     *  See the  src attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getSrc();
-    public void setSrc(String src)
-                              throws DOMException;
-
-    /**
-     *  See the  stripRepeat attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getStripRepeat();
-    public void setStripRepeat(String stripRepeat)
-                              throws DOMException;
-
-    /**
-     *  See the  title attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getTitle();
-    public void setTitle(String title)
-                              throws DOMException;
-
-    /**
-     *  See the  transport attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getTransport();
-    public void setTransport(String transport)
-                              throws DOMException;
-
-    /**
-     *  See the  type attribute from  . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. 
-     */
-    public String getType();
-    public void setType(String type)
-                              throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/smil/SMILParElement.java b/src/org/w3c/dom/smil/SMILParElement.java
deleted file mode 100644
index 0b3da84..0000000
--- a/src/org/w3c/dom/smil/SMILParElement.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package org.w3c.dom.smil;
-
-public interface SMILParElement extends ElementParallelTimeContainer,
-        SMILElement {
-
-}
diff --git a/src/org/w3c/dom/smil/SMILRefElement.java b/src/org/w3c/dom/smil/SMILRefElement.java
deleted file mode 100644
index adeb2b3..0000000
--- a/src/org/w3c/dom/smil/SMILRefElement.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-/** 
- * // audio, video, ... 
- */
-public interface SMILRefElement extends SMILMediaElement {
-}
-
diff --git a/src/org/w3c/dom/smil/SMILRegionElement.java b/src/org/w3c/dom/smil/SMILRegionElement.java
deleted file mode 100644
index 9da6998..0000000
--- a/src/org/w3c/dom/smil/SMILRegionElement.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- *
- * Difference to the original copy of this file:
- *   1) ADD public int getLeft();
- *   2) ADD public void setLeft(int top) throws DOMException;
- *   3) MODIFY public String getTop() to public int getTop();
- *   4) MODIFY public void setTop(String) to public void setTop(int);
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-
-/**
- *  Controls the position, size and scaling of media object elements. See the
- * region element definition .
- */
-public interface SMILRegionElement extends SMILElement, ElementLayout {
-    /**
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
-     */
-    public String getFit();
-    public void setFit(String fit)
-                                      throws DOMException;
-
-    /**
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
-     */
-    public int getLeft();
-    public void setLeft(int top)
-                                      throws DOMException;
-
-    /**
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
-     */
-    public int getTop();
-    public void setTop(int top)
-                                      throws DOMException;
-
-    /**
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
-     */
-    public int getZIndex();
-    public void setZIndex(int zIndex)
-                                      throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/smil/SMILRegionInterface.java b/src/org/w3c/dom/smil/SMILRegionInterface.java
deleted file mode 100644
index b5e43c3..0000000
--- a/src/org/w3c/dom/smil/SMILRegionInterface.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-/**
- *  Declares rendering surface for an element. See the  region attribute 
- * definition . 
- */
-public interface SMILRegionInterface {
-    /**
-     */
-    public SMILRegionElement getRegion();
-    public void setRegion(SMILRegionElement region);
-
-}
-
diff --git a/src/org/w3c/dom/smil/SMILRegionMediaElement.java b/src/org/w3c/dom/smil/SMILRegionMediaElement.java
deleted file mode 100644
index 59493cd..0000000
--- a/src/org/w3c/dom/smil/SMILRegionMediaElement.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (C) 2007-2008 Esmertec AG.
- * Copyright (C) 2007-2008 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.
- */
-
-package org.w3c.dom.smil;
-
-public interface SMILRegionMediaElement extends SMILMediaElement,
-        SMILRegionInterface {
-}
diff --git a/src/org/w3c/dom/smil/SMILRootLayoutElement.java b/src/org/w3c/dom/smil/SMILRootLayoutElement.java
deleted file mode 100644
index 327ecd6..0000000
--- a/src/org/w3c/dom/smil/SMILRootLayoutElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-/**
- *  Declares layout properties for the root-layout element. See the  
- * root-layout element definition . 
- */
-public interface SMILRootLayoutElement extends SMILElement, ElementLayout {
-}
-
diff --git a/src/org/w3c/dom/smil/SMILSetElement.java b/src/org/w3c/dom/smil/SMILSetElement.java
deleted file mode 100644
index 8e0b1b7..0000000
--- a/src/org/w3c/dom/smil/SMILSetElement.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-/**
- *  This interface represents the  set element. 
- */
-public interface SMILSetElement extends ElementTimeControl, ElementTime, ElementTargetAttributes, SMILElement {
-    /**
-     *  Specifies the value for the attribute during the duration of this 
-     * element. 
-     */
-    public String getTo();
-    public void setTo(String to);
-
-}
-
diff --git a/src/org/w3c/dom/smil/SMILSwitchElement.java b/src/org/w3c/dom/smil/SMILSwitchElement.java
deleted file mode 100644
index 27abb91..0000000
--- a/src/org/w3c/dom/smil/SMILSwitchElement.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.Element;
-
-/**
- *  Defines a block of content control. See the  switch element definition . 
- */
-public interface SMILSwitchElement extends SMILElement {
-    /**
-     *  Returns the slected element at runtime. <code>null</code> if the 
-     * selected element is not yet available. 
-     * @return  The selected <code>Element</code> for thisd <code>switch</code>
-     *    element. 
-     */
-    public Element getSelectedElement();
-
-}
-
diff --git a/src/org/w3c/dom/smil/SMILTopLayoutElement.java b/src/org/w3c/dom/smil/SMILTopLayoutElement.java
deleted file mode 100644
index 2621419..0000000
--- a/src/org/w3c/dom/smil/SMILTopLayoutElement.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-/**
- *  Declares layout properties for the top-layout element. See the  top-layout 
- * element definition . 
- */
-public interface SMILTopLayoutElement extends SMILElement, ElementLayout {
-}
-
diff --git a/src/org/w3c/dom/smil/Time.java b/src/org/w3c/dom/smil/Time.java
deleted file mode 100644
index 72fe086..0000000
--- a/src/org/w3c/dom/smil/Time.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-
-/**
- *  The <code>Time</code> interface is a datatype that represents times within 
- * the timegraph. A <code>Time</code> has a type, key values to describe the 
- * time, and a boolean to indicate whether the values are currently 
- * unresolved.  Still need to address the wallclock values. 
- */
-public interface Time {
-    /**
-     *  A boolean indicating whether the current <code>Time</code> has been 
-     * fully resolved to the document schedule.  Note that for this to be 
-     * true, the current <code>Time</code> must be defined (not indefinite), 
-     * the syncbase and all <code>Time</code> 's that the syncbase depends on 
-     * must be defined (not indefinite), and the begin <code>Time</code> of 
-     * all ascendent time containers of this element and all <code>Time</code>
-     *  elements that this depends upon must be defined (not indefinite). 
-     * <br> If this <code>Time</code> is based upon an event, this 
-     * <code>Time</code> will only be resolved once the specified event has 
-     * happened, subject to the constraints of the time container. 
-     * <br> Note that this may change from true to false when the parent time 
-     * container ends its simple duration (including when it repeats or 
-     * restarts). 
-     */
-    public boolean getResolved();
-
-    /**
-     *  The clock value in seconds relative to the parent time container begin.
-     *  This indicates the resolved time relationship to the parent time 
-     * container.  This is only valid if resolved is true. 
-     */
-    public double getResolvedOffset();
-
-    // TimeTypes
-    public static final short SMIL_TIME_INDEFINITE      = 0;
-    public static final short SMIL_TIME_OFFSET          = 1;
-    public static final short SMIL_TIME_SYNC_BASED      = 2;
-    public static final short SMIL_TIME_EVENT_BASED     = 3;
-    public static final short SMIL_TIME_WALLCLOCK       = 4;
-    public static final short SMIL_TIME_MEDIA_MARKER    = 5;
-
-    /**
-     *  A code representing the type of the underlying object, as defined 
-     * above. 
-     */
-    public short getTimeType();
-
-    /**
-     *  The clock value in seconds relative to the syncbase or eventbase. 
-     * Default value is <code>0</code> . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this 
-     *   readonly attribute. 
-     */
-    public double getOffset();
-    public void setOffset(double offset)
-                                      throws DOMException;
-
-    /**
-     *  The base element for a sync-based or event-based time. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this 
-     *   readonly attribute. 
-     */
-    public Element getBaseElement();
-    public void setBaseElement(Element baseElement)
-                                      throws DOMException;
-
-    /**
-     *  If <code>true</code> , indicates that a sync-based time is relative to 
-     * the begin of the baseElement.  If <code>false</code> , indicates that a
-     *  sync-based time is relative to the active end of the baseElement. 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this 
-     *   readonly attribute. 
-     */
-    public boolean getBaseBegin();
-    public void setBaseBegin(boolean baseBegin)
-                                      throws DOMException;
-
-    /**
-     *  The name of the event for an event-based time. Default value is 
-     * <code>null</code> . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this 
-     *   readonly attribute. 
-     */
-    public String getEvent();
-    public void setEvent(String event)
-                                      throws DOMException;
-
-    /**
-     *  The name of the marker from the media element, for media marker times. 
-     * Default value is <code>null</code> . 
-     * @exception DOMException
-     *    NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this 
-     *   readonly attribute. 
-     */
-    public String getMarker();
-    public void setMarker(String marker)
-                                      throws DOMException;
-
-}
-
diff --git a/src/org/w3c/dom/smil/TimeEvent.java b/src/org/w3c/dom/smil/TimeEvent.java
deleted file mode 100644
index a79c4ca..0000000
--- a/src/org/w3c/dom/smil/TimeEvent.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-import org.w3c.dom.events.Event;
-import org.w3c.dom.views.AbstractView;
-
-/**
- *  The <code>TimeEvent</code> interface provides specific contextual 
- * information associated with Time events. 
- */
-public interface TimeEvent extends Event {
-    /**
-     *  The <code>view</code> attribute identifies the 
-     * <code>AbstractView</code> from which the event was generated. 
-     */
-    public AbstractView getView();
-
-    /**
-     *  Specifies some detail information about the <code>Event</code> , 
-     * depending on the type of event. 
-     */
-    public int getDetail();
-
-    /**
-     *  The <code>initTimeEvent</code> method is used to initialize the value 
-     * of a <code>TimeEvent</code> created through the 
-     * <code>DocumentEvent</code> interface.  This method may only be called 
-     * before the <code>TimeEvent</code> has been dispatched via the 
-     * <code>dispatchEvent</code> method, though it may be called multiple 
-     * times during that phase if necessary.  If called multiple times, the 
-     * final invocation takes precedence. 
-     * @param typeArg  Specifies the event type.
-     * @param viewArg  Specifies the <code>Event</code> 's 
-     *   <code>AbstractView</code> .
-     * @param detailArg  Specifies the <code>Event</code> 's detail.
-     */
-    public void initTimeEvent(String typeArg, 
-                              AbstractView viewArg, 
-                              int detailArg);
-
-}
-
diff --git a/src/org/w3c/dom/smil/TimeList.java b/src/org/w3c/dom/smil/TimeList.java
deleted file mode 100644
index 7cec133..0000000
--- a/src/org/w3c/dom/smil/TimeList.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
- * details.
- */
-
-package org.w3c.dom.smil;
-
-/**
- *  The <code>TimeList</code> interface provides the abstraction of an ordered 
- * collection of times, without defining or constraining how this collection 
- * is implemented.
- * <p> The items in the <code>TimeList</code> are accessible via an integral 
- * index, starting from 0. 
- */
-public interface TimeList {
-    /**
-     *  Returns the <code>index</code> th item in the collection. If 
-     * <code>index</code> is greater than or equal to the number of times in 
-     * the list, this returns <code>null</code> .
-     * @param index  Index into the collection.
-     * @return  The time at the <code>index</code> th position in the 
-     *   <code>TimeList</code> , or <code>null</code> if that is not a valid 
-     *   index.
-     */
-    public Time item(int index);
-
-    /**
-     *  The number of times in the list. The range of valid child time indices 
-     * is 0 to <code>length-1</code> inclusive. 
-     */
-    public int getLength();
-
-}
-
diff --git a/src/org/w3c/dom/views/AbstractView.java b/src/org/w3c/dom/views/AbstractView.java
deleted file mode 100644
index 97e8f0e..0000000
--- a/src/org/w3c/dom/views/AbstractView.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.views;
-
-/**
- * A base interface that all views shall derive from.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113'>Document Object Model (DOM) Level 2 Views Specification</a>.
- * @since DOM Level 2
- */
-public interface AbstractView {
-    /**
-     * The source <code>DocumentView</code> of which this is an 
-     * <code>AbstractView</code>.
-     */
-    public DocumentView getDocument();
-
-}
diff --git a/src/org/w3c/dom/views/DocumentView.java b/src/org/w3c/dom/views/DocumentView.java
deleted file mode 100644
index 2cb9eeb..0000000
--- a/src/org/w3c/dom/views/DocumentView.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2000 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.
- * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package org.w3c.dom.views;
-
-/**
- * The <code>DocumentView</code> interface is implemented by 
- * <code>Document</code> objects in DOM implementations supporting DOM 
- * Views. It provides an attribute to retrieve the default view of a 
- * document.
- * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113'>Document Object Model (DOM) Level 2 Views Specification</a>.
- * @since DOM Level 2
- */
-public interface DocumentView {
-    /**
-     * The default <code>AbstractView</code> for this <code>Document</code>, 
-     * or <code>null</code> if none available.
-     */
-    public AbstractView getDefaultView();
-
-}