Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b267fec authored by Brian Attwell's avatar Brian Attwell
Browse files

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 2e6387f0
Bug: 17428798
Change-Id: I3c4268cfd6a8a616c3179811b933b9f42f7e3867
parent f187d2eb
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -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);