diff options
author | Katherine Kuan <katherinekuan@google.com> | 2011-10-31 16:48:44 -0700 |
---|---|---|
committer | Katherine Kuan <katherinekuan@google.com> | 2011-11-02 13:23:11 -0700 |
commit | 18e2b6f48045eebd802ff560420e1ad19b2e2da8 (patch) | |
tree | 24b306d1b5c98e3de5a3df2132e9468e0daae51c /src/com/android/contacts/ContactsActivity.java | |
parent | 7b3742ed79aa7289a94c8c9a83d626314e60b867 (diff) | |
download | Contacts-18e2b6f48045eebd802ff560420e1ad19b2e2da8.tar.gz |
Check activity state before showing phone disambig dialog
- This is a monkey bug on Crespo that happens often. The
monkey is likely tapping on a favorite contact in the Phone
app, which is trying to either dial the contact or
show a disambiguation dialog if the contact has multiple
phone numbers. There's an IllegalStateException with trying
to commit the dialog fragment transaction because the
saved state has already been called.
- After a PhoneNumberInteraction is started, a CursorLoader
is started, and when that returns, potentially we try to
commit a FragmentTransaction (showing the DialogFragment).
At this point, the activity may be long gone, so we need to
know if the activity has saved state or not. Hence,
we add a new base activity class (TransactionSafeActivity)
that keeps track of this information for us.
- The PhoneNumberInteractionTests still rely on passing in
a context to PhoneNumberInteraction (in order to check
that the queries and subsequent activities are correct),
but we typecast the static methods the app uses to
create these PhoneNumberInteraction objects.
Bug: 5132436
Change-Id: Id9d887bd55235b07133568a38d4922dc7fce24a7
Diffstat (limited to 'src/com/android/contacts/ContactsActivity.java')
-rw-r--r-- | src/com/android/contacts/ContactsActivity.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/contacts/ContactsActivity.java b/src/com/android/contacts/ContactsActivity.java index 020d13574..371b0b7a7 100644 --- a/src/com/android/contacts/ContactsActivity.java +++ b/src/com/android/contacts/ContactsActivity.java @@ -17,8 +17,8 @@ package com.android.contacts; import com.android.contacts.test.InjectedServices; +import com.android.contacts.activities.TransactionSafeActivity; -import android.app.Activity; import android.app.Fragment; import android.app.FragmentManager; import android.app.FragmentTransaction; @@ -31,7 +31,7 @@ import android.view.View; /** * A common superclass for Contacts activities that handles application-wide services. */ -public abstract class ContactsActivity extends Activity +public abstract class ContactsActivity extends TransactionSafeActivity implements ContactSaveService.Listener { |