Reduce relayoutWindow when requestTransparentRegion

The pixel format should only need to apply once if the private
flags is actually changed. The subsequent request doesn't change
the window attributes. The most common case is from
SurfaceView#onAttachedToWindow and performDrawFinished.

Also remove mWindowAttributesChangesFlag which is never checked.
It was added in commit f21c9b0f and its functionality was replaced
by commit 40e0383d.

Bug: 140407614
Test: Enable log of relayoutWindow in WindowManagerService.
      Launch a sample app with a button which will add a
      SurfaceView if clicked. The relayoutWindow log won't
      appear after the second time pressing the button.

Change-Id: I13d36e390faad17a8e39a8c17c95fee5d3111960
2 files changed