summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt11
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt15
2 files changed, 19 insertions, 7 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt
index b5d61773d9af..6b8e896c937d 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/KeyguardBlueprintViewBinder.kt
@@ -38,6 +38,7 @@ import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardSmartspaceViewModel
import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.res.R
+import com.android.systemui.shared.R as sharedR
import javax.inject.Inject
import kotlin.math.max
@@ -217,15 +218,21 @@ constructor(
if (!DEBUG || currentClock == null) return
val smallClockViewId = R.id.lockscreen_clock_view
val largeClockViewId = currentClock.largeClock.layout.views[0].id
+ val smartspaceDateId = sharedR.id.date_smartspace_view
Log.i(
TAG,
"applyCsToSmallClock: vis=${cs.getVisibility(smallClockViewId)} " +
- "alpha=${cs.getConstraint(smallClockViewId).propertySet}"
+ "alpha=${cs.getConstraint(smallClockViewId).propertySet.alpha}"
)
Log.i(
TAG,
"applyCsToLargeClock: vis=${cs.getVisibility(largeClockViewId)} " +
- "alpha=${cs.getConstraint(largeClockViewId).propertySet}"
+ "alpha=${cs.getConstraint(largeClockViewId).propertySet.alpha}"
+ )
+ Log.i(
+ TAG,
+ "applyCsToSmartspaceDate: vis=${cs.getVisibility(smartspaceDateId)} " +
+ "alpha=${cs.getConstraint(smartspaceDateId).propertySet.alpha}"
)
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt
index eaa5e3367f49..9ec7a65cf240 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/view/layout/sections/SmartspaceSection.kt
@@ -18,7 +18,6 @@ package com.android.systemui.keyguard.ui.view.layout.sections
import android.content.Context
import android.view.View
-import android.view.View.GONE
import android.view.ViewTreeObserver.OnGlobalLayoutListener
import androidx.constraintlayout.widget.Barrier
import androidx.constraintlayout.widget.ConstraintLayout
@@ -205,8 +204,7 @@ constructor(
smartspaceController.requestSmartspaceUpdate()
constraintSet.apply {
- setVisibility(
- sharedR.id.weather_smartspace_view,
+ val weatherVisibility =
when (keyguardClockViewModel.hasCustomWeatherDataDisplay.value) {
true -> ConstraintSet.GONE
false ->
@@ -215,11 +213,18 @@ constructor(
false -> ConstraintSet.GONE
}
}
+ setVisibility(sharedR.id.weather_smartspace_view, weatherVisibility)
+ setAlpha(
+ sharedR.id.weather_smartspace_view,
+ if (weatherVisibility == ConstraintSet.VISIBLE) 1f else 0f
)
- setVisibility(
- sharedR.id.date_smartspace_view,
+ val dateVisibility =
if (keyguardClockViewModel.hasCustomWeatherDataDisplay.value) ConstraintSet.GONE
else ConstraintSet.VISIBLE
+ setVisibility(sharedR.id.date_smartspace_view, dateVisibility)
+ setAlpha(
+ sharedR.id.date_smartspace_view,
+ if (dateVisibility == ConstraintSet.VISIBLE) 1f else 0f
)
}
}