First pass at tabbed contact viewing.
ScrollingTabWidget - This is a generic widget for displaying tab like
elements, that may not fit on the screen. The visual design for this
widget is still in flux.
BaseContactCardActivity - This is an abstract class that should be
extended by any Activity that displays information about a specific
contact and allows filtering on different RawContacts associated with
the contact. ViewContactActivity.java extends this class.
EditContactActivity will want to eventually. The abstract class
implements OnTabSelectionChangedListener and will get called on
onTabSelectionChanged() when a new tab is selected. This way the
activity can react to tab selection changes.
ViewContactActivity - This now extends BaseContactActivity.
diff --git a/src/com/android/contacts/StyleManager.java b/src/com/android/contacts/StyleManager.java
index d14b1c5..d2f6e09 100644
--- a/src/com/android/contacts/StyleManager.java
+++ b/src/com/android/contacts/StyleManager.java
@@ -80,7 +80,13 @@
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
filter.addDataScheme("package");
- context.registerReceiver(this, filter);
+
+ // We use getApplicationContext() so that the broadcast reciever can stay registered for
+ // the length of the application lifetime (instead of the calling activity's lifetime).
+ // This is so that we can notified of package changes, and purge the cache accordingly,
+ // but not be woken up if the application process isn't already running, since we will
+ // have no cache to clear at that point.
+ context.getApplicationContext().registerReceiver(this, filter);
}
@Override