Fixed some Lint warnings (and fixed some formattings).

This doesn't change functionality (didn't find anything broken here)

Bug:5964592

Change-Id: I7109c632096caafbf99434762dd1a690424058df
diff --git a/res/layout-sw580dp-w1000dp/contact_editor_activity.xml b/res/layout-sw580dp-w1000dp/contact_editor_activity.xml
index cb4067e..e5f00dd 100644
--- a/res/layout-sw580dp-w1000dp/contact_editor_activity.xml
+++ b/res/layout-sw580dp-w1000dp/contact_editor_activity.xml
@@ -22,7 +22,7 @@
 
     <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
+        android:layout_height="wrap_content"
         android:orientation="horizontal"
         android:baselineAligned="false">
 
diff --git a/res/layout-sw580dp/contact_detail_fragment.xml b/res/layout-sw580dp/contact_detail_fragment.xml
index 28a6bb9..32b7cbb 100644
--- a/res/layout-sw580dp/contact_detail_fragment.xml
+++ b/res/layout-sw580dp/contact_detail_fragment.xml
@@ -16,7 +16,6 @@
 
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
     android:id="@+id/contact_detail"
     android:orientation="vertical"
     android:layout_width="match_parent"
diff --git a/res/layout-sw580dp/contact_detail_updates_fragment.xml b/res/layout-sw580dp/contact_detail_updates_fragment.xml
index 3bcb01c..bf63d27 100644
--- a/res/layout-sw580dp/contact_detail_updates_fragment.xml
+++ b/res/layout-sw580dp/contact_detail_updates_fragment.xml
@@ -16,7 +16,6 @@
 
 <FrameLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
     android:id="@+id/contact_detail_updates_fragment"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
diff --git a/res/layout-sw580dp/contact_editor_activity.xml b/res/layout-sw580dp/contact_editor_activity.xml
index c33a3c0..526fe2b 100644
--- a/res/layout-sw580dp/contact_editor_activity.xml
+++ b/res/layout-sw580dp/contact_editor_activity.xml
@@ -23,6 +23,6 @@
     <fragment class="com.android.contacts.editor.ContactEditorFragment"
         android:id="@+id/contact_editor_fragment"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"/>
+        android:layout_height="wrap_content"/>
 
 </ScrollView>
diff --git a/res/layout-sw680dp-w1000dp/contact_detail_fragment.xml b/res/layout-sw680dp-w1000dp/contact_detail_fragment.xml
index 890a81c..e1a870a 100644
--- a/res/layout-sw680dp-w1000dp/contact_detail_fragment.xml
+++ b/res/layout-sw680dp-w1000dp/contact_detail_fragment.xml
@@ -16,7 +16,6 @@
 
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
     android:id="@+id/contact_detail"
     android:orientation="vertical"
     android:layout_width="match_parent"
@@ -55,7 +54,7 @@
             android:layout_weight="1"
             android:divider="@null"/>
 
-   </LinearLayout>
+    </LinearLayout>
 
     <!-- "QuickFix"- button (Copy to local contact, add to group) -->
     <Button
diff --git a/res/layout-w470dp/contact_detail_fragment.xml b/res/layout-w470dp/contact_detail_fragment.xml
index 5de063f..d7d1756 100644
--- a/res/layout-w470dp/contact_detail_fragment.xml
+++ b/res/layout-w470dp/contact_detail_fragment.xml
@@ -19,7 +19,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
-     <!-- "QuickFix"- button (Copy to local contact, add to group) -->
+    <!-- "QuickFix"- button (Copy to local contact, add to group) -->
     <Button
         android:id="@+id/contact_quick_fix"
         android:layout_width="wrap_content"
diff --git a/res/layout-w470dp/contact_detail_updates_fragment.xml b/res/layout-w470dp/contact_detail_updates_fragment.xml
index 50536de..4eeaebb 100644
--- a/res/layout-w470dp/contact_detail_updates_fragment.xml
+++ b/res/layout-w470dp/contact_detail_updates_fragment.xml
@@ -15,7 +15,6 @@
 -->
 
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
     android:id="@+id/contact_detail_updates_fragment"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
diff --git a/res/layout/confirm_add_detail_activity.xml b/res/layout/confirm_add_detail_activity.xml
index 70e2b47..7ee16cf 100644
--- a/res/layout/confirm_add_detail_activity.xml
+++ b/res/layout/confirm_add_detail_activity.xml
@@ -17,7 +17,6 @@
 <!-- Layout for confirming the addition of a piece of information to an existing contact. -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
     android:id="@+id/root_view"
     android:orientation="vertical"
     android:visibility="invisible"
diff --git a/res/layout/contact_detail_activity.xml b/res/layout/contact_detail_activity.xml
index 1e63aa7..9765a71 100644
--- a/res/layout/contact_detail_activity.xml
+++ b/res/layout/contact_detail_activity.xml
@@ -27,11 +27,11 @@
         android:layout_width="0dip"
         android:visibility="gone"/>
 
-      <!-- This layout includes all possible views needed for a contact detail page -->
-      <include
-          android:id="@+id/contact_detail_container"
-          layout="@layout/contact_detail_container"
-          android:layout_width="match_parent"
-          android:layout_height="match_parent"/>
+    <!-- This layout includes all possible views needed for a contact detail page -->
+    <include
+        android:id="@+id/contact_detail_container"
+        layout="@layout/contact_detail_container"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
 
 </FrameLayout>
diff --git a/res/layout/contact_detail_updates_fragment.xml b/res/layout/contact_detail_updates_fragment.xml
index 30f09b9..02e906c 100644
--- a/res/layout/contact_detail_updates_fragment.xml
+++ b/res/layout/contact_detail_updates_fragment.xml
@@ -16,7 +16,6 @@
 
 <ListView
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
     android:id="@android:id/list"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
diff --git a/res/layout/contact_editor_fragment.xml b/res/layout/contact_editor_fragment.xml
index 913a5e0..f174a3d 100644
--- a/res/layout/contact_editor_fragment.xml
+++ b/res/layout/contact_editor_fragment.xml
@@ -14,24 +14,18 @@
      limitations under the License.
 -->
 
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:fillViewport="true"
+    android:fadingEdge="none"
     android:background="@color/background_primary"
 >
 
-    <ScrollView
+    <LinearLayout android:id="@+id/editors"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:fillViewport="true"
-        android:fadingEdge="none"
-    >
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+    />
 
-        <LinearLayout android:id="@+id/editors"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:orientation="vertical"
-        />
-
-    </ScrollView>
-</FrameLayout>
+</ScrollView>
diff --git a/res/layout/contacts_unavailable_fragment.xml b/res/layout/contacts_unavailable_fragment.xml
index 1abc020..c3c9bc4 100644
--- a/res/layout/contacts_unavailable_fragment.xml
+++ b/res/layout/contacts_unavailable_fragment.xml
@@ -16,13 +16,12 @@
 
 <ScrollView
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
     android:layout_width="match_parent"
     android:fillViewport="true">
     <LinearLayout
         android:orientation="vertical"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
+        android:layout_height="wrap_content"
         android:gravity="center_horizontal"
         android:background="@drawable/panel_message">
         <TextView
diff --git a/res/layout/group_browse_list_item.xml b/res/layout/group_browse_list_item.xml
index 45f444f..7008629 100644
--- a/res/layout/group_browse_list_item.xml
+++ b/res/layout/group_browse_list_item.xml
@@ -47,43 +47,36 @@
         layout="@layout/group_browse_list_account_header"
         android:visibility="gone" />
 
-    <RelativeLayout
+    <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:paddingTop="8dip"
         android:paddingLeft="8dip"
         android:paddingBottom="8dip"
+        android:layout_marginRight="?attr/list_item_padding_right"
+        android:orientation="vertical"
         android:duplicateParentState="true"
         android:background="@drawable/group_list_item_background"
-        >
+        android:layout_alignParentLeft="true"
+        android:layout_centerVertical="true">
 
-        <LinearLayout
-            android:layout_width="match_parent"
+        <TextView
+            android:id="@+id/label"
             android:layout_height="wrap_content"
-            android:layout_marginRight="?attr/list_item_padding_right"
-            android:orientation="vertical"
-            android:layout_toLeftOf="@+id/icons"
-            android:layout_alignParentLeft="true"
-            android:layout_centerVertical="true">
+            android:layout_width="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:ellipsize="end"
+            android:singleLine="true" />
 
-            <TextView
-                android:id="@+id/label"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:ellipsize="end"
-                android:singleLine="true" />
+        <TextView
+            android:id="@+id/count"
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceSmall"
+            android:textColor="?android:attr/textColorSecondary"
+            android:ellipsize="end"
+            android:singleLine="true" />
 
-            <TextView
-                android:id="@+id/count"
-                android:layout_height="wrap_content"
-                android:layout_width="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceSmall"
-                android:textColor="?android:attr/textColorSecondary"
-                android:ellipsize="end"
-                android:singleLine="true" />
-
-        </LinearLayout>
-    </RelativeLayout>
+    </LinearLayout>
 </LinearLayout>
 
diff --git a/res/layout/photoselection_activity.xml b/res/layout/photoselection_activity.xml
index 75f729b..e7ef901 100644
--- a/res/layout/photoselection_activity.xml
+++ b/res/layout/photoselection_activity.xml
@@ -15,7 +15,6 @@
 -->
 <FrameLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
     <View
diff --git a/res/layout/quickcontact_list_item_base.xml b/res/layout/quickcontact_list_item_base.xml
index 329df78..bc60396 100644
--- a/res/layout/quickcontact_list_item_base.xml
+++ b/res/layout/quickcontact_list_item_base.xml
@@ -33,7 +33,6 @@
         android:duplicateParentState="false"
         android:nextFocusLeft="@id/actions_view_container"/>
     <View
-        android:id="@+id/vertical_divider"
         android:layout_width="1dip"
         android:layout_height="match_parent"
         android:layout_gravity="center_vertical"
diff --git a/res/layout/quickcontact_track.xml b/res/layout/quickcontact_track.xml
index bf25cb3..3df7af0 100644
--- a/res/layout/quickcontact_track.xml
+++ b/res/layout/quickcontact_track.xml
@@ -23,7 +23,7 @@
         android:background="@drawable/quickcontact_track_background"
         android:scrollbars="none">
         <RelativeLayout
-            android:layout_width="match_parent"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content">
             <LinearLayout
                 android:id="@+id/track"
diff --git a/src/com/android/contacts/activities/TransactionSafeActivity.java b/src/com/android/contacts/activities/TransactionSafeActivity.java
index ab80b42..b177665 100644
--- a/src/com/android/contacts/activities/TransactionSafeActivity.java
+++ b/src/com/android/contacts/activities/TransactionSafeActivity.java
@@ -23,7 +23,7 @@
  * A common superclass that keeps track of whether an {@link Activity} has saved its state yet or
  * not.
  */
-public class TransactionSafeActivity extends Activity {
+public abstract class TransactionSafeActivity extends Activity {
 
     private boolean mIsSafeToCommitTransactions;