Fix the ongoing call chip animation.

See b/183229367#comment22 for before/after videos.

Bug: 183229367
Test: Click an ongoing call chip
Change-Id: I685c602cfa92a12230af4a687e84428c7c725d77
This commit is contained in:
Jordan Demeulenaere
2021-05-19 14:23:13 +02:00
parent 98d126ef0d
commit 7d51e5553a
2 changed files with 6 additions and 3 deletions

View File

@@ -23,6 +23,7 @@
android:layout_gravity="center_vertical|start"
>
<LinearLayout
android:id="@+id/ongoing_call_chip_background"
android:layout_width="wrap_content"
android:layout_height="@dimen/ongoing_appops_chip_height"
android:layout_gravity="center_vertical"

View File

@@ -150,9 +150,11 @@ class OngoingCallController @Inject constructor(
val currentChipView = chipView
val timeView =
currentChipView?.findViewById<Chronometer>(R.id.ongoing_call_chip_time)
currentChipView?.findViewById<Chronometer>(R.id.ongoing_call_chip_time)
val backgroundView =
currentChipView?.findViewById<View>(R.id.ongoing_call_chip_background)
if (currentChipView != null && timeView != null) {
if (currentChipView != null && timeView != null && backgroundView != null) {
timeView.base = currentOngoingCallInfo.callStartTime -
System.currentTimeMillis() +
systemClock.elapsedRealtime()
@@ -162,7 +164,7 @@ class OngoingCallController @Inject constructor(
logger.logChipClicked()
activityStarter.postStartActivityDismissingKeyguard(
currentOngoingCallInfo.intent, 0,
ActivityLaunchAnimator.Controller.fromView(it))
ActivityLaunchAnimator.Controller.fromView(backgroundView))
}
setUpUidObserver(currentOngoingCallInfo)