am 1f98c62f: Fix unnecessary layer creation for appear animation
* commit '1f98c62f9a60fedd8f18bd47e3f3c4e5fcb34031': Fix unnecessary layer creation for appear animation
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<LinearLayout
|
<com.android.keyguard.AlphaOptimizedLinearLayout
|
||||||
android:id="@+id/content"
|
android:id="@+id/content"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
@@ -63,6 +63,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</com.android.keyguard.AlphaOptimizedLinearLayout>
|
||||||
|
|
||||||
</com.android.systemui.statusbar.NotificationOverflowContainer>
|
</com.android.systemui.statusbar.NotificationOverflowContainer>
|
||||||
|
|||||||
@@ -656,12 +656,14 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setContentAlpha(float contentAlpha) {
|
private void setContentAlpha(float contentAlpha) {
|
||||||
int layerType = contentAlpha == 0.0f || contentAlpha == 1.0f ? LAYER_TYPE_NONE
|
|
||||||
: LAYER_TYPE_HARDWARE;
|
|
||||||
View contentView = getContentView();
|
View contentView = getContentView();
|
||||||
int currentLayerType = contentView.getLayerType();
|
if (contentView.hasOverlappingRendering()) {
|
||||||
if (currentLayerType != layerType) {
|
int layerType = contentAlpha == 0.0f || contentAlpha == 1.0f ? LAYER_TYPE_NONE
|
||||||
contentView.setLayerType(layerType, null);
|
: LAYER_TYPE_HARDWARE;
|
||||||
|
int currentLayerType = contentView.getLayerType();
|
||||||
|
if (currentLayerType != layerType) {
|
||||||
|
contentView.setLayerType(layerType, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
contentView.setAlpha(contentAlpha);
|
contentView.setAlpha(contentAlpha);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user