From 0b267fec5cb5b2d836057b16d0085be349be5243 Mon Sep 17 00:00:00 2001 From: Brian Attwell Date: Fri, 24 Oct 2014 19:24:40 +0000 Subject: Fix blackened background screen Commit ag/544274 was a hack suggested by someone on the Window Manager team to work around one of their minor issues. Its use in QuickContacts contains a flaw. Even without this flaw, I'm still nervous about using this code. I can no longer reproduce b/17388576. So we may as well revert this CL and fix b/17428798. this reverts 2e6387f0bef606bb4be3facaedeafd080156d6c6 Bug: 17428798 Change-Id: I3c4268cfd6a8a616c3179811b933b9f42f7e3867 --- .../android/contacts/quickcontact/QuickContactActivity.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/com/android/contacts/quickcontact/QuickContactActivity.java b/src/com/android/contacts/quickcontact/QuickContactActivity.java index 9cd854a8e..909b94b04 100644 --- a/src/com/android/contacts/quickcontact/QuickContactActivity.java +++ b/src/com/android/contacts/quickcontact/QuickContactActivity.java @@ -177,8 +177,7 @@ 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 DEFAULT_SCRIM_ALPHA = 0xC8; - private static final int SCRIM_COLOR = Color.argb(DEFAULT_SCRIM_ALPHA, 0, 0, 0); + private static final int SCRIM_COLOR = Color.argb(0xC8, 0, 0, 0); private static final int REQUEST_CODE_CONTACT_SELECTION_ACTIVITY = 2; private static final String MIMETYPE_SMS = "vnd.android-dir/mms-sms"; @@ -366,14 +365,6 @@ 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; try { startActivity(intent); -- cgit v1.2.3