When choosing what window parameters to pass on
to child windows, we need to respect the manually set
FLAG_HARDWARE_ACCELERATED from Window.setFlags() in
addition to the activity manifest value, and the value
from setWindowManager. Given that we pass the value
on to child windows from when setWindowManager is called,
I think it makes sense to pass it when setFlags is
called.
Bug:
27099358
Bug:
23036374
Change-Id: Ie018841aadd270910fe0f8bc5a5ddca3bfbee69b
import android.transition.TransitionManager;
import android.view.accessibility.AccessibilityEvent;
+import static android.view.WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
+
import java.util.List;
/**
if (wp.packageName == null) {
wp.packageName = mContext.getPackageName();
}
- if (mHardwareAccelerated) {
- wp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
+ if (mHardwareAccelerated ||
+ (mWindowAttributes.flags & FLAG_HARDWARE_ACCELERATED) != 0) {
+ wp.flags |= FLAG_HARDWARE_ACCELERATED;
}
}