Use AccountManager for details, handle INSERT cases.

Connected Sources to use AccountManager and inflate details
through registered sync adapters.  Each ContactsSource now
has a "level" of inflation, since deeper levels aren't
always needed right away.  Several places we're making
blocking calls into other processes that are tied to the UI
thread.  (This would take a large effort to fix.)

Turned most background Edit activity operations into
WeakAsyncTask, which helps finish background tasks while
preventing leaked Contexts.  This allows us to hold the UI
thread while saving, but release it just before ANR,
allowing the background operation to complete.

Enabled INSERT case, both from overall list and when already
editing an aggregate.  Finally, cleaned up the manifest
intent-filters to directly match authorities.
diff --git a/src/com/android/contacts/ScrollingTabWidget.java b/src/com/android/contacts/ScrollingTabWidget.java
index 982d661..2f703aa 100644
--- a/src/com/android/contacts/ScrollingTabWidget.java
+++ b/src/com/android/contacts/ScrollingTabWidget.java
@@ -201,6 +201,13 @@
     }
 
     /**
+     * Return index of the currently selected tab.
+     */
+    public int getCurrentTab() {
+        return mSelectedTab;
+    }
+
+    /**
      * Sets the current tab and focuses the UI on it.
      * This method makes sure that the focused tab matches the selected
      * tab, normally at {@link #setCurrentTab}.  Normally this would not
@@ -215,6 +222,10 @@
      *  @see #setCurrentTab
      */
     public void focusCurrentTab(int index) {
+        if (index < 0 || index >= getTabCount()) {
+            return;
+        }
+
         setCurrentTab(index);
         getChildTabViewAt(index).requestFocus();