diff options
| author | Paul Soulos <psoulos@google.com> | 2014-09-10 15:40:26 -0700 |
|---|---|---|
| committer | Paul Soulos <psoulos@google.com> | 2014-09-10 22:47:58 +0000 |
| commit | 2e6387f0bef606bb4be3facaedeafd080156d6c6 (patch) | |
| tree | d480701f3eb7135c889089516849ba8b86dc4894 /src | |
| parent | 4cd9ed68dca5f4adeb8ec2065526c18f33af5926 (diff) | |
| download | packages_apps_Contacts-2e6387f0bef606bb4be3facaedeafd080156d6c6.tar.gz packages_apps_Contacts-2e6387f0bef606bb4be3facaedeafd080156d6c6.tar.bz2 packages_apps_Contacts-2e6387f0bef606bb4be3facaedeafd080156d6c6.zip | |
Removes status bar flash when launching a new intent from the contact card
Bug: 17388576
Change-Id: I1f3f0573de11089f74e024fa2a3510a28a91e56b
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/contacts/quickcontact/QuickContactActivity.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java index 4421d111f..360ffb715 100644 --- a/src/com/android/contacts/quickcontact/QuickContactActivity.java +++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java @@ -175,7 +175,8 @@ public class QuickContactActivity extends ContactsActivity { private static final int ANIMATION_STATUS_BAR_COLOR_CHANGE_DURATION = 150; private static final int REQUEST_CODE_CONTACT_EDITOR_ACTIVITY = 1; - private static final int SCRIM_COLOR = Color.argb(0xC8, 0, 0, 0); + private static final int DEFAULT_SCRIM_ALPHA = 0xC8; + private static final int SCRIM_COLOR = Color.argb(DEFAULT_SCRIM_ALPHA, 0, 0, 0); private static final int REQUEST_CODE_CONTACT_SELECTION_ACTIVITY = 2; private static final String MIMETYPE_SMS = "vnd.android-dir/mms-sms"; @@ -359,6 +360,14 @@ public class QuickContactActivity extends ContactsActivity { intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + // Force the window dim amount to the scrim value for app transition animations + // The scrim may be removed before the window transitions to the new activity, which + // can cause a flicker in the status and navigation bar. Set dim alone does not work + // well because the request is passed through IPC which makes it slow to animate. + getWindow().setFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND, + WindowManager.LayoutParams.FLAG_DIM_BEHIND); + getWindow().setDimAmount(mWindowScrim.getAlpha() / DEFAULT_SCRIM_ALPHA); + mHasIntentLaunched = true; startActivity(intent); } |
