1 package com.android.keyguard 2 3 import android.content.Context 4 import android.graphics.Canvas 5 import android.util.AttributeSet 6 import android.widget.LinearLayout 7 8 class KeyguardStatusContainer( 9 context: Context, 10 attrs: AttributeSet, 11 ) : LinearLayout(context, attrs) { 12 private var drawAlpha: Int = 255 13 onSetAlphanull14 protected override fun onSetAlpha(alpha: Int): Boolean { 15 drawAlpha = alpha 16 return true 17 } 18 dispatchDrawnull19 protected override fun dispatchDraw(canvas: Canvas) { 20 KeyguardClockFrame.saveCanvasAlpha(this, canvas, drawAlpha) { super.dispatchDraw(canvas) } 21 } 22 } 23