Merge "ViewRootImpl: Correct opaque flag usage" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a731c9f3f9
@@ -2783,7 +2783,7 @@ public final class ViewRootImpl implements ViewParent,
|
||||
& WindowManagerGlobal.RELAYOUT_RES_DRAG_RESIZING_DOCKED) != 0;
|
||||
final boolean dragResizing = freeformResizing || dockedResizing;
|
||||
if (mSurfaceControl.isValid()) {
|
||||
updateOpacity(params, dragResizing);
|
||||
updateOpacity(mWindowAttributes, dragResizing);
|
||||
}
|
||||
|
||||
if (DEBUG_LAYOUT) Log.v(mTag, "relayout: frame=" + frame.toShortString()
|
||||
@@ -7749,9 +7749,10 @@ public final class ViewRootImpl implements ViewParent,
|
||||
return relayoutResult;
|
||||
}
|
||||
|
||||
private void updateOpacity(@Nullable WindowManager.LayoutParams params, boolean dragResizing) {
|
||||
private void updateOpacity(WindowManager.LayoutParams params, boolean dragResizing) {
|
||||
boolean opaque = false;
|
||||
if (params != null && !PixelFormat.formatHasAlpha(params.format)
|
||||
|
||||
if (!PixelFormat.formatHasAlpha(params.format)
|
||||
// Don't make surface with surfaceInsets opaque as they display a
|
||||
// translucent shadow.
|
||||
&& params.surfaceInsets.left == 0
|
||||
|
||||
@@ -29,6 +29,7 @@ import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.Rect;
|
||||
import android.hardware.display.DisplayManager;
|
||||
import android.os.IBinder;
|
||||
@@ -215,6 +216,7 @@ public class StartingSurfaceDrawer {
|
||||
WindowManager.LayoutParams.TYPE_APPLICATION_STARTING);
|
||||
params.setFitInsetsSides(0);
|
||||
params.setFitInsetsTypes(0);
|
||||
params.format = PixelFormat.TRANSLUCENT;
|
||||
int windowFlags = WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED
|
||||
| WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
|
||||
| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
|
||||
|
||||
Reference in New Issue
Block a user